Worldmap ui - Remember Icons

Hi,

I have a word Map with several icons plotted on it, when I navigated to another tab and back the icons disappear.

Are their a way to "remember" them?

Thanks

You have to save the last positions to memory. This can easy be done when the data is coming in.
I do save it myself in a function node.

flow.set('Ed_last',msg.location);
return null;

With a World Map In node you can recall the saved settings when a "connected" event occurs and send the saved point back to the worldmap.

edit: Example flow

[{"id":"3c38f1ea.badf16","type":"worldmap","z":"a8531599.3b7c6","name":"Evert","lat":"52.3","lon":"6.6","zoom":"11","layer":"OSM","cluster":"","maxage":"","usermenu":"show","layers":"show","panit":"false","panlock":"false","zoomlock":"false","hiderightclick":"false","coords":"none","showgrid":"false","allowFileDrop":"false","path":"/worldmap","x":1230,"y":200,"wires":[]},{"id":"a06bae0e.9bab4","type":"owntracks","z":"a8531599.3b7c6","x":110,"y":200,"wires":[["7c62634.f083e9c"]]},{"id":"dde1774a.6475a","type":"function","z":"a8531599.3b7c6","name":"SaveLaatste","func":"flow.set('Ed_last',msg.location);\nreturn null;","outputs":1,"noerr":0,"x":590,"y":260,"wires":[[]]},{"id":"38a835ab.2233b2","type":"worldmap in","z":"a8531599.3b7c6","name":"","path":"/worldmap","events":"all","x":100,"y":360,"wires":[["c252d552.22935"]]},{"id":"c252d552.22935","type":"switch","z":"a8531599.3b7c6","name":"","property":"payload.action","propertyType":"msg","rules":[{"t":"eq","v":"connected","vt":"str"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":570,"y":360,"wires":[["30bf1572.827862"],[]],"outputLabels":["Connected",""]},{"id":"30bf1572.827862","type":"change","z":"a8531599.3b7c6","name":"RecallLaatste","rules":[{"t":"set","p":"payload","pt":"msg","to":"Ed_last","tot":"flow"}],"action":"","property":"","from":"","to":"","reg":false,"x":880,"y":340,"wires":[["3c38f1ea.badf16"]]},{"id":"7c62634.f083e9c","type":"change","z":"a8531599.3b7c6","name":"Delete parts","rules":[{"t":"delete","p":"res","pt":"msg"},{"t":"delete","p":"req","pt":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":330,"y":200,"wires":[["3c38f1ea.badf16","dde1774a.6475a"]]}]
1 Like

Thank you, I have several icons on the screen thought.

image

and the map will contain a few 100 when done.

All the locations come in from a SQL quarry, so with the "connected" I can just re-run the same quarry.

1 Like