# Gps dashboard for live location

**URL:** <https://discourse.nodered.org/t/gps-dashboard-for-live-location/34193>\
**Category:** General\
**Created:** [13 October 2020 18:13 UTC](https://discourse.nodered.org/t/gps-dashboard-for-live-location/34193 "2020-10-13T18:13:58Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![bachloo.rahul](https://avatars.discourse-cdn.com/v4/letter/b/779978/32.png) [@bachloo.rahul](https://discourse.nodered.org/u/bachloo.rahul)\
**Post date:** [13 October 2020 18:13 UTC](https://discourse.nodered.org/t/gps-dashboard-for-live-location/34193/1 "2020-10-13T18:13:59Z")

</div>

Does node red have live plotting and tracking functionality for plotting gps data such as latitude and longitude on a world map for implementing into my case.my gps is sending live location in the debug window every 3 minutes.so just wanted to showcase onto a map.

 ![17](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/a/6/a62b2941cee1ffb74d128211c00480a0b43c08b1.png)

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [13 October 2020 18:21 UTC](https://discourse.nodered.org/t/gps-dashboard-for-live-location/34193/2 "2020-10-13T18:21:09Z")

</div>

Yes. Use the node-red-contrib-web-worldmap

---

<div class="post-metadata">

**Author:** ![bachloo.rahul](https://avatars.discourse-cdn.com/v4/letter/b/779978/32.png) [@bachloo.rahul](https://discourse.nodered.org/u/bachloo.rahul)\
**Post date:** [13 October 2020 18:22 UTC](https://discourse.nodered.org/t/gps-dashboard-for-live-location/34193/3 "2020-10-13T18:22:27Z")

</div>

yes @dceejay it requires name as mandatory attribute.how can we add that to our nodes?

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [13 October 2020 18:22 UTC](https://discourse.nodered.org/t/gps-dashboard-for-live-location/34193/4 "2020-10-13T18:22:56Z")

</div>

Use a change node

---

<div class="post-metadata">

**Author:** ![bachloo.rahul](https://avatars.discourse-cdn.com/v4/letter/b/779978/32.png) [@bachloo.rahul](https://discourse.nodered.org/u/bachloo.rahul)\
**Post date:** [13 October 2020 18:24 UTC](https://discourse.nodered.org/t/gps-dashboard-for-live-location/34193/5 "2020-10-13T18:24:50Z")

</div>

yes it is available,in b/w which nodes should i add?and what property it requires

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/3/1/31f1707c9fb64e526a805a9f8bb6d0c85d8256d4.png)  
set search for-name":"24e124fffef0a78e(same as in payload)  
replace with:GPS(random) ![19](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/4/7/47e32b72b5f8347bb5890c75d7e356d0629a0632.png)  
Is it right? and in between which nodes should i place

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [13 October 2020 18:27 UTC](https://discourse.nodered.org/t/gps-dashboard-for-live-location/34193/6 "2020-10-13T18:27:39Z")

</div>

Set msg.payload.name to whatever you want

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [13 October 2020 18:46 UTC](https://discourse.nodered.org/t/gps-dashboard-for-live-location/34193/7 "2020-10-13T18:46:07Z")

</div>

eh ? - just use a change node as per it's default settings... to Set the property you want.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/d/2/d2d44f95f23bd4f9c2da9b313301376163659a02.png)

---

<div class="post-metadata">

**Author:** ![bachloo.rahul](https://avatars.discourse-cdn.com/v4/letter/b/779978/32.png) [@bachloo.rahul](https://discourse.nodered.org/u/bachloo.rahul)\
**Post date:** [13 October 2020 18:47 UTC](https://discourse.nodered.org/t/gps-dashboard-for-live-location/34193/8 "2020-10-13T18:47:48Z")

</div>

@dceejay yes did it,what next?

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [13 October 2020 20:05 UTC](https://discourse.nodered.org/t/gps-dashboard-for-live-location/34193/9 "2020-10-13T20:05:10Z")

</div>

Please spend an hour or two watching the Node Red Essentials videos linked from the node red docs. That will save you (and us) time and will avoid you asking questions that you will later look back on with embarrassment.

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [13 October 2020 20:14 UTC](https://discourse.nodered.org/t/gps-dashboard-for-live-location/34193/10 "2020-10-13T20:14:47Z")

</div>

and what did the msg end up like ? does it look like the format the map would need ?

---

<div class="post-metadata">

**Author:** ![bachloo.rahul](https://avatars.discourse-cdn.com/v4/letter/b/779978/32.png) [@bachloo.rahul](https://discourse.nodered.org/u/bachloo.rahul)\
**Post date:** [14 October 2020 03:47 UTC](https://discourse.nodered.org/t/gps-dashboard-for-live-location/34193/11 "2020-10-14T03:47:53Z")

</div>

[flows (2).json](https://discourse.nodered.org/uploads/short-url/kig9g8UDGfIP2TDfCp2fp0GHgAl.json) (5.3 KB)  
the change node will set the name attribute to apple in this case.but at what position should i fix this node in this case.?And we need to send name property along with data attribute into a single object.example  
{  
name:apple,  
lat:89.78  
lon:556.9  
} this is the output

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/7/8714d3ecccef38462c477e62164f6861de74c047.png)

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [14 October 2020 06:40 UTC](https://discourse.nodered.org/t/gps-dashboard-for-live-location/34193/12 "2020-10-14T06:40:50Z")

</div>

I can't see the change node in that picture ?

---

<div class="post-metadata">

**Author:** ![bachloo.rahul](https://avatars.discourse-cdn.com/v4/letter/b/779978/32.png) [@bachloo.rahul](https://discourse.nodered.org/u/bachloo.rahul)\
**Post date:** [14 October 2020 06:49 UTC](https://discourse.nodered.org/t/gps-dashboard-for-live-location/34193/13 "2020-10-14T06:49:52Z")

</div>

@dceejay i understand, according to u how should we set the flow to see the desired output  
Will it work if we use join node to create a merged object in this case as it can merge key value pairs from one object into another?

---

<div class="post-metadata">

**Author:** ![bachloo.rahul](https://avatars.discourse-cdn.com/v4/letter/b/779978/32.png) [@bachloo.rahul](https://discourse.nodered.org/u/bachloo.rahul)\
**Post date:** [14 October 2020 06:54 UTC](https://discourse.nodered.org/t/gps-dashboard-for-live-location/34193/14 "2020-10-14T06:54:02Z")

</div>

my mqtt broker settings are these  
broker [address-maqiatto.com](http://address-maqiatto.com)  
port-1883  
[username-bachloo.rahul@gmail.com](mailto:username-bachloo.rahul@gmail.com)  
password-ryanrahul  
[topic-bachloo.rahul@gmail.com](mailto:topic-bachloo.rahul@gmail.com)/test

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [14 October 2020 07:09 UTC](https://discourse.nodered.org/t/gps-dashboard-for-live-location/34193/15 "2020-10-14T07:09:57Z")

</div>

Sorry, I'm now lost. You started with an object with lat and lon, and wanted to add a name to it so you could show it on a map. I showed you how the change node could do that. No need to merge anything.

---

<div class="post-metadata">

**Author:** ![bachloo.rahul](https://avatars.discourse-cdn.com/v4/letter/b/779978/32.png) [@bachloo.rahul](https://discourse.nodered.org/u/bachloo.rahul)\
**Post date:** [14 October 2020 07:25 UTC](https://discourse.nodered.org/t/gps-dashboard-for-live-location/34193/16 "2020-10-14T07:25:45Z")

</div>

Ok no problem.Your approach is correct i was just assuming that it might be also a possibility. 🙂 😊

---

<div class="post-metadata">

**Author:** ![bachloo.rahul](https://avatars.discourse-cdn.com/v4/letter/b/779978/32.png) [@bachloo.rahul](https://discourse.nodered.org/u/bachloo.rahul)\
**Post date:** [14 October 2020 07:27 UTC](https://discourse.nodered.org/t/gps-dashboard-for-live-location/34193/17 "2020-10-14T07:27:57Z")

</div>

set msg.payload.name is the change node which is inturn connected with mqtt node.  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/2/9/29c8714eb7898e11e46fda45391a761930331714.png)

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [14 October 2020 07:38 UTC](https://discourse.nodered.org/t/gps-dashboard-for-live-location/34193/18 "2020-10-14T07:38:21Z")

</div>

What ? I thought you wanted to change the decoded output and send it to the map. ?

---

<div class="post-metadata">

**Author:** ![bachloo.rahul](https://avatars.discourse-cdn.com/v4/letter/b/779978/32.png) [@bachloo.rahul](https://discourse.nodered.org/u/bachloo.rahul)\
**Post date:** [14 October 2020 07:40 UTC](https://discourse.nodered.org/t/gps-dashboard-for-live-location/34193/19 "2020-10-14T07:40:03Z")

</div>

yes i want to show latitude and longitude on map.but according to it we have to add a change node inorder to accomplish it.I tried on my flow the change node but it is not showing desired output instead it shows whole message as payload.  
This was the second output what i got when i connected a function node before the change node  
code in function node-  
var t=JSON.parse(msg.payload);  
msg.payload=t.name;  
return msg;

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/2/725e0bb24cb877a2953b3e654daeaee1854cbf4f.png)

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [14 October 2020 08:04 UTC](https://discourse.nodered.org/t/gps-dashboard-for-live-location/34193/20 "2020-10-14T08:04:53Z")

</div>

The error says it all. the payload is NOT an object.

This is a very basic thing you could have discovered if you attached a debug node.

Anyhow, the `lat` and `lon` are created in the buffer-parser (you can see that if you click the debug message) so you need to apply the name to THAT payload - e.g. put the change node AFTER the buffer-parser (where the payload IS an object)

TBH, I think you would benefit from watching this playlist: [Node-RED Essentials](https://www.youtube.com/playlist?list=PLyNBB9VCLmo1hyO-4fIZ08gqFcXBkHy-6). The videos are done by the developers of node-red. They're nice & short and to the point. You will understand a whole lot more in about 1 hour. A small investment for a lot of gain.

[Next page](https://discourse.nodered.org/t/gps-dashboard-for-live-location/34193.md?page=2)
