# Unable to visualise points on worldmap on NodeRed

**URL:** <https://discourse.nodered.org/t/unable-to-visualise-points-on-worldmap-on-nodered/35171>\
**Category:** General\
**Created:** [1 November 2020 16:41 UTC](https://discourse.nodered.org/t/unable-to-visualise-points-on-worldmap-on-nodered/35171 "2020-11-01T16:41:42Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Karen123](https://avatars.discourse-cdn.com/v4/letter/k/e495f1/32.png) [@Karen123](https://discourse.nodered.org/u/Karen123)\
**Post date:** [1 November 2020 16:41 UTC](https://discourse.nodered.org/t/unable-to-visualise-points-on-worldmap-on-nodered/35171/1 "2020-11-01T16:41:42Z")

</div>

Hi All,

I am new to NodeRed an am trying to plot a map on NodeRed. However, the data points cannot be visualised on the map. May you please share your advice on how it could be resolved?

The flow I used is as below:

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/6/c6a65624ab514d482dfa164b367732031b3b6051.png)

The code I used in the 'function' node is as below:

var location={ "name": "location123", "lat":51.05, "lon":-1.35 };  
msg.payload=location;  
return msg;

And my map setting is as below:

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/6/5/657d887294d397589987083a27a00f09b2c3cea4.png)

Thanks very much in advance.

---

<div class="post-metadata">

**Author:** ![hotNipi](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hotnipi/32/383_2.png) [@hotNipi](https://discourse.nodered.org/u/hotNipi)\
**Post date:** [1 November 2020 17:18 UTC](https://discourse.nodered.org/t/unable-to-visualise-points-on-worldmap-on-nodered/35171/2 "2020-11-01T17:18:24Z")

</div>

Works for me with such content of function node.

---

<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:** [1 November 2020 17:58 UTC](https://discourse.nodered.org/t/unable-to-visualise-points-on-worldmap-on-nodered/35171/3 "2020-11-01T17:58:58Z")

</div>

Have you hit inject after the map has loaded ?

---

<div class="post-metadata">

**Author:** ![Karen123](https://avatars.discourse-cdn.com/v4/letter/k/e495f1/32.png) [@Karen123](https://discourse.nodered.org/u/Karen123)\
**Post date:** [1 November 2020 18:35 UTC](https://discourse.nodered.org/t/unable-to-visualise-points-on-worldmap-on-nodered/35171/4 "2020-11-01T18:35:20Z")

</div>

Hi HotNipi and dceejay, Thanks a lot for your shift response, I have used the 'worldmap' node from the node-red-contrib-web-worldmap example flow and it works now. I think I might have wrongly setup something in the 'worldmap' node in my previous flow.

As a next step of the flow, would you please advise if there is a way to clear all points on the map?

I am trying to create a button to clear all points on the map as below, however the 'clear all points' function do not work. In the flow below, the 'inject' flow will add the datapoint, and the 'button' is meant for clearing all points on the map. The function defined for the button is as below.

msg.payload.command.clear = "unknown";  
return msg;

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/9/0/904f25c373b8cf78117d8bdca6e1e4cf942cb948.png)

Would you please comment on what else needs to be done to clear all points on the map?

Thanks very much again.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [15 November 2020 18:35 UTC](https://discourse.nodered.org/t/unable-to-visualise-points-on-worldmap-on-nodered/35171/5 "2020-11-15T18:35:21Z")

</div>

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