mirror of
https://github.com/node-red/node-red-nodes.git
synced 2023-10-10 13:36:58 +02:00
parent
d4faa55ab8
commit
121da5deae
@ -69,7 +69,7 @@ module.exports = function(RED) {
|
||||
var len = parseInt(value.precision || 9);
|
||||
if (len < 1) { len = 1; }
|
||||
if (len > 9) { len = 9; }
|
||||
if (lat && lon) {
|
||||
if (typeof lat === 'number' && typeof lon === 'number') {
|
||||
value.geohash = geohash.encode(lat, lon, len);
|
||||
RED.util.setMessageProperty(msg,node.property,value);
|
||||
node.send(msg);
|
||||
|
Loading…
Reference in New Issue
Block a user