Hi, I'm not quite sure what you are asking for, but you can add lines as per the docs https://flows.nodered.org/node/node-red-contrib-web-worldmap.
If you are recording movement then the tracks node may be able to capture the points needed.
Hi @dceejay how track node works? Do we have sample sample flow to use this?
I think that's what I need, basically I want to create "pipelines" for water distribution network, however, hardcoding all those "pipes" in a map is a bunch of work. I need something that simply just draw a line from the world map and animate it via "hardcoding".
Ah no - the tracks node is more for tracking (say) a car or phone as it moves... If you want to draw lines then the drawing layer is probably more useful. If you use that to draw a layer - and add a worldmap in node set to watch for drawing events - when you draw a line you should get a set of points back that you caould save and replay whenever you need it.
Hi @dceejay thanks for the information, I will look on this.
Upon searching I also found this tool geojson.io that allows you draw (lines, circle, polygons and arcs) and automatically create a geojson file for you, you can then feed this geojson to worldmap panel and it works fine.
Here is a sample: (geojson was created in geojson.io then fed in worldmap node)
However, I am actually afraid for it's scalability and performance specially when getting "real-time" live data from sensors, supposed I have 10,000 of sensors and feeding in here in the geojson file could make the performance slow.
Other point I noticed:
I cannot customized icon in the geojson of type "point" while the node-red-map it allows it by just using payload = {icon: "your icon"}
I tried to load almost 325Mb size of Geojson file and it crashed the system (lol).
I think if you add a "marker-symbol" property to each feature (as per Mapbox spec - https://github.com/mapbox/simplestyle-spec/tree/master/1.1.0` ) - but using the Font Awesome 4.7 icon names then you should be able to customise the markers. (and also "marker-color" )
yeah - well - need more memory dedicated to Node-RED ... I would think you would be better having your geojson somehow split into sections (eld in some sort of store/db) - that can be loaded only when needed - eg when in the view window - and at a certain zoom level.
From the pop-up in the geojson sample I wonder whether you have a ton of metadata associated with each line. If so, strip that for the stuff you load into the world map. You have to keep the data in the worldmap minimal. If you want to display additional data when the user clicks on a line, then use a "line_id" or similar identifier to query a database and retrieve the extra data from there.