Unable to visualise points on worldmap on NodeRed

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:

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

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

And my map setting is as below:

Thanks very much in advance.

Works for me with such content of function node.

1 Like

Have you hit inject after the map has loaded ?

1 Like

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;


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

Thanks very much again.

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