mirror of
https://github.com/node-red/node-red-nodes.git
synced 2025-03-01 10:37:43 +00:00
update parser and time nodes info style
This commit is contained in:
@@ -23,12 +23,12 @@
|
||||
|
||||
<script type="text/x-red" data-help-name="geohash">
|
||||
<p>A function that encodes lat,lon to and from a geohash.</p>
|
||||
<p>If the <b>msg.payload</b> is a string it tries to see if it's a geohash -
|
||||
<p>If the <code>msg.payload</code> is a string it tries to see if it is a geohash -
|
||||
if so it tries to decode it and outputs a payload object containing
|
||||
<ul><li>latitude<li>longitude<li>error.latitude<li>error.longitude</ul></p>
|
||||
<p>If the <b>msg.payload</b> is an object with properties lat or latitude and lon or longitude
|
||||
- it will add a <b>geohash</b> property to the payload.</p>
|
||||
<p>The precision can be set by <b>msg.payload.precision</b> from 1 to 9.
|
||||
<p>If the <code>msg.payload</code> is an object with properties lat or latitude and lon or longitude
|
||||
- it will add a <code>geohash</code> property to the payload.</p>
|
||||
<p>The precision can be set by <code>msg.payload.precision</code> from 1 to 9.
|
||||
<p><b>Note:</b> If the msg contains a .location property it will operate on that in preference to the .payload.</p>
|
||||
</script>
|
||||
|
||||
|
@@ -6,7 +6,7 @@ A <a href="http://nodered.org" target="_new">Node-RED</a> node to encode and dec
|
||||
Install
|
||||
-------
|
||||
|
||||
Run the following command in the root directory of your Node-RED install
|
||||
Run the following command in your Node-RED user directory - typically `~/.node-red`
|
||||
|
||||
npm install node-red-node-geohash
|
||||
|
||||
@@ -14,9 +14,9 @@ Run the following command in the root directory of your Node-RED install
|
||||
Usage
|
||||
-----
|
||||
|
||||
This function encodes a lat,lon string to and from a geohash.
|
||||
This function encodes a `lat,lon` string to and from a geohash.
|
||||
|
||||
If the **msg.payload** is a string it tries to see if it's a geohash -
|
||||
If the `msg.payload` is a string it tries to see if it's a geohash -
|
||||
if so it tries to decode it and outputs a payload object containing
|
||||
|
||||
- latitude
|
||||
@@ -24,9 +24,9 @@ If the **msg.payload** is a string it tries to see if it's a geohash -
|
||||
- errorlatitude
|
||||
- error.longitude
|
||||
|
||||
If the **msg.payload** is an object with properties **lat** or **latitude** and **lon** or **longitude** - it will add a <b>geohash</b> property to the payload.
|
||||
If the `msg.payload` is an object with properties `lat` or `latitude` and `lon` or `longitude` - it will add a `geohash` property to the payload.
|
||||
|
||||
The precision can be set by **msg.payload.precision** from 1 to 9.
|
||||
The precision can be set by `msg.payload.precision` from 1 to 9.
|
||||
|
||||
|
||||
Example flow
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name" : "node-red-node-geohash",
|
||||
"version" : "0.0.4",
|
||||
"version" : "0.0.5",
|
||||
"description" : "A Node-RED node to encode and decode lat,lon pairs to a geohash.",
|
||||
"dependencies" : {
|
||||
"ngeohash" : "0.6.0"
|
||||
|
Reference in New Issue
Block a user