Not seeing coordinates on worldmap


followed all steps but still not showing on world map.

Now it looks like your payload is correct

Try commenting out the icon and marker - see if that helps.

Try refreshing the browser

Otherwise, I have helped you all i can - I am unfamiliar with the worldmap node.

I have a doubt :face_with_raised_eyebrow: i think we have to pass only msg.payload in worldmap node.but we are passing other messages also thats why it is not showing on map.
Need help in removing other messages inorder to show on worldmap.so only message object must contain payload property.
So need to remove extra property fields in msg object for clear picture.

No. The worldmap will ignore those other message properties. You do not need to remove them.

2 Likes

You have to have the world map open and connected BEFORE you send it data. Apart from that you payload look fine.

1 Like

I have 2 gps trackers both are sending data on node red through mqtt node. but only one truck is showing on worldmap do i have to add some extra settings inorder to show the other truck also?

[{"id":"f1c3712a.51632","type":"tab","label":"Flow 2","disabled":false,"info":""},{"id":"c573d354.4e202","type":"buffer-parser","z":"f1c3712a.51632","name":"Bulid Tags","data":"payload","dataType":"msg","specification":"spec","specificationType":"ui","items":[{"type":"byte","name":"lat","offset":6,"length":3,"offsetbit":0,"scale":1,"mask":""},{"type":"byte","name":"lon","offset":9,"length":3,"offsetbit":0,"scale":1,"mask":""}],"swap1":"","swap2":"","swap3":"","swap1Type":"swap","swap2Type":"swap","swap3Type":"swap","msgProperty":"payload","msgPropertyType":"","resultType":"keyvalue","resultTypeType":"output","multipleResult":false,"setTopic":true,"x":350,"y":160,"wires":[["bafbdd1c.dbce3"]]},{"id":"bafbdd1c.dbce3","type":"function","z":"f1c3712a.51632","name":"","func":"var lat = (msg.payload.lat[0] << 24)  + (msg.payload.lat[1] << 16) + (msg.payload.lat[2] << 8) \nvar lon = (msg.payload.lon[0] << 24)  + (msg.payload.lon[1] << 16) + (msg.payload.lon[2] << 8) \n\nif (lat > 0x7FFFFFFF) { \n  lat -= 0x100000000;\n}\n\nif (lon > 0x7FFFFFFF) {\n  lon -= 0x100000000;\n}\n\nlat /= 10000000; \nlon /= 10000000;\n\nmsg.payload.lat = lat ;\nmsg.payload.lon = lon ;\nmsg.payload.name = \"apple\"; //set name\nmsg.payload.icon = \"fa-truck\";  //set icon\nmsg.payload.marker = \"layer\"; //set marker\n\n//return msg.payload; WRONG - always return msg!\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":540,"y":140,"wires":[["40ae8e7f.0cd12","dedad9e1.d48fb8"]]},{"id":"40ae8e7f.0cd12","type":"debug","z":"f1c3712a.51632","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":730,"y":120,"wires":[]},{"id":"56b1735a.72088c","type":"mqtt in","z":"f1c3712a.51632","name":"","topic":"bachloo.rahul@gmail.com/test","qos":"0","datatype":"json","broker":"55bef158.86a7c","x":160,"y":40,"wires":[["2290cb3c.d51354"]]},{"id":"e9da35ff.a1ad48","type":"base64","z":"f1c3712a.51632","name":"","action":"","property":"payload","x":420,"y":80,"wires":[["c573d354.4e202"]]},{"id":"2290cb3c.d51354","type":"function","z":"f1c3712a.51632","name":"","func":"var t=msg.payload;\nmsg.payload=t.data;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":260,"y":100,"wires":[["e9da35ff.a1ad48"]]},{"id":"dedad9e1.d48fb8","type":"worldmap","z":"f1c3712a.51632","name":"","lat":"28.3917824","lon":"76.9599744","zoom":"10","layer":"OSM","cluster":"","maxage":"","usermenu":"show","layers":"show","panit":"true","panlock":"false","zoomlock":"false","hiderightclick":"false","coords":"none","showgrid":"false","path":"/worldmap","x":720,"y":200,"wires":[]},{"id":"55bef158.86a7c","type":"mqtt-broker","name":"","broker":"maqiatto.com","port":"1883","clientid":"","usetls":false,"compatmode":false,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""}]

Have you tried using a different name for the 2nd truck?

The documentation says...

name must be a unique identifier across the whole map. Repeated location updates to the same name move the marker


one of the trackers having device eui ending with 02 is facing issue in parsing through the buffer parser.Range issue don't understand why becoz both the trackers are in line of sight to the sky.

[{"id":"f1c3712a.51632","type":"tab","label":"Flow 2","disabled":false,"info":""},{"id":"c573d354.4e202","type":"buffer-parser","z":"f1c3712a.51632","name":"Bulid Tags","data":"payload","dataType":"msg","specification":"spec","specificationType":"ui","items":[{"type":"byte","name":"lat","offset":6,"length":3,"offsetbit":0,"scale":1,"mask":""},{"type":"byte","name":"lon","offset":9,"length":3,"offsetbit":0,"scale":1,"mask":""}],"swap1":"","swap2":"","swap3":"","swap1Type":"swap","swap2Type":"swap","swap3Type":"swap","msgProperty":"payload","msgPropertyType":"","resultType":"keyvalue","resultTypeType":"output","multipleResult":false,"setTopic":true,"x":350,"y":160,"wires":[["bafbdd1c.dbce3"]]},{"id":"bafbdd1c.dbce3","type":"function","z":"f1c3712a.51632","name":"","func":"var lat = (msg.payload.lat[0] << 24)  + (msg.payload.lat[1] << 16) + (msg.payload.lat[2] << 8) \nvar lon = (msg.payload.lon[0] << 24)  + (msg.payload.lon[1] << 16) + (msg.payload.lon[2] << 8) \n\nif (lat > 0x7FFFFFFF) { \n  lat -= 0x100000000;\n}\n\nif (lon > 0x7FFFFFFF) {\n  lon -= 0x100000000;\n}\n\nlat /= 10000000; \nlon /= 10000000;\n\nmsg.payload.lat = lat ;\nmsg.payload.lon = lon ;\nmsg.payload.name = \"apple\"; //set name\nmsg.payload.icon = \"fa-truck\";  //set icon\nmsg.payload.marker = \"layer\"; //set marker\n\n//return msg.payload; WRONG - always return msg!\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":540,"y":140,"wires":[["40ae8e7f.0cd12","dedad9e1.d48fb8"]]},{"id":"40ae8e7f.0cd12","type":"debug","z":"f1c3712a.51632","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":730,"y":80,"wires":[]},{"id":"56b1735a.72088c","type":"mqtt in","z":"f1c3712a.51632","name":"","topic":"bachloo.rahul@gmail.com/test","qos":"0","datatype":"json","broker":"55bef158.86a7c","x":120,"y":40,"wires":[["3b7b5746.9e7358"]]},{"id":"e9da35ff.a1ad48","type":"base64","z":"f1c3712a.51632","name":"","action":"","property":"payload","x":420,"y":80,"wires":[["c573d354.4e202"]]},{"id":"2290cb3c.d51354","type":"function","z":"f1c3712a.51632","name":"","func":"var t=msg.payload;\nmsg.payload=t.data;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":260,"y":100,"wires":[["e9da35ff.a1ad48"]]},{"id":"dedad9e1.d48fb8","type":"worldmap","z":"f1c3712a.51632","name":"","lat":"28.3917824","lon":"76.9599744","zoom":"10","layer":"OSM","cluster":"","maxage":"","usermenu":"show","layers":"show","panit":"true","panlock":"false","zoomlock":"false","hiderightclick":"false","coords":"none","showgrid":"false","path":"/worldmap","x":740,"y":160,"wires":[]},{"id":"3b7b5746.9e7358","type":"switch","z":"f1c3712a.51632","name":"","property":"payload.devEUI","propertyType":"msg","rules":[{"t":"eq","v":"20635f01d1000004","vt":"str"},{"t":"eq","v":"20635f01d1000002","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":110,"y":140,"wires":[["2290cb3c.d51354","6e345130.6a998"],["e996d627.23eab8","c399960d.750c38"]]},{"id":"cbe3233e.1dc17","type":"buffer-parser","z":"f1c3712a.51632","name":"Bulid Tags","data":"payload","dataType":"msg","specification":"spec","specificationType":"ui","items":[{"type":"byte","name":"lat","offset":6,"length":3,"offsetbit":0,"scale":1,"mask":""},{"type":"byte","name":"lon","offset":9,"length":3,"offsetbit":0,"scale":1,"mask":""}],"swap1":"","swap2":"","swap3":"","swap1Type":"swap","swap2Type":"swap","swap3Type":"swap","msgProperty":"payload","msgPropertyType":"","resultType":"keyvalue","resultTypeType":"output","multipleResult":false,"setTopic":true,"x":291,"y":256,"wires":[["5bcd89ac.eec178"]]},{"id":"5bcd89ac.eec178","type":"function","z":"f1c3712a.51632","name":"","func":"var lat = (msg.payload.lat[0] << 24)  + (msg.payload.lat[1] << 16) + (msg.payload.lat[2] << 8) \nvar lon = (msg.payload.lon[0] << 24)  + (msg.payload.lon[1] << 16) + (msg.payload.lon[2] << 8) \n\nif (lat > 0x7FFFFFFF) { \n  lat -= 0x100000000;\n}\n\nif (lon > 0x7FFFFFFF) {\n  lon -= 0x100000000;\n}\n\nlat /= 10000000; \nlon /= 10000000;\n\nmsg.payload.lat = lat ;\nmsg.payload.lon = lon ;\nmsg.payload.name = \"gps\"; //set name\nmsg.payload.icon = \"fa-truck\";  //set icon\nmsg.payload.marker = \"layer\"; //set marker\n\n//return msg.payload; WRONG - always return msg!\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":471,"y":236,"wires":[["a1dde264.4424","7af6dc66.00a194"]]},{"id":"a1dde264.4424","type":"debug","z":"f1c3712a.51632","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":651,"y":216,"wires":[]},{"id":"e996d627.23eab8","type":"function","z":"f1c3712a.51632","name":"","func":"var t=msg.payload;\nmsg.payload=t.data;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":191,"y":196,"wires":[["cbe3233e.1dc17"]]},{"id":"7af6dc66.00a194","type":"worldmap","z":"f1c3712a.51632","name":"","lat":"28.3917824","lon":"76.9599744","zoom":"10","layer":"OSM","cluster":"","maxage":"","usermenu":"show","layers":"show","panit":"true","panlock":"false","zoomlock":"false","hiderightclick":"false","coords":"none","showgrid":"false","path":"/worldmap","x":651,"y":296,"wires":[]},{"id":"c399960d.750c38","type":"debug","z":"f1c3712a.51632","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":110,"y":280,"wires":[]},{"id":"6e345130.6a998","type":"debug","z":"f1c3712a.51632","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":390,"y":40,"wires":[]},{"id":"55bef158.86a7c","type":"mqtt-broker","name":"","broker":"maqiatto.com","port":"1883","clientid":"","usetls":false,"compatmode":false,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""}]

payload1

{"applicationID":"1","applicationName":"cloud","data":"A0hIggANEOxCLd8jBOVh8g==","devEUI":"20635f01d1000004","deviceName":"abeeway tracker2","fCnt":594,"fPort":18,"rxInfo":[{"altitude":0,"latitude":0,"loRaSNR":8.5,"longitude":0,"mac":"24e124fffef0a78e","name":"24e124fffef0a78e","rssi":-47,"time":"2020-11-17T11:58:23.441765Z"}],"time":"2020-11-17T11:58:23.441765Z","txInfo":{"adr":true,"codeRate":"4/5","dataRate":{"bandwidth":125,"modulation":"LORA","spreadFactor":7},"frequency":865402500}}

Payload2

{"applicationID":"1","applicationName":"cloud","data":"A0hThwAJEOxGLd8jBsdI2w==","devEUI":"20635f01d1000002","deviceName":"abeeway tracker","fCnt":195,"fPort":18,"rxInfo":[{"altitude":0,"latitude":0,"loRaSNR":8.5,"longitude":0,"mac":"24e124fffef0a78e","name":"24e124fffef0a78e","rssi":-78,"time":"2020-11-17T11:56:39.509754Z"}],"time":"2020-11-17T11:56:39.509754Z","txInfo":{"adr":true,"codeRate":"4/5","dataRate":{"bandwidth":125,"modulation":"LORA","spreadFactor":7},"frequency":865402500}}

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.