World Map Great Circle Lines

I took a look around the web, but couldn't find a definite answer, so I'm posting here.

I'm looking at producing the following type map with the worldmap node. If it's not a current feature, I'd like to put in a request to make it a feature.

image

This is for amateur radio contacts mapping from a certain location where you are transmitting from.

As you contact another station, that station is plotted on on the map from an on-line lookup service for lat/lon. A great circle line is drawn from your transmitting location to each pinned station on the map. It would be nice to turn the great circle lines on/off also via the map legend as a layer.

Thanks
Kyle

2 Likes

Interesting thought. Indeed it should be possible to add an option to draw great circle lines. Adding buttons to show hide would be down to you. (probably easiest via embedding it in dashboard).
Will be in version 2.24.0 shortly

var m1 = { payload: { name: "GC1", greatcircle: [[51.464, 0], [25.76, -80.18]] } };
var m2 = { payload: { name: "GC2", greatcircle: [[51.464, 0], [35.6, 139.8]] } };
return [[m1,m2]];
4 Likes

Crikey that's fast work!

I'm assuming you will still be able to plot a pin at each lat/lon and then draw the great circle from you home base to each pin?

but of course

1 Like

Worldmap 2.24.0 now available

Works great! Thanks for the quick add to the map! This will be a great addition to the map for my application.

One feature request in the future to make the great circle lines the color of the icons?

Thanks again. Kyle

1 Like

I suppose the optional color properties may be required as per the readme.

var m1 = { payload: { name: "London", lat: 51.464, lon: 0 } };
var m2 = { payload: { name: "Miami", iconColor:"#ff00ff", lat: 25.65, lon: -80.18 } };
var m3 = { payload: { name: "Tokyo", iconColor:"#00ffff", lat: 35.6, lon: 139.8 } };
var m4 = { payload : { name: "GC1", color:"#ff00ff", greatcircle: [[51.464, 0], [25.76, -80.18]] } };
var m5 = { payload: { name: "GC2", color:"#00ffff", greatcircle: [[51.464, 0], [35.6, 139.8]] } };
return [[m1,m2,m3,m4,m5]];

Yep. I should of realized. Thanks.

1 Like

Just had a play with this feature - it's great.
I don't know if this is the right way to do it (without refreshing the map)... if you want to remove a great circle you can set the start and end coordinates to be the same (so it sorts of disappears). To remove the marker then the 'deleted' option can be used.

The line should also disappear if it is set to deleted. please shout if not.

Just checked and can confirm.. deleted:true will delete the great circle. So that's a neater way of doing it.

This is just a bit of pure fun on New Year's Eve, 2021. You can probably guess what it does - or try it out.
Screen Shot 12-31-21 at 08.40 PM

[{"id":"7f1f31a2780b86d4","type":"tab","label":"World map demo","disabled":false,"info":"","env":[]},{"id":"924e54fc54e725f0","type":"function","z":"7f1f31a2780b86d4","name":"All deleted","func":"let walter_lat        = flow.get(\"walter_lat\");\nlet walter_lon        = flow.get(\"walter_lon\");\nlet walter_icon_color = flow.get(\"walter_icon_color\");\n\nlet david_lat         = flow.get(\"david_lat\");\nlet david_lon         = flow.get(\"david_lon\");\nlet david_icon_color  = flow.get(\"david_icon_color\");\n\nlet paul_lat          = flow.get(\"paul_lat\");\nlet paul_lon          = flow.get(\"paul_lon\");\nlet paul_icon_color   = flow.get(\"paul_icon_color\");\n\n\nvar m1 = { payload: { name: \"London\",   deleted: true, lat: david_lat, lon: david_lon} };\nvar m2 = { payload: { name: \"Stockhom\", deleted: true, lat: walter_lat, lon:walter_lon} };\nvar m3 = { payload: { name: \"Boston\",   deleted: true, lat: paul_lat,   lon:paul_lon } };\n\nvar m4 = { payload: { name: \"GC1\", deleted: true, color:walter_icon_color, greatcircle: [[walter_lat, walter_lon], [paul_lat, paul_lon]] } }; // Walter to Paul\nvar m5 = { payload: { name: \"GC2\", deleted: true, color:walter_icon_color, greatcircle: [[walter_lat, walter_lon], [david_lat, david_lon]] } };  // Walter to David\nvar m6 = { payload: { name: \"GC3\", deleted: true, color:paul_icon_color,   greatcircle: [[paul_lat, paul_lon], [david_lat, david_lon]] } }; // Paul to David\nvar m7 = { payload: { name: \"GC4\", deleted: true, color: david_icon_color, greatcircle: [[david_lat, david_lon], [paul_lat, paul_lon]] } }; // David to Paul\n\nreturn [[m1, m2, m3, m4, m5, m6, m7]];\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":450,"y":240,"wires":[["72b76c90f1a8cdd9"]]},{"id":"72b76c90f1a8cdd9","type":"ui_worldmap","z":"7f1f31a2780b86d4","group":"1cc9b58f1c4ec163","order":12,"width":"14","height":"10","name":"","lat":"51.46","lon":"0","zoom":"2","layer":"OSMG","cluster":"","maxage":"","usermenu":"hide","layers":"hide","panit":"false","panlock":"false","zoomlock":"false","hiderightclick":"true","coords":"none","showgrid":"false","allowFileDrop":"false","path":"/worldmap","overlist":"DR,CO,RA,DN,HM","maplist":"OSMG,OSMC,EsriC,EsriS,EsriT,EsriDG,UKOS,SW","mapname":"","mapurl":"","mapopt":"","mapwms":false,"x":660,"y":320,"wires":[]},{"id":"56b81690763cadde","type":"ui_button","z":"7f1f31a2780b86d4","name":"","group":"2fe4264e872d42dc","order":1,"width":0,"height":0,"passthru":false,"label":"Clear ALL","tooltip":"","color":"","bgcolor":"","className":"","icon":"","payload":"","payloadType":"str","topic":"topic","topicType":"msg","x":220,"y":240,"wires":[["924e54fc54e725f0"]]},{"id":"88042bfee19b594a","type":"ui_button","z":"7f1f31a2780b86d4","name":"","group":"2fe4264e872d42dc","order":2,"width":0,"height":0,"passthru":false,"label":"Walter to Paul","tooltip":"","color":"","bgcolor":"","className":"","icon":"","payload":"","payloadType":"str","topic":"topic","topicType":"msg","x":240,"y":280,"wires":[["0b9e8d90eb63da93"]]},{"id":"0b9e8d90eb63da93","type":"function","z":"7f1f31a2780b86d4","name":"Walter to Paul","func":"let walter_lat = flow.get(\"walter_lat\");\nlet walter_lon = flow.get(\"walter_lon\");\nlet walter_icon_color = flow.get(\"walter_icon_color\");\n\nlet david_lat = flow.get(\"david_lat\");\nlet david_lon = flow.get(\"david_lon\");\nlet david_icon_color = flow.get(\"david_icon_color\");\n\nlet paul_lat = flow.get(\"paul_lat\");\nlet paul_lon = flow.get(\"paul_lon\");\nlet paul_icon_color = flow.get(\"paul_icon_color\");\n\nvar m1 = { payload: { name: \"London\", deleted: true, lat: david_lat, lon: david_lon } };\nvar m2 = { payload: { name: \"Stockhom\", deleted: false, iconColor: walter_icon_color, lat: walter_lat, lon: walter_lon } };\nvar m3 = { payload: { name: \"Boston\", deleted: false, iconColor: paul_icon_color, lat: paul_lat, lon: paul_lon } };\n\nvar m4 = { payload: { name: \"GC1\", deleted: false, color: walter_icon_color, greatcircle: [[walter_lat, walter_lon], [paul_lat, paul_lon]] } }; // Walter to Paul\nvar m5 = { payload: { name: \"GC2\", deleted: true, color: walter_icon_color, greatcircle: [[walter_lat, walter_lon], [david_lat, david_lon]] } };  // Walter to David\nvar m6 = { payload: { name: \"GC3\", deleted: true, color: paul_icon_color, greatcircle: [[paul_lat, paul_lon], [david_lat, david_lon]] } }; // Paul to David\nvar m7 = { payload: { name: \"GC4\", deleted: true, color: david_icon_color, greatcircle: [[david_lat, david_lon], [paul_lat, paul_lon]] } }; // David to Paul\n\nreturn [[m1, m2, m3, m4, m5, m6, m7]];\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":460,"y":280,"wires":[["72b76c90f1a8cdd9"]]},{"id":"02a839f92caa9c2b","type":"function","z":"7f1f31a2780b86d4","name":"Paul to David","func":"let walter_lat = flow.get(\"walter_lat\");\nlet walter_lon = flow.get(\"walter_lon\");\nlet walter_icon_color = flow.get(\"walter_icon_color\");\n\nlet david_lat = flow.get(\"david_lat\");\nlet david_lon = flow.get(\"david_lon\");\nlet david_icon_color = flow.get(\"david_icon_color\");\n\nlet paul_lat = flow.get(\"paul_lat\");\nlet paul_lon = flow.get(\"paul_lon\");\nlet paul_icon_color = flow.get(\"paul_icon_color\");\n\nvar m1 = { payload: { name: \"London\", deleted: false, iconColor: david_icon_color, lat: david_lat, lon: david_lon } };\nvar m2 = { payload: { name: \"Stockhom\", deleted: true, iconColor: walter_icon_color, lat: walter_lat, lon: walter_lon } };\nvar m3 = { payload: { name: \"Boston\", deleted: false, iconColor: paul_icon_color, lat: paul_lat, lon: paul_lon } };\n\nvar m4 = { payload: { name: \"GC1\", deleted: true, color: walter_icon_color, greatcircle: [[walter_lat, walter_lon], [paul_lat, paul_lon]] } }; // Walter to Paul\nvar m5 = { payload: { name: \"GC2\", deleted: true, color: walter_icon_color, greatcircle: [[walter_lat, walter_lon], [david_lat, david_lon]] } };  // Walter to David\nvar m6 = { payload: { name: \"GC3\", deleted: false, color: paul_icon_color, greatcircle: [[paul_lat, paul_lon], [david_lat, david_lon]] } }; // Paul to David\nvar m7 = { payload: { name: \"GC4\", deleted: true, color: david_icon_color, greatcircle: [[david_lat, david_lon], [paul_lat, paul_lon]] } }; // David to Paul\n\nreturn [[m1, m2, m3, m4, m5, m6, m7]];\n\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":460,"y":360,"wires":[["72b76c90f1a8cdd9"]]},{"id":"f575ed01ebc92d1d","type":"ui_button","z":"7f1f31a2780b86d4","name":"","group":"2fe4264e872d42dc","order":4,"width":0,"height":0,"passthru":false,"label":"Paul to David","tooltip":"","color":"","bgcolor":"","className":"","icon":"","payload":"","payloadType":"str","topic":"topic","topicType":"msg","x":240,"y":360,"wires":[["02a839f92caa9c2b"]]},{"id":"3f04a2076f9720d6","type":"ui_button","z":"7f1f31a2780b86d4","name":"","group":"2fe4264e872d42dc","order":3,"width":0,"height":0,"passthru":false,"label":"Walter to David","tooltip":"","color":"","bgcolor":"","className":"","icon":"","payload":"","payloadType":"str","topic":"topic","topicType":"msg","x":240,"y":320,"wires":[["acd4ac5f2b8e4569"]]},{"id":"acd4ac5f2b8e4569","type":"function","z":"7f1f31a2780b86d4","name":"Walter to David","func":"let walter_lat = flow.get(\"walter_lat\");\nlet walter_lon = flow.get(\"walter_lon\");\nlet walter_icon_color = flow.get(\"walter_icon_color\");\n\nlet david_lat = flow.get(\"david_lat\");\nlet david_lon = flow.get(\"david_lon\");\nlet david_icon_color = flow.get(\"david_icon_color\");\n\nlet paul_lat = flow.get(\"paul_lat\");\nlet paul_lon = flow.get(\"paul_lon\");\nlet paul_icon_color = flow.get(\"paul_icon_color\");\n\nvar m1 = { payload: { name: \"London\", deleted: false, iconColor: david_icon_color, lat: david_lat, lon: david_lon } };\nvar m2 = { payload: { name: \"Stockhom\", deleted: false, iconColor: walter_icon_color, lat: walter_lat, lon: walter_lon } };\nvar m3 = { payload: { name: \"Boston\", deleted: true, iconColor: paul_icon_color, lat: paul_lat, lon: paul_lon } };\n\nvar m4 = { payload: { name: \"GC1\", deleted: true, color: walter_icon_color, greatcircle: [[walter_lat, walter_lon], [paul_lat, paul_lon]] } }; // Walter to Paul\nvar m5 = { payload: { name: \"GC2\", deleted: false, color: walter_icon_color, greatcircle: [[walter_lat, walter_lon], [david_lat, david_lon]] } };  // Walter to David\nvar m6 = { payload: { name: \"GC3\", deleted: true, color: paul_icon_color, greatcircle: [[paul_lat, paul_lon], [david_lat, david_lon]] } }; // Paul to David\nvar m7 = { payload: { name: \"GC4\", deleted: true, color: david_icon_color, greatcircle: [[david_lat, david_lon], [paul_lat, paul_lon]] } }; // David to Paul\n\nreturn [[m1, m2, m3, m4, m5, m6, m7]];\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":460,"y":320,"wires":[["72b76c90f1a8cdd9"]]},{"id":"ae7b62b47a36400a","type":"comment","z":"7f1f31a2780b86d4","name":"Pure fun playing around with the WorldMap node","info":"","x":380,"y":80,"wires":[]},{"id":"0adc57ade2ae3b70","type":"inject","z":"7f1f31a2780b86d4","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":true,"onceDelay":0.1,"topic":"","payloadType":"date","x":250,"y":180,"wires":[["ec39b1589fc05669"]]},{"id":"ec39b1589fc05669","type":"function","z":"7f1f31a2780b86d4","name":"Set people, places and colors","func":"// Walter in Sweden\nflow.set(\"walter_lat\", 59.288);\nflow.set(\"walter_lon\", 18.008);\nflow.set(\"walter_icon_color\", '#cc6600'); // Gold color\n\n//David in the UK\nflow.set(\"david_lat\", 51.464);\nflow.set(\"david_lon\", -0.8);\nflow.set(\"david_icon_color\", '#009900'); // Green color\n\n\n//Paul in the USA\nflow.set(\"paul_lat\", 42.060);\nflow.set(\"paul_lon\", -71.25);\nflow.set(\"paul_icon_color\", '#0000cc'); // Blue color\n\nreturn null;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":510,"y":180,"wires":[[]]},{"id":"22a0e2e6cdb78451","type":"comment","z":"7f1f31a2780b86d4","name":"Flow is fairly generic as all the definitions are in this Function node","info":"","x":400,"y":140,"wires":[]},{"id":"60444167a2d64cf8","type":"function","z":"7f1f31a2780b86d4","name":"David to Paul","func":"let walter_lat = flow.get(\"walter_lat\");\nlet walter_lon = flow.get(\"walter_lon\");\nlet walter_icon_color = flow.get(\"walter_icon_color\");\n\nlet david_lat = flow.get(\"david_lat\");\nlet david_lon = flow.get(\"david_lon\");\nlet david_icon_color = flow.get(\"david_icon_color\");\n\nlet paul_lat = flow.get(\"paul_lat\");\nlet paul_lon = flow.get(\"paul_lon\");\nlet paul_icon_color = flow.get(\"paul_icon_color\");\n\nvar m1 = { payload: { name: \"London\", deleted: false, iconColor: david_icon_color, lat: david_lat, lon: david_lon } };\nvar m2 = { payload: { name: \"Stockhom\", deleted: true, iconColor: walter_icon_color, lat: walter_lat, lon: walter_lon } };\nvar m3 = { payload: { name: \"Boston\", deleted: false, iconColor: paul_icon_color, lat: paul_lat, lon: paul_lon } };\n\nvar m4 = { payload: { name: \"GC1\", deleted: true, color: walter_icon_color, greatcircle: [[walter_lat, walter_lon], [paul_lat, paul_lon]] } }; // Walter to Paul\nvar m5 = { payload: { name: \"GC2\", deleted: true, color: walter_icon_color, greatcircle: [[walter_lat, walter_lon], [david_lat, david_lon]] } };  // Walter to David\nvar m6 = { payload: { name: \"GC3\", deleted: true, color: paul_icon_color, greatcircle: [[david_lat, david_lon], [paul_lat, paul_lon]] } }; // Paul to David\nvar m7 = { payload: { name: \"GC4\", deleted: false, color: david_icon_color, greatcircle: [[david_lat, david_lon], [paul_lat, paul_lon]] } }; // David to Paul\n\nreturn [[m1, m2, m3, m4, m5, m6, m7]];\n\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":460,"y":400,"wires":[["72b76c90f1a8cdd9"]]},{"id":"ced8263bd1ea8187","type":"ui_button","z":"7f1f31a2780b86d4","name":"","group":"2fe4264e872d42dc","order":4,"width":0,"height":0,"passthru":false,"label":"David to Paul","tooltip":"","color":"","bgcolor":"","className":"","icon":"","payload":"","payloadType":"str","topic":"topic","topicType":"msg","x":240,"y":400,"wires":[["60444167a2d64cf8"]]},{"id":"1cc9b58f1c4ec163","type":"ui_group","name":"map","tab":"c503638c1498ac3c","order":1,"disp":true,"width":"14","collapse":false,"className":""},{"id":"2fe4264e872d42dc","type":"ui_group","name":"Controls","tab":"c503638c1498ac3c","order":2,"disp":true,"width":"6","collapse":false,"className":""},{"id":"c503638c1498ac3c","type":"ui_tab","name":"Worldmap_ping_demo","icon":"dashboard","order":3,"disabled":false,"hidden":false}]

EDIT: A couple of typos in the first flow I posted - which I have now corrected and re-posted above.

1 Like

For a minute there I thought you were going to go all "Chuckle Brothers" - to me - to you - to me - to you....

1 Like

I've written a NEW and IMPROVED version for the start of 2022 that maps ALL routes.

[{"id":"7f1f31a2780b86d4","type":"tab","label":"World map demo","disabled":false,"info":"","env":[]},{"id":"924e54fc54e725f0","type":"function","z":"7f1f31a2780b86d4","name":"All deleted","func":"let walter_lat        = flow.get(\"walter_lat\");\nlet walter_lon        = flow.get(\"walter_lon\");\nlet walter_icon_color = flow.get(\"walter_icon_color\");\n\nlet david_lat         = flow.get(\"david_lat\");\nlet david_lon         = flow.get(\"david_lon\");\nlet david_icon_color  = flow.get(\"david_icon_color\");\n\nlet paul_lat          = flow.get(\"paul_lat\");\nlet paul_lon          = flow.get(\"paul_lon\");\nlet paul_icon_color   = flow.get(\"paul_icon_color\");\n\n\nvar m1 = { payload: { name: \"London\",   deleted: true, lat: david_lat, lon: david_lon} };\nvar m2 = { payload: { name: \"Stockhom\", deleted: true, lat: walter_lat, lon:walter_lon} };\nvar m3 = { payload: { name: \"Boston\",   deleted: true, lat: paul_lat,   lon:paul_lon } };\n\nvar m4 = { payload: { name: \"GC1\", deleted: true, color:walter_icon_color, greatcircle: [[walter_lat, walter_lon], [paul_lat, paul_lon]] } };   // Walter to Paul\nvar m5 = { payload: { name: \"GC2\", deleted: true, color:walter_icon_color, greatcircle: [[walter_lat, walter_lon], [david_lat, david_lon]] } }; // Walter to David\n\nvar m6 = { payload: { name: \"GC3\", deleted: true, color:paul_icon_color,   greatcircle: [[paul_lat, paul_lon],     [walter_lat, walter_lon]] } };     // Paul to Walter\nvar m7 = { payload: { name: \"GC4\", deleted: true, color:paul_icon_color,   greatcircle: [[paul_lat, paul_lon],     [david_lat, david_lon]] } };     // Paul to David\n\nvar m8 = { payload: { name: \"GC5\", deleted: true, color:david_icon_color,  greatcircle: [[david_lat, david_lon],   [paul_lat, paul_lon]] } };     // David to Paul\nvar m9 = { payload: { name: \"GC6\", deleted: true, color:david_icon_color,  greatcircle: [[david_lat, david_lon],   [walter_lat, walter_lon]] } };     // David to Walter\n\nreturn [[m1, m2, m3, m4, m5, m6, m7, m8, m9]];\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":450,"y":240,"wires":[["72b76c90f1a8cdd9"]]},{"id":"72b76c90f1a8cdd9","type":"ui_worldmap","z":"7f1f31a2780b86d4","group":"1cc9b58f1c4ec163","order":12,"width":"14","height":"10","name":"","lat":"51.46","lon":"0","zoom":"2","layer":"OSMG","cluster":"","maxage":"","usermenu":"hide","layers":"hide","panit":"false","panlock":"false","zoomlock":"false","hiderightclick":"true","coords":"none","showgrid":"false","allowFileDrop":"false","path":"/worldmap","overlist":"DR,CO,RA,DN,HM","maplist":"OSMG,OSMC,EsriC,EsriS,EsriT,EsriDG,UKOS,SW","mapname":"","mapurl":"","mapopt":"","mapwms":false,"x":660,"y":240,"wires":[]},{"id":"56b81690763cadde","type":"ui_button","z":"7f1f31a2780b86d4","name":"","group":"2fe4264e872d42dc","order":1,"width":0,"height":0,"passthru":false,"label":"Clear ALL","tooltip":"","color":"","bgcolor":"","className":"","icon":"","payload":"","payloadType":"str","topic":"topic","topicType":"msg","x":220,"y":240,"wires":[["924e54fc54e725f0"]]},{"id":"88042bfee19b594a","type":"ui_button","z":"7f1f31a2780b86d4","name":"","group":"2fe4264e872d42dc","order":2,"width":0,"height":0,"passthru":false,"label":"Walter to Paul","tooltip":"","color":"","bgcolor":"#cc6600","className":"","icon":"","payload":"","payloadType":"str","topic":"topic","topicType":"msg","x":240,"y":280,"wires":[["0b9e8d90eb63da93"]]},{"id":"0b9e8d90eb63da93","type":"function","z":"7f1f31a2780b86d4","name":"Walter to Paul","func":"let walter_lat = flow.get(\"walter_lat\");\nlet walter_lon = flow.get(\"walter_lon\");\nlet walter_icon_color = flow.get(\"walter_icon_color\");\n\nlet david_lat = flow.get(\"david_lat\");\nlet david_lon = flow.get(\"david_lon\");\nlet david_icon_color = flow.get(\"david_icon_color\");\n\nlet paul_lat = flow.get(\"paul_lat\");\nlet paul_lon = flow.get(\"paul_lon\");\nlet paul_icon_color = flow.get(\"paul_icon_color\");\n\n\nvar m1 = { payload: { name: \"London\", iconColor: david_icon_color, deleted: true, lat: david_lat, lon: david_lon } };\nvar m2 = { payload: { name: \"Stockhom\", iconColor: walter_icon_color,deleted: false, lat: walter_lat, lon: walter_lon } };\nvar m3 = { payload: { name: \"Boston\", iconColor: paul_icon_color, deleted: false, lat: paul_lat, lon: paul_lon } };\n\nvar m4 = { payload: { name: \"GC1\", deleted: false, color: walter_icon_color, greatcircle: [[walter_lat, walter_lon], [paul_lat, paul_lon]] } };   // Walter to Paul\nvar m5 = { payload: { name: \"GC2\", deleted: true, color: walter_icon_color, greatcircle: [[walter_lat, walter_lon], [david_lat, david_lon]] } }; // Walter to David\n\nvar m6 = { payload: { name: \"GC3\", deleted: true, color: paul_icon_color, greatcircle: [[paul_lat, paul_lon], [walter_lat, walter_lon]] } };     // Paul to Walter\nvar m7 = { payload: { name: \"GC4\", deleted: true, color: paul_icon_color, greatcircle: [[paul_lat, paul_lon], [david_lat, david_lon]] } };     // Paul to David\n\nvar m8 = { payload: { name: \"GC5\", deleted: true, color: david_icon_color, greatcircle: [[david_lat, david_lon], [paul_lat, paul_lon]] } };     // David to Paul\nvar m9 = { payload: { name: \"GC6\", deleted: true, color: david_icon_color, greatcircle: [[david_lat, david_lon], [walter_lat, walter_lon]] } };     // David to Walter\n\nreturn [[m1, m2, m3, m4, m5, m6, m7, m8, m9]];\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":460,"y":280,"wires":[["72b76c90f1a8cdd9"]]},{"id":"02a839f92caa9c2b","type":"function","z":"7f1f31a2780b86d4","name":"Paul to David","func":"let walter_lat = flow.get(\"walter_lat\");\nlet walter_lon = flow.get(\"walter_lon\");\nlet walter_icon_color = flow.get(\"walter_icon_color\");\n\nlet david_lat = flow.get(\"david_lat\");\nlet david_lon = flow.get(\"david_lon\");\nlet david_icon_color = flow.get(\"david_icon_color\");\n\nlet paul_lat = flow.get(\"paul_lat\");\nlet paul_lon = flow.get(\"paul_lon\");\nlet paul_icon_color = flow.get(\"paul_icon_color\");\n\n\nvar m1 = { payload: { name: \"London\", iconColor: david_icon_color, deleted: false, lat: david_lat, lon: david_lon } };\nvar m2 = { payload: { name: \"Stockhom\", iconColor: walter_icon_color, deleted: true, lat: walter_lat, lon: walter_lon } };\nvar m3 = { payload: { name: \"Boston\", iconColor: paul_icon_color, deleted: false, lat: paul_lat, lon: paul_lon } };\n\nvar m4 = { payload: { name: \"GC1\", deleted: true, color: walter_icon_color, greatcircle: [[walter_lat, walter_lon], [paul_lat, paul_lon]] } };   // Walter to Paul\nvar m5 = { payload: { name: \"GC2\", deleted: true, color: walter_icon_color, greatcircle: [[walter_lat, walter_lon], [david_lat, david_lon]] } }; // Walter to David\n\nvar m6 = { payload: { name: \"GC3\", deleted: true, color: paul_icon_color, greatcircle: [[paul_lat, paul_lon], [walter_lat, walter_lon]] } };     // Paul to Walter\nvar m7 = { payload: { name: \"GC4\", deleted: false, color: paul_icon_color, greatcircle: [[paul_lat, paul_lon], [david_lat, david_lon]] } };     // Paul to David\n\nvar m8 = { payload: { name: \"GC5\", deleted: true, color: david_icon_color, greatcircle: [[david_lat, david_lon], [paul_lat, paul_lon]] } };     // David to Paul\nvar m9 = { payload: { name: \"GC6\", deleted: true, color: david_icon_color, greatcircle: [[david_lat, david_lon], [walter_lat, walter_lon]] } };     // David to Walter\n\nreturn [[m1, m2, m3, m4, m5, m6, m7, m8, m9]];\n\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":460,"y":440,"wires":[["72b76c90f1a8cdd9"]]},{"id":"f575ed01ebc92d1d","type":"ui_button","z":"7f1f31a2780b86d4","name":"","group":"2fe4264e872d42dc","order":6,"width":0,"height":0,"passthru":false,"label":"Paul to David","tooltip":"","color":"","bgcolor":"#0000cc","className":"","icon":"","payload":"","payloadType":"str","topic":"topic","topicType":"msg","x":240,"y":440,"wires":[["02a839f92caa9c2b"]]},{"id":"3f04a2076f9720d6","type":"ui_button","z":"7f1f31a2780b86d4","name":"","group":"2fe4264e872d42dc","order":3,"width":0,"height":0,"passthru":false,"label":"Walter to David","tooltip":"","color":"","bgcolor":"#cc6600","className":"","icon":"","payload":"","payloadType":"str","topic":"topic","topicType":"msg","x":240,"y":320,"wires":[["acd4ac5f2b8e4569"]]},{"id":"acd4ac5f2b8e4569","type":"function","z":"7f1f31a2780b86d4","name":"Walter to David","func":"let walter_lat = flow.get(\"walter_lat\");\nlet walter_lon = flow.get(\"walter_lon\");\nlet walter_icon_color = flow.get(\"walter_icon_color\");\n\nlet david_lat = flow.get(\"david_lat\");\nlet david_lon = flow.get(\"david_lon\");\nlet david_icon_color = flow.get(\"david_icon_color\");\n\nlet paul_lat = flow.get(\"paul_lat\");\nlet paul_lon = flow.get(\"paul_lon\");\nlet paul_icon_color = flow.get(\"paul_icon_color\");\n\n\nvar m1 = { payload: { name: \"London\", iconColor: david_icon_color, deleted: false, lat: david_lat, lon: david_lon } };\nvar m2 = { payload: { name: \"Stockhom\", iconColor: walter_icon_color, deleted: false, lat: walter_lat, lon: walter_lon } };\nvar m3 = { payload: { name: \"Boston\", iconColor: paul_icon_color, deleted: true, lat: paul_lat, lon: paul_lon } };\n\nvar m4 = { payload: { name: \"GC1\", deleted: true, color: walter_icon_color, greatcircle: [[walter_lat, walter_lon], [paul_lat, paul_lon]] } };   // Walter to Paul\nvar m5 = { payload: { name: \"GC2\", deleted: false, color: walter_icon_color, greatcircle: [[walter_lat, walter_lon], [david_lat, david_lon]] } }; // Walter to David\n\nvar m6 = { payload: { name: \"GC3\", deleted: true, color: paul_icon_color, greatcircle: [[paul_lat, paul_lon], [walter_lat, walter_lon]] } };     // Paul to Walter\nvar m7 = { payload: { name: \"GC4\", deleted: true, color: paul_icon_color, greatcircle: [[paul_lat, paul_lon], [david_lat, david_lon]] } };     // Paul to David\n\nvar m8 = { payload: { name: \"GC5\", deleted: true, color: david_icon_color, greatcircle: [[david_lat, david_lon], [paul_lat, paul_lon]] } };     // David to Paul\nvar m9 = { payload: { name: \"GC6\", deleted: true, color: david_icon_color, greatcircle: [[david_lat, david_lon], [walter_lat, walter_lon]] } };     // David to Walter\n\nreturn [[m1, m2, m3, m4, m5, m6, m7, m8, m9]];\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":460,"y":320,"wires":[["72b76c90f1a8cdd9"]]},{"id":"ae7b62b47a36400a","type":"comment","z":"7f1f31a2780b86d4","name":"Pure fun playing around with the WorldMap node","info":"","x":380,"y":80,"wires":[]},{"id":"0adc57ade2ae3b70","type":"inject","z":"7f1f31a2780b86d4","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":true,"onceDelay":0.1,"topic":"","payloadType":"date","x":250,"y":180,"wires":[["ec39b1589fc05669"]]},{"id":"ec39b1589fc05669","type":"function","z":"7f1f31a2780b86d4","name":"Set people, places and colors","func":"// Walter in Sweden\nflow.set(\"walter_lat\", 59.288);\nflow.set(\"walter_lon\", 18.008);\nflow.set(\"walter_icon_color\", '#cc6600'); // Gold color\n\n//David in the UK\nflow.set(\"david_lat\", 51.464);\nflow.set(\"david_lon\", -0.8);\nflow.set(\"david_icon_color\", '#009900'); // Green color\n\n\n//Paul in the USA\nflow.set(\"paul_lat\", 42.060);\nflow.set(\"paul_lon\", -71.25);\nflow.set(\"paul_icon_color\", '#0000cc'); // Blue color\n\nreturn null;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":510,"y":180,"wires":[[]]},{"id":"22a0e2e6cdb78451","type":"comment","z":"7f1f31a2780b86d4","name":"Flow is fairly generic as all the definitions are in this Function node","info":"","x":400,"y":140,"wires":[]},{"id":"60444167a2d64cf8","type":"function","z":"7f1f31a2780b86d4","name":"David to Paul","func":"let walter_lat = flow.get(\"walter_lat\");\nlet walter_lon = flow.get(\"walter_lon\");\nlet walter_icon_color = flow.get(\"walter_icon_color\");\n\nlet david_lat = flow.get(\"david_lat\");\nlet david_lon = flow.get(\"david_lon\");\nlet david_icon_color = flow.get(\"david_icon_color\");\n\nlet paul_lat = flow.get(\"paul_lat\");\nlet paul_lon = flow.get(\"paul_lon\");\nlet paul_icon_color = flow.get(\"paul_icon_color\");\n\n\nvar m1 = { payload: { name: \"London\", iconColor: david_icon_color, deleted: false, lat: david_lat, lon: david_lon } };\nvar m2 = { payload: { name: \"Stockhom\", iconColor: walter_icon_color, deleted: true, lat: walter_lat, lon: walter_lon } };\nvar m3 = { payload: { name: \"Boston\", iconColor: paul_icon_color, deleted: false, lat: paul_lat, lon: paul_lon } };\n\nvar m4 = { payload: { name: \"GC1\", deleted: true, color: walter_icon_color, greatcircle: [[walter_lat, walter_lon], [paul_lat, paul_lon]] } };   // Walter to Paul\nvar m5 = { payload: { name: \"GC2\", deleted: true, color: walter_icon_color, greatcircle: [[walter_lat, walter_lon], [david_lat, david_lon]] } }; // Walter to David\n\nvar m6 = { payload: { name: \"GC3\", deleted: true, color: paul_icon_color, greatcircle: [[paul_lat, paul_lon], [walter_lat, walter_lon]] } };     // Paul to Walter\nvar m7 = { payload: { name: \"GC4\", deleted: true, color: paul_icon_color, greatcircle: [[paul_lat, paul_lon], [david_lat, david_lon]] } };     // Paul to David\n\nvar m8 = { payload: { name: \"GC5\", deleted: false, color: david_icon_color, greatcircle: [[david_lat, david_lon], [paul_lat, paul_lon]] } };     // David to Paul\nvar m9 = { payload: { name: \"GC6\", deleted: true, color: david_icon_color, greatcircle: [[david_lat, david_lon], [walter_lat, walter_lon]] } };     // David to Walter\n\nreturn [[m1, m2, m3, m4, m5, m6, m7, m8, m9]];\n\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":460,"y":560,"wires":[["72b76c90f1a8cdd9"]]},{"id":"ced8263bd1ea8187","type":"ui_button","z":"7f1f31a2780b86d4","name":"","group":"2fe4264e872d42dc","order":9,"width":0,"height":0,"passthru":false,"label":"David to Paul","tooltip":"","color":"","bgcolor":"#009900","className":"","icon":"","payload":"","payloadType":"str","topic":"topic","topicType":"msg","x":240,"y":560,"wires":[["60444167a2d64cf8"]]},{"id":"b8c75c465047cde3","type":"function","z":"7f1f31a2780b86d4","name":"Paul to Walter","func":"let walter_lat = flow.get(\"walter_lat\");\nlet walter_lon = flow.get(\"walter_lon\");\nlet walter_icon_color = flow.get(\"walter_icon_color\");\n\nlet david_lat = flow.get(\"david_lat\");\nlet david_lon = flow.get(\"david_lon\");\nlet david_icon_color = flow.get(\"david_icon_color\");\n\nlet paul_lat = flow.get(\"paul_lat\");\nlet paul_lon = flow.get(\"paul_lon\");\nlet paul_icon_color = flow.get(\"paul_icon_color\");\n\n\nvar m1 = { payload: { name: \"London\", iconColor: david_icon_color, deleted: true, lat: david_lat, lon: david_lon } };\nvar m2 = { payload: { name: \"Stockhom\", iconColor: walter_icon_color, deleted: false, lat: walter_lat, lon: walter_lon } };\nvar m3 = { payload: { name: \"Boston\", iconColor: paul_icon_color, deleted: false, lat: paul_lat, lon: paul_lon } };\n\nvar m4 = { payload: { name: \"GC1\", deleted: true, color: walter_icon_color, greatcircle: [[walter_lat, walter_lon], [paul_lat, paul_lon]] } };   // Walter to Paul\nvar m5 = { payload: { name: \"GC2\", deleted: true, color: walter_icon_color, greatcircle: [[walter_lat, walter_lon], [david_lat, david_lon]] } }; // Walter to David\n\nvar m6 = { payload: { name: \"GC3\", deleted: false, color: paul_icon_color, greatcircle: [[paul_lat, paul_lon], [walter_lat, walter_lon]] } };     // Paul to Walter\nvar m7 = { payload: { name: \"GC4\", deleted: true, color: paul_icon_color, greatcircle: [[paul_lat, paul_lon], [david_lat, david_lon]] } };     // Paul to David\n\nvar m8 = { payload: { name: \"GC5\", deleted: true, color: david_icon_color, greatcircle: [[david_lat, david_lon], [paul_lat, paul_lon]] } };     // David to Paul\nvar m9 = { payload: { name: \"GC6\", deleted: true, color: david_icon_color, greatcircle: [[david_lat, david_lon], [walter_lat, walter_lon]] } };     // David to Walter\n\nreturn [[m1, m2, m3, m4, m5, m6, m7, m8, m9]];\n\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":460,"y":400,"wires":[["72b76c90f1a8cdd9"]]},{"id":"ce6e21b90d61427d","type":"ui_button","z":"7f1f31a2780b86d4","name":"","group":"2fe4264e872d42dc","order":5,"width":0,"height":0,"passthru":false,"label":"Paul to Walter","tooltip":"","color":"","bgcolor":"#0000cc","className":"","icon":"","payload":"","payloadType":"str","topic":"topic","topicType":"msg","x":240,"y":400,"wires":[["b8c75c465047cde3"]]},{"id":"6aefd3f967e404b9","type":"function","z":"7f1f31a2780b86d4","name":"David to Walter","func":"let walter_lat = flow.get(\"walter_lat\");\nlet walter_lon = flow.get(\"walter_lon\");\nlet walter_icon_color = flow.get(\"walter_icon_color\");\n\nlet david_lat = flow.get(\"david_lat\");\nlet david_lon = flow.get(\"david_lon\");\nlet david_icon_color = flow.get(\"david_icon_color\");\n\nlet paul_lat = flow.get(\"paul_lat\");\nlet paul_lon = flow.get(\"paul_lon\");\nlet paul_icon_color = flow.get(\"paul_icon_color\");\n\n\nvar m1 = { payload: { name: \"London\", iconColor: david_icon_color, deleted: false, lat: david_lat, lon: david_lon } };\nvar m2 = { payload: { name: \"Stockhom\", iconColor: walter_icon_color, deleted: false, lat: walter_lat, lon: walter_lon } };\nvar m3 = { payload: { name: \"Boston\", iconColor: paul_icon_color, deleted: true, lat: paul_lat, lon: paul_lon } };\n\nvar m4 = { payload: { name: \"GC1\", deleted: true, color: walter_icon_color, greatcircle: [[walter_lat, walter_lon], [paul_lat, paul_lon]] } };   // Walter to Paul\nvar m5 = { payload: { name: \"GC2\", deleted: true, color: walter_icon_color, greatcircle: [[walter_lat, walter_lon], [david_lat, david_lon]] } }; // Walter to David\n\nvar m6 = { payload: { name: \"GC3\", deleted: true, color: paul_icon_color, greatcircle: [[paul_lat, paul_lon], [walter_lat, walter_lon]] } };     // Paul to Walter\nvar m7 = { payload: { name: \"GC4\", deleted: true, color: paul_icon_color, greatcircle: [[paul_lat, paul_lon], [david_lat, david_lon]] } };     // Paul to David\n\nvar m8 = { payload: { name: \"GC5\", deleted: true, color: david_icon_color, greatcircle: [[david_lat, david_lon], [paul_lat, paul_lon]] } };     // David to Paul\nvar m9 = { payload: { name: \"GC6\", deleted: false, color: david_icon_color, greatcircle: [[david_lat, david_lon], [walter_lat, walter_lon]] } };     // David to Walter\n\nreturn [[m1, m2, m3, m4, m5, m6, m7, m8, m9]];\n\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":460,"y":520,"wires":[["72b76c90f1a8cdd9"]]},{"id":"8966af0398e6bb55","type":"ui_button","z":"7f1f31a2780b86d4","name":"","group":"2fe4264e872d42dc","order":8,"width":0,"height":0,"passthru":false,"label":"David to Walter","tooltip":"","color":"","bgcolor":"#009900","className":"","icon":"","payload":"","payloadType":"str","topic":"topic","topicType":"msg","x":240,"y":520,"wires":[["6aefd3f967e404b9"]]},{"id":"11777c28ad18d6e3","type":"function","z":"7f1f31a2780b86d4","name":"Walter to both","func":"let walter_lat = flow.get(\"walter_lat\");\nlet walter_lon = flow.get(\"walter_lon\");\nlet walter_icon_color = flow.get(\"walter_icon_color\");\n\nlet david_lat = flow.get(\"david_lat\");\nlet david_lon = flow.get(\"david_lon\");\nlet david_icon_color = flow.get(\"david_icon_color\");\n\nlet paul_lat = flow.get(\"paul_lat\");\nlet paul_lon = flow.get(\"paul_lon\");\nlet paul_icon_color = flow.get(\"paul_icon_color\");\n\n\nvar m1 = { payload: { name: \"London\", iconColor: david_icon_color, deleted: false, lat: david_lat, lon: david_lon } };\nvar m2 = { payload: { name: \"Stockhom\", iconColor: walter_icon_color, deleted: false, lat: walter_lat, lon: walter_lon } };\nvar m3 = { payload: { name: \"Boston\", iconColor: paul_icon_color, deleted: false, lat: paul_lat, lon: paul_lon } };\n\nvar m4 = { payload: { name: \"GC1\", deleted: false, color: walter_icon_color, greatcircle: [[walter_lat, walter_lon], [paul_lat, paul_lon]] } };   // Walter to Paul\nvar m5 = { payload: { name: \"GC2\", deleted: false, color: walter_icon_color, greatcircle: [[walter_lat, walter_lon], [david_lat, david_lon]] } }; // Walter to David\n\nvar m6 = { payload: { name: \"GC3\", deleted: true, color: paul_icon_color, greatcircle: [[paul_lat, paul_lon], [walter_lat, walter_lon]] } };     // Paul to Walter\nvar m7 = { payload: { name: \"GC4\", deleted: true, color: paul_icon_color, greatcircle: [[paul_lat, paul_lon], [david_lat, david_lon]] } };     // Paul to David\n\nvar m8 = { payload: { name: \"GC5\", deleted: true, color: david_icon_color, greatcircle: [[david_lat, david_lon], [paul_lat, paul_lon]] } };     // David to Paul\nvar m9 = { payload: { name: \"GC6\", deleted: true, color: david_icon_color, greatcircle: [[david_lat, david_lon], [walter_lat, walter_lon]] } };     // David to Walter\n\nreturn [[m1, m2, m3, m4, m5, m6, m7, m8, m9]];\n\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":460,"y":360,"wires":[["72b76c90f1a8cdd9"]]},{"id":"25c365db0d14da14","type":"ui_button","z":"7f1f31a2780b86d4","name":"","group":"2fe4264e872d42dc","order":4,"width":0,"height":0,"passthru":false,"label":"Walter to both","tooltip":"","color":"","bgcolor":"#cc6600","className":"","icon":"","payload":"","payloadType":"str","topic":"topic","topicType":"msg","x":240,"y":360,"wires":[["11777c28ad18d6e3"]]},{"id":"dd24c26e3ced0d31","type":"function","z":"7f1f31a2780b86d4","name":"Paul to both","func":"let walter_lat = flow.get(\"walter_lat\");\nlet walter_lon = flow.get(\"walter_lon\");\nlet walter_icon_color = flow.get(\"walter_icon_color\");\n\nlet david_lat = flow.get(\"david_lat\");\nlet david_lon = flow.get(\"david_lon\");\nlet david_icon_color = flow.get(\"david_icon_color\");\n\nlet paul_lat = flow.get(\"paul_lat\");\nlet paul_lon = flow.get(\"paul_lon\");\nlet paul_icon_color = flow.get(\"paul_icon_color\");\n\n\nvar m1 = { payload: { name: \"London\", iconColor: david_icon_color, deleted: false, lat: david_lat, lon: david_lon } };\nvar m2 = { payload: { name: \"Stockhom\", iconColor: walter_icon_color, deleted: false, lat: walter_lat, lon: walter_lon } };\nvar m3 = { payload: { name: \"Boston\", iconColor: paul_icon_color, deleted: false, lat: paul_lat, lon: paul_lon } };\n\nvar m4 = { payload: { name: \"GC1\", deleted: true, color: walter_icon_color, greatcircle: [[walter_lat, walter_lon], [paul_lat, paul_lon]] } };   // Walter to Paul\nvar m5 = { payload: { name: \"GC2\", deleted: true, color: walter_icon_color, greatcircle: [[walter_lat, walter_lon], [david_lat, david_lon]] } }; // Walter to David\n\nvar m6 = { payload: { name: \"GC3\", deleted: false, color: paul_icon_color, greatcircle: [[paul_lat, paul_lon], [walter_lat, walter_lon]] } };     // Paul to Walter\nvar m7 = { payload: { name: \"GC4\", deleted: false, color: paul_icon_color, greatcircle: [[paul_lat, paul_lon], [david_lat, david_lon]] } };     // Paul to David\n\nvar m8 = { payload: { name: \"GC5\", deleted: true, color: david_icon_color, greatcircle: [[david_lat, david_lon], [paul_lat, paul_lon]] } };     // David to Paul\nvar m9 = { payload: { name: \"GC6\", deleted: true, color: david_icon_color, greatcircle: [[david_lat, david_lon], [walter_lat, walter_lon]] } };     // David to Walter\n\nreturn [[m1, m2, m3, m4, m5, m6, m7, m8, m9]];\n\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":450,"y":480,"wires":[["72b76c90f1a8cdd9"]]},{"id":"6d92bf65c1420709","type":"ui_button","z":"7f1f31a2780b86d4","name":"","group":"2fe4264e872d42dc","order":7,"width":0,"height":0,"passthru":false,"label":"Paul to both","tooltip":"","color":"","bgcolor":"#0000cc","className":"","icon":"","payload":"","payloadType":"str","topic":"topic","topicType":"msg","x":230,"y":480,"wires":[["dd24c26e3ced0d31"]]},{"id":"bd53e92cf92ff6af","type":"function","z":"7f1f31a2780b86d4","name":"David to both","func":"let walter_lat = flow.get(\"walter_lat\");\nlet walter_lon = flow.get(\"walter_lon\");\nlet walter_icon_color = flow.get(\"walter_icon_color\");\n\nlet david_lat = flow.get(\"david_lat\");\nlet david_lon = flow.get(\"david_lon\");\nlet david_icon_color = flow.get(\"david_icon_color\");\n\nlet paul_lat = flow.get(\"paul_lat\");\nlet paul_lon = flow.get(\"paul_lon\");\nlet paul_icon_color = flow.get(\"paul_icon_color\");\n\n\nvar m1 = { payload: { name: \"London\", iconColor: david_icon_color, deleted: false, lat: david_lat, lon: david_lon } };\nvar m2 = { payload: { name: \"Stockhom\", iconColor: walter_icon_color, deleted: false, lat: walter_lat, lon: walter_lon } };\nvar m3 = { payload: { name: \"Boston\", iconColor: paul_icon_color, deleted: false, lat: paul_lat, lon: paul_lon } };\n\nvar m4 = { payload: { name: \"GC1\", deleted: true, color: walter_icon_color, greatcircle: [[walter_lat, walter_lon], [paul_lat, paul_lon]] } };   // Walter to Paul\nvar m5 = { payload: { name: \"GC2\", deleted: true, color: walter_icon_color, greatcircle: [[walter_lat, walter_lon], [david_lat, david_lon]] } }; // Walter to David\n\nvar m6 = { payload: { name: \"GC3\", deleted: true, color: paul_icon_color, greatcircle: [[paul_lat, paul_lon], [walter_lat, walter_lon]] } };     // Paul to Walter\nvar m7 = { payload: { name: \"GC4\", deleted: true, color: paul_icon_color, greatcircle: [[paul_lat, paul_lon], [david_lat, david_lon]] } };     // Paul to David\n\nvar m8 = { payload: { name: \"GC5\", deleted: false, color: david_icon_color, greatcircle: [[david_lat, david_lon], [paul_lat, paul_lon]] } };     // David to Paul\nvar m9 = { payload: { name: \"GC6\", deleted: false, color: david_icon_color, greatcircle: [[david_lat, david_lon], [walter_lat, walter_lon]] } };     // David to Walter\n\nreturn [[m1, m2, m3, m4, m5, m6, m7, m8, m9]];\n\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":460,"y":600,"wires":[["72b76c90f1a8cdd9"]]},{"id":"3807dcbcc8cd6437","type":"ui_button","z":"7f1f31a2780b86d4","name":"","group":"2fe4264e872d42dc","order":10,"width":0,"height":0,"passthru":false,"label":"David to both","tooltip":"","color":"","bgcolor":"#009900","className":"","icon":"","payload":"","payloadType":"str","topic":"topic","topicType":"msg","x":240,"y":600,"wires":[["bd53e92cf92ff6af"]]},{"id":"1cc9b58f1c4ec163","type":"ui_group","name":"map","tab":"c503638c1498ac3c","order":1,"disp":true,"width":"14","collapse":false,"className":""},{"id":"2fe4264e872d42dc","type":"ui_group","name":"Controls","tab":"c503638c1498ac3c","order":2,"disp":true,"width":"6","collapse":false,"className":""},{"id":"c503638c1498ac3c","type":"ui_tab","name":"Worldmap_ping_demo","icon":"dashboard","order":3,"disabled":false,"hidden":false}]
2 Likes

Just couldn't resist incorporating a bit of animation (automatic or manual).

[{"id":"7f1f31a2780b86d4","type":"tab","label":"World map demo","disabled":false,"info":"","env":[]},{"id":"924e54fc54e725f0","type":"function","z":"7f1f31a2780b86d4","name":"All deleted","func":"let walter_lat        = flow.get(\"walter_lat\");\nlet walter_lon        = flow.get(\"walter_lon\");\nlet walter_icon_color = flow.get(\"walter_icon_color\");\n\nlet david_lat         = flow.get(\"david_lat\");\nlet david_lon         = flow.get(\"david_lon\");\nlet david_icon_color  = flow.get(\"david_icon_color\");\n\nlet paul_lat          = flow.get(\"paul_lat\");\nlet paul_lon          = flow.get(\"paul_lon\");\nlet paul_icon_color   = flow.get(\"paul_icon_color\");\n\n\nvar m1 = { payload: { name: \"London\",   deleted: true, lat: david_lat, lon: david_lon} };\nvar m2 = { payload: { name: \"Stockhom\", deleted: true, lat: walter_lat, lon:walter_lon} };\nvar m3 = { payload: { name: \"Boston\",   deleted: true, lat: paul_lat,   lon:paul_lon } };\n\nvar m4 = { payload: { name: \"GC1\", deleted: true, color:walter_icon_color, greatcircle: [[walter_lat, walter_lon], [paul_lat, paul_lon]] } };   // Walter to Paul\nvar m5 = { payload: { name: \"GC2\", deleted: true, color:walter_icon_color, greatcircle: [[walter_lat, walter_lon], [david_lat, david_lon]] } }; // Walter to David\n\nvar m6 = { payload: { name: \"GC3\", deleted: true, color:paul_icon_color,   greatcircle: [[paul_lat, paul_lon],     [walter_lat, walter_lon]] } };     // Paul to Walter\nvar m7 = { payload: { name: \"GC4\", deleted: true, color:paul_icon_color,   greatcircle: [[paul_lat, paul_lon],     [david_lat, david_lon]] } };     // Paul to David\n\nvar m8 = { payload: { name: \"GC5\", deleted: true, color:david_icon_color,  greatcircle: [[david_lat, david_lon],   [paul_lat, paul_lon]] } };     // David to Paul\nvar m9 = { payload: { name: \"GC6\", deleted: true, color:david_icon_color,  greatcircle: [[david_lat, david_lon],   [walter_lat, walter_lon]] } };     // David to Walter\n\nreturn [[m1, m2, m3, m4, m5, m6, m7, m8, m9]];\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":670,"y":380,"wires":[["72b76c90f1a8cdd9"]]},{"id":"72b76c90f1a8cdd9","type":"ui_worldmap","z":"7f1f31a2780b86d4","group":"1e4408fe8754e4bf","order":2,"width":14,"height":10,"name":"","lat":"51.46","lon":"0","zoom":"2","layer":"EsriC","cluster":"","maxage":"","usermenu":"show","layers":"show","panit":"false","panlock":"false","zoomlock":"false","hiderightclick":"true","coords":"none","showgrid":"false","allowFileDrop":"false","path":"/worldmap","overlist":"DR,CO,RA,DN,HM","maplist":"EsriC,EsriS","mapname":"","mapurl":"","mapopt":"","mapwms":false,"x":880,"y":380,"wires":[]},{"id":"56b81690763cadde","type":"ui_button","z":"7f1f31a2780b86d4","name":"","group":"1e4408fe8754e4bf","order":3,"width":3,"height":1,"passthru":false,"label":"Clear ALL","tooltip":"","color":"","bgcolor":"","className":"","icon":"","payload":"","payloadType":"str","topic":"topic","topicType":"msg","x":440,"y":380,"wires":[["924e54fc54e725f0"]]},{"id":"88042bfee19b594a","type":"ui_button","z":"7f1f31a2780b86d4","name":"","group":"1e4408fe8754e4bf","order":5,"width":3,"height":1,"passthru":false,"label":"Walter to Paul","tooltip":"","color":"","bgcolor":"#cc6600","className":"","icon":"","payload":"","payloadType":"str","topic":"topic","topicType":"msg","x":460,"y":420,"wires":[["0b9e8d90eb63da93"]]},{"id":"0b9e8d90eb63da93","type":"function","z":"7f1f31a2780b86d4","name":"Walter to Paul","func":"let walter_lat = flow.get(\"walter_lat\");\nlet walter_lon = flow.get(\"walter_lon\");\nlet walter_icon_color = flow.get(\"walter_icon_color\");\n\nlet david_lat = flow.get(\"david_lat\");\nlet david_lon = flow.get(\"david_lon\");\nlet david_icon_color = flow.get(\"david_icon_color\");\n\nlet paul_lat = flow.get(\"paul_lat\");\nlet paul_lon = flow.get(\"paul_lon\");\nlet paul_icon_color = flow.get(\"paul_icon_color\");\n\n\nvar m1 = { payload: { name: \"London\", iconColor: david_icon_color, deleted: true, lat: david_lat, lon: david_lon } };\nvar m2 = { payload: { name: \"Stockhom\", iconColor: walter_icon_color,deleted: false, lat: walter_lat, lon: walter_lon } };\nvar m3 = { payload: { name: \"Boston\", iconColor: paul_icon_color, deleted: false, lat: paul_lat, lon: paul_lon } };\n\nvar m4 = { payload: { name: \"GC1\", deleted: false, color: walter_icon_color, greatcircle: [[walter_lat, walter_lon], [paul_lat, paul_lon]] } };   // Walter to Paul\nvar m5 = { payload: { name: \"GC2\", deleted: true, color: walter_icon_color, greatcircle: [[walter_lat, walter_lon], [david_lat, david_lon]] } }; // Walter to David\n\nvar m6 = { payload: { name: \"GC3\", deleted: true, color: paul_icon_color, greatcircle: [[paul_lat, paul_lon], [walter_lat, walter_lon]] } };     // Paul to Walter\nvar m7 = { payload: { name: \"GC4\", deleted: true, color: paul_icon_color, greatcircle: [[paul_lat, paul_lon], [david_lat, david_lon]] } };     // Paul to David\n\nvar m8 = { payload: { name: \"GC5\", deleted: true, color: david_icon_color, greatcircle: [[david_lat, david_lon], [paul_lat, paul_lon]] } };     // David to Paul\nvar m9 = { payload: { name: \"GC6\", deleted: true, color: david_icon_color, greatcircle: [[david_lat, david_lon], [walter_lat, walter_lon]] } };     // David to Walter\n\nreturn [[m1, m2, m3, m4, m5, m6, m7, m8, m9]];\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":680,"y":420,"wires":[["72b76c90f1a8cdd9"]]},{"id":"02a839f92caa9c2b","type":"function","z":"7f1f31a2780b86d4","name":"Paul to David","func":"let walter_lat = flow.get(\"walter_lat\");\nlet walter_lon = flow.get(\"walter_lon\");\nlet walter_icon_color = flow.get(\"walter_icon_color\");\n\nlet david_lat = flow.get(\"david_lat\");\nlet david_lon = flow.get(\"david_lon\");\nlet david_icon_color = flow.get(\"david_icon_color\");\n\nlet paul_lat = flow.get(\"paul_lat\");\nlet paul_lon = flow.get(\"paul_lon\");\nlet paul_icon_color = flow.get(\"paul_icon_color\");\n\n\nvar m1 = { payload: { name: \"London\", iconColor: david_icon_color, deleted: false, lat: david_lat, lon: david_lon } };\nvar m2 = { payload: { name: \"Stockhom\", iconColor: walter_icon_color, deleted: true, lat: walter_lat, lon: walter_lon } };\nvar m3 = { payload: { name: \"Boston\", iconColor: paul_icon_color, deleted: false, lat: paul_lat, lon: paul_lon } };\n\nvar m4 = { payload: { name: \"GC1\", deleted: true, color: walter_icon_color, greatcircle: [[walter_lat, walter_lon], [paul_lat, paul_lon]] } };   // Walter to Paul\nvar m5 = { payload: { name: \"GC2\", deleted: true, color: walter_icon_color, greatcircle: [[walter_lat, walter_lon], [david_lat, david_lon]] } }; // Walter to David\n\nvar m6 = { payload: { name: \"GC3\", deleted: true, color: paul_icon_color, greatcircle: [[paul_lat, paul_lon], [walter_lat, walter_lon]] } };     // Paul to Walter\nvar m7 = { payload: { name: \"GC4\", deleted: false, color: paul_icon_color, greatcircle: [[paul_lat, paul_lon], [david_lat, david_lon]] } };     // Paul to David\n\nvar m8 = { payload: { name: \"GC5\", deleted: true, color: david_icon_color, greatcircle: [[david_lat, david_lon], [paul_lat, paul_lon]] } };     // David to Paul\nvar m9 = { payload: { name: \"GC6\", deleted: true, color: david_icon_color, greatcircle: [[david_lat, david_lon], [walter_lat, walter_lon]] } };     // David to Walter\n\nreturn [[m1, m2, m3, m4, m5, m6, m7, m8, m9]];\n\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":680,"y":580,"wires":[["72b76c90f1a8cdd9"]]},{"id":"f575ed01ebc92d1d","type":"ui_button","z":"7f1f31a2780b86d4","name":"","group":"1e4408fe8754e4bf","order":13,"width":3,"height":1,"passthru":false,"label":"Paul to David","tooltip":"","color":"","bgcolor":"#0000cc","className":"","icon":"","payload":"","payloadType":"str","topic":"topic","topicType":"msg","x":460,"y":580,"wires":[["02a839f92caa9c2b"]]},{"id":"3f04a2076f9720d6","type":"ui_button","z":"7f1f31a2780b86d4","name":"","group":"1e4408fe8754e4bf","order":7,"width":3,"height":1,"passthru":false,"label":"Walter to David","tooltip":"","color":"","bgcolor":"#cc6600","className":"","icon":"","payload":"","payloadType":"str","topic":"topic","topicType":"msg","x":460,"y":460,"wires":[["acd4ac5f2b8e4569"]]},{"id":"acd4ac5f2b8e4569","type":"function","z":"7f1f31a2780b86d4","name":"Walter to David","func":"let walter_lat = flow.get(\"walter_lat\");\nlet walter_lon = flow.get(\"walter_lon\");\nlet walter_icon_color = flow.get(\"walter_icon_color\");\n\nlet david_lat = flow.get(\"david_lat\");\nlet david_lon = flow.get(\"david_lon\");\nlet david_icon_color = flow.get(\"david_icon_color\");\n\nlet paul_lat = flow.get(\"paul_lat\");\nlet paul_lon = flow.get(\"paul_lon\");\nlet paul_icon_color = flow.get(\"paul_icon_color\");\n\n\nvar m1 = { payload: { name: \"London\", iconColor: david_icon_color, deleted: false, lat: david_lat, lon: david_lon } };\nvar m2 = { payload: { name: \"Stockhom\", iconColor: walter_icon_color, deleted: false, lat: walter_lat, lon: walter_lon } };\nvar m3 = { payload: { name: \"Boston\", iconColor: paul_icon_color, deleted: true, lat: paul_lat, lon: paul_lon } };\n\nvar m4 = { payload: { name: \"GC1\", deleted: true, color: walter_icon_color, greatcircle: [[walter_lat, walter_lon], [paul_lat, paul_lon]] } };   // Walter to Paul\nvar m5 = { payload: { name: \"GC2\", deleted: false, color: walter_icon_color, greatcircle: [[walter_lat, walter_lon], [david_lat, david_lon]] } }; // Walter to David\n\nvar m6 = { payload: { name: \"GC3\", deleted: true, color: paul_icon_color, greatcircle: [[paul_lat, paul_lon], [walter_lat, walter_lon]] } };     // Paul to Walter\nvar m7 = { payload: { name: \"GC4\", deleted: true, color: paul_icon_color, greatcircle: [[paul_lat, paul_lon], [david_lat, david_lon]] } };     // Paul to David\n\nvar m8 = { payload: { name: \"GC5\", deleted: true, color: david_icon_color, greatcircle: [[david_lat, david_lon], [paul_lat, paul_lon]] } };     // David to Paul\nvar m9 = { payload: { name: \"GC6\", deleted: true, color: david_icon_color, greatcircle: [[david_lat, david_lon], [walter_lat, walter_lon]] } };     // David to Walter\n\nreturn [[m1, m2, m3, m4, m5, m6, m7, m8, m9]];\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":680,"y":460,"wires":[["72b76c90f1a8cdd9"]]},{"id":"ae7b62b47a36400a","type":"comment","z":"7f1f31a2780b86d4","name":"Pure fun playing around with the WorldMap node","info":"","x":520,"y":200,"wires":[]},{"id":"0adc57ade2ae3b70","type":"inject","z":"7f1f31a2780b86d4","name":"","props":[{"p":"payload"},{"p":"label","v":"Automatic","vt":"str"}],"repeat":"","crontab":"","once":true,"onceDelay":0.1,"topic":"","payload":"1","payloadType":"num","x":450,"y":320,"wires":[["ec39b1589fc05669","b2657f1bbc19cfb8"]]},{"id":"ec39b1589fc05669","type":"function","z":"7f1f31a2780b86d4","name":"Set people, places and colors","func":"// Walter in Sweden\nflow.set(\"walter_lat\", 59.288);\nflow.set(\"walter_lon\", 18.008);\nflow.set(\"walter_icon_color\", '#cc6600'); // Gold color\n\n//David in the UK\nflow.set(\"david_lat\", 51.464);\nflow.set(\"david_lon\", -0.8);\nflow.set(\"david_icon_color\", '#009900'); // Green color\n\n\n//Paul in the USA\nflow.set(\"paul_lat\", 42.060);\nflow.set(\"paul_lon\", -71.25);\nflow.set(\"paul_icon_color\", '#0000cc'); // Blue color\n\nflow.set(\"counter\",0);\n\nflow.set(\"status\",\"auto\");\n\nreturn null;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":730,"y":320,"wires":[[]]},{"id":"22a0e2e6cdb78451","type":"comment","z":"7f1f31a2780b86d4","name":"Flow is fairly generic as all the definitions are in this Function node","info":"","x":1160,"y":320,"wires":[]},{"id":"60444167a2d64cf8","type":"function","z":"7f1f31a2780b86d4","name":"David to Paul","func":"let walter_lat = flow.get(\"walter_lat\");\nlet walter_lon = flow.get(\"walter_lon\");\nlet walter_icon_color = flow.get(\"walter_icon_color\");\n\nlet david_lat = flow.get(\"david_lat\");\nlet david_lon = flow.get(\"david_lon\");\nlet david_icon_color = flow.get(\"david_icon_color\");\n\nlet paul_lat = flow.get(\"paul_lat\");\nlet paul_lon = flow.get(\"paul_lon\");\nlet paul_icon_color = flow.get(\"paul_icon_color\");\n\n\nvar m1 = { payload: { name: \"London\", iconColor: david_icon_color, deleted: false, lat: david_lat, lon: david_lon } };\nvar m2 = { payload: { name: \"Stockhom\", iconColor: walter_icon_color, deleted: true, lat: walter_lat, lon: walter_lon } };\nvar m3 = { payload: { name: \"Boston\", iconColor: paul_icon_color, deleted: false, lat: paul_lat, lon: paul_lon } };\n\nvar m4 = { payload: { name: \"GC1\", deleted: true, color: walter_icon_color, greatcircle: [[walter_lat, walter_lon], [paul_lat, paul_lon]] } };   // Walter to Paul\nvar m5 = { payload: { name: \"GC2\", deleted: true, color: walter_icon_color, greatcircle: [[walter_lat, walter_lon], [david_lat, david_lon]] } }; // Walter to David\n\nvar m6 = { payload: { name: \"GC3\", deleted: true, color: paul_icon_color, greatcircle: [[paul_lat, paul_lon], [walter_lat, walter_lon]] } };     // Paul to Walter\nvar m7 = { payload: { name: \"GC4\", deleted: true, color: paul_icon_color, greatcircle: [[paul_lat, paul_lon], [david_lat, david_lon]] } };     // Paul to David\n\nvar m8 = { payload: { name: \"GC5\", deleted: false, color: david_icon_color, greatcircle: [[david_lat, david_lon], [paul_lat, paul_lon]] } };     // David to Paul\nvar m9 = { payload: { name: \"GC6\", deleted: true, color: david_icon_color, greatcircle: [[david_lat, david_lon], [walter_lat, walter_lon]] } };     // David to Walter\n\nreturn [[m1, m2, m3, m4, m5, m6, m7, m8, m9]];\n\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":680,"y":700,"wires":[["72b76c90f1a8cdd9"]]},{"id":"ced8263bd1ea8187","type":"ui_button","z":"7f1f31a2780b86d4","name":"","group":"1e4408fe8754e4bf","order":19,"width":3,"height":1,"passthru":false,"label":"David to Paul","tooltip":"","color":"","bgcolor":"#009900","className":"","icon":"","payload":"","payloadType":"str","topic":"topic","topicType":"msg","x":460,"y":700,"wires":[["60444167a2d64cf8"]]},{"id":"b8c75c465047cde3","type":"function","z":"7f1f31a2780b86d4","name":"Paul to Walter","func":"let walter_lat = flow.get(\"walter_lat\");\nlet walter_lon = flow.get(\"walter_lon\");\nlet walter_icon_color = flow.get(\"walter_icon_color\");\n\nlet david_lat = flow.get(\"david_lat\");\nlet david_lon = flow.get(\"david_lon\");\nlet david_icon_color = flow.get(\"david_icon_color\");\n\nlet paul_lat = flow.get(\"paul_lat\");\nlet paul_lon = flow.get(\"paul_lon\");\nlet paul_icon_color = flow.get(\"paul_icon_color\");\n\n\nvar m1 = { payload: { name: \"London\", iconColor: david_icon_color, deleted: true, lat: david_lat, lon: david_lon } };\nvar m2 = { payload: { name: \"Stockhom\", iconColor: walter_icon_color, deleted: false, lat: walter_lat, lon: walter_lon } };\nvar m3 = { payload: { name: \"Boston\", iconColor: paul_icon_color, deleted: false, lat: paul_lat, lon: paul_lon } };\n\nvar m4 = { payload: { name: \"GC1\", deleted: true, color: walter_icon_color, greatcircle: [[walter_lat, walter_lon], [paul_lat, paul_lon]] } };   // Walter to Paul\nvar m5 = { payload: { name: \"GC2\", deleted: true, color: walter_icon_color, greatcircle: [[walter_lat, walter_lon], [david_lat, david_lon]] } }; // Walter to David\n\nvar m6 = { payload: { name: \"GC3\", deleted: false, color: paul_icon_color, greatcircle: [[paul_lat, paul_lon], [walter_lat, walter_lon]] } };     // Paul to Walter\nvar m7 = { payload: { name: \"GC4\", deleted: true, color: paul_icon_color, greatcircle: [[paul_lat, paul_lon], [david_lat, david_lon]] } };     // Paul to David\n\nvar m8 = { payload: { name: \"GC5\", deleted: true, color: david_icon_color, greatcircle: [[david_lat, david_lon], [paul_lat, paul_lon]] } };     // David to Paul\nvar m9 = { payload: { name: \"GC6\", deleted: true, color: david_icon_color, greatcircle: [[david_lat, david_lon], [walter_lat, walter_lon]] } };     // David to Walter\n\nreturn [[m1, m2, m3, m4, m5, m6, m7, m8, m9]];\n\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":680,"y":540,"wires":[["72b76c90f1a8cdd9"]]},{"id":"ce6e21b90d61427d","type":"ui_button","z":"7f1f31a2780b86d4","name":"","group":"1e4408fe8754e4bf","order":11,"width":3,"height":1,"passthru":false,"label":"Paul to Walter","tooltip":"","color":"","bgcolor":"#0000cc","className":"","icon":"","payload":"","payloadType":"str","topic":"topic","topicType":"msg","x":460,"y":540,"wires":[["b8c75c465047cde3"]]},{"id":"6aefd3f967e404b9","type":"function","z":"7f1f31a2780b86d4","name":"David to Walter","func":"let walter_lat = flow.get(\"walter_lat\");\nlet walter_lon = flow.get(\"walter_lon\");\nlet walter_icon_color = flow.get(\"walter_icon_color\");\n\nlet david_lat = flow.get(\"david_lat\");\nlet david_lon = flow.get(\"david_lon\");\nlet david_icon_color = flow.get(\"david_icon_color\");\n\nlet paul_lat = flow.get(\"paul_lat\");\nlet paul_lon = flow.get(\"paul_lon\");\nlet paul_icon_color = flow.get(\"paul_icon_color\");\n\n\nvar m1 = { payload: { name: \"London\", iconColor: david_icon_color, deleted: false, lat: david_lat, lon: david_lon } };\nvar m2 = { payload: { name: \"Stockhom\", iconColor: walter_icon_color, deleted: false, lat: walter_lat, lon: walter_lon } };\nvar m3 = { payload: { name: \"Boston\", iconColor: paul_icon_color, deleted: true, lat: paul_lat, lon: paul_lon } };\n\nvar m4 = { payload: { name: \"GC1\", deleted: true, color: walter_icon_color, greatcircle: [[walter_lat, walter_lon], [paul_lat, paul_lon]] } };   // Walter to Paul\nvar m5 = { payload: { name: \"GC2\", deleted: true, color: walter_icon_color, greatcircle: [[walter_lat, walter_lon], [david_lat, david_lon]] } }; // Walter to David\n\nvar m6 = { payload: { name: \"GC3\", deleted: true, color: paul_icon_color, greatcircle: [[paul_lat, paul_lon], [walter_lat, walter_lon]] } };     // Paul to Walter\nvar m7 = { payload: { name: \"GC4\", deleted: true, color: paul_icon_color, greatcircle: [[paul_lat, paul_lon], [david_lat, david_lon]] } };     // Paul to David\n\nvar m8 = { payload: { name: \"GC5\", deleted: true, color: david_icon_color, greatcircle: [[david_lat, david_lon], [paul_lat, paul_lon]] } };     // David to Paul\nvar m9 = { payload: { name: \"GC6\", deleted: false, color: david_icon_color, greatcircle: [[david_lat, david_lon], [walter_lat, walter_lon]] } };     // David to Walter\n\nreturn [[m1, m2, m3, m4, m5, m6, m7, m8, m9]];\n\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":680,"y":660,"wires":[["72b76c90f1a8cdd9"]]},{"id":"8966af0398e6bb55","type":"ui_button","z":"7f1f31a2780b86d4","name":"","group":"1e4408fe8754e4bf","order":17,"width":3,"height":1,"passthru":false,"label":"David to Walter","tooltip":"","color":"","bgcolor":"#009900","className":"","icon":"","payload":"","payloadType":"str","topic":"topic","topicType":"msg","x":460,"y":660,"wires":[["6aefd3f967e404b9"]]},{"id":"11777c28ad18d6e3","type":"function","z":"7f1f31a2780b86d4","name":"Walter to both","func":"let walter_lat = flow.get(\"walter_lat\");\nlet walter_lon = flow.get(\"walter_lon\");\nlet walter_icon_color = flow.get(\"walter_icon_color\");\n\nlet david_lat = flow.get(\"david_lat\");\nlet david_lon = flow.get(\"david_lon\");\nlet david_icon_color = flow.get(\"david_icon_color\");\n\nlet paul_lat = flow.get(\"paul_lat\");\nlet paul_lon = flow.get(\"paul_lon\");\nlet paul_icon_color = flow.get(\"paul_icon_color\");\n\n\nvar m1 = { payload: { name: \"London\", iconColor: david_icon_color, deleted: false, lat: david_lat, lon: david_lon } };\nvar m2 = { payload: { name: \"Stockhom\", iconColor: walter_icon_color, deleted: false, lat: walter_lat, lon: walter_lon } };\nvar m3 = { payload: { name: \"Boston\", iconColor: paul_icon_color, deleted: false, lat: paul_lat, lon: paul_lon } };\n\nvar m4 = { payload: { name: \"GC1\", deleted: false, color: walter_icon_color, greatcircle: [[walter_lat, walter_lon], [paul_lat, paul_lon]] } };   // Walter to Paul\nvar m5 = { payload: { name: \"GC2\", deleted: false, color: walter_icon_color, greatcircle: [[walter_lat, walter_lon], [david_lat, david_lon]] } }; // Walter to David\n\nvar m6 = { payload: { name: \"GC3\", deleted: true, color: paul_icon_color, greatcircle: [[paul_lat, paul_lon], [walter_lat, walter_lon]] } };     // Paul to Walter\nvar m7 = { payload: { name: \"GC4\", deleted: true, color: paul_icon_color, greatcircle: [[paul_lat, paul_lon], [david_lat, david_lon]] } };     // Paul to David\n\nvar m8 = { payload: { name: \"GC5\", deleted: true, color: david_icon_color, greatcircle: [[david_lat, david_lon], [paul_lat, paul_lon]] } };     // David to Paul\nvar m9 = { payload: { name: \"GC6\", deleted: true, color: david_icon_color, greatcircle: [[david_lat, david_lon], [walter_lat, walter_lon]] } };     // David to Walter\n\nreturn [[m1, m2, m3, m4, m5, m6, m7, m8, m9]];\n\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":680,"y":500,"wires":[["72b76c90f1a8cdd9"]]},{"id":"25c365db0d14da14","type":"ui_button","z":"7f1f31a2780b86d4","name":"","group":"1e4408fe8754e4bf","order":9,"width":3,"height":1,"passthru":false,"label":"Walter to both","tooltip":"","color":"","bgcolor":"#cc6600","className":"","icon":"","payload":"","payloadType":"str","topic":"topic","topicType":"msg","x":460,"y":500,"wires":[["11777c28ad18d6e3"]]},{"id":"dd24c26e3ced0d31","type":"function","z":"7f1f31a2780b86d4","name":"Paul to both","func":"let walter_lat = flow.get(\"walter_lat\");\nlet walter_lon = flow.get(\"walter_lon\");\nlet walter_icon_color = flow.get(\"walter_icon_color\");\n\nlet david_lat = flow.get(\"david_lat\");\nlet david_lon = flow.get(\"david_lon\");\nlet david_icon_color = flow.get(\"david_icon_color\");\n\nlet paul_lat = flow.get(\"paul_lat\");\nlet paul_lon = flow.get(\"paul_lon\");\nlet paul_icon_color = flow.get(\"paul_icon_color\");\n\n\nvar m1 = { payload: { name: \"London\", iconColor: david_icon_color, deleted: false, lat: david_lat, lon: david_lon } };\nvar m2 = { payload: { name: \"Stockhom\", iconColor: walter_icon_color, deleted: false, lat: walter_lat, lon: walter_lon } };\nvar m3 = { payload: { name: \"Boston\", iconColor: paul_icon_color, deleted: false, lat: paul_lat, lon: paul_lon } };\n\nvar m4 = { payload: { name: \"GC1\", deleted: true, color: walter_icon_color, greatcircle: [[walter_lat, walter_lon], [paul_lat, paul_lon]] } };   // Walter to Paul\nvar m5 = { payload: { name: \"GC2\", deleted: true, color: walter_icon_color, greatcircle: [[walter_lat, walter_lon], [david_lat, david_lon]] } }; // Walter to David\n\nvar m6 = { payload: { name: \"GC3\", deleted: false, color: paul_icon_color, greatcircle: [[paul_lat, paul_lon], [walter_lat, walter_lon]] } };     // Paul to Walter\nvar m7 = { payload: { name: \"GC4\", deleted: false, color: paul_icon_color, greatcircle: [[paul_lat, paul_lon], [david_lat, david_lon]] } };     // Paul to David\n\nvar m8 = { payload: { name: \"GC5\", deleted: true, color: david_icon_color, greatcircle: [[david_lat, david_lon], [paul_lat, paul_lon]] } };     // David to Paul\nvar m9 = { payload: { name: \"GC6\", deleted: true, color: david_icon_color, greatcircle: [[david_lat, david_lon], [walter_lat, walter_lon]] } };     // David to Walter\n\nreturn [[m1, m2, m3, m4, m5, m6, m7, m8, m9]];\n\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":670,"y":620,"wires":[["72b76c90f1a8cdd9"]]},{"id":"6d92bf65c1420709","type":"ui_button","z":"7f1f31a2780b86d4","name":"","group":"1e4408fe8754e4bf","order":15,"width":3,"height":1,"passthru":false,"label":"Paul to both","tooltip":"","color":"","bgcolor":"#0000cc","className":"","icon":"","payload":"","payloadType":"str","topic":"topic","topicType":"msg","x":450,"y":620,"wires":[["dd24c26e3ced0d31"]]},{"id":"bd53e92cf92ff6af","type":"function","z":"7f1f31a2780b86d4","name":"David to both","func":"let walter_lat = flow.get(\"walter_lat\");\nlet walter_lon = flow.get(\"walter_lon\");\nlet walter_icon_color = flow.get(\"walter_icon_color\");\n\nlet david_lat = flow.get(\"david_lat\");\nlet david_lon = flow.get(\"david_lon\");\nlet david_icon_color = flow.get(\"david_icon_color\");\n\nlet paul_lat = flow.get(\"paul_lat\");\nlet paul_lon = flow.get(\"paul_lon\");\nlet paul_icon_color = flow.get(\"paul_icon_color\");\n\n\nvar m1 = { payload: { name: \"London\", iconColor: david_icon_color, deleted: false, lat: david_lat, lon: david_lon } };\nvar m2 = { payload: { name: \"Stockhom\", iconColor: walter_icon_color, deleted: false, lat: walter_lat, lon: walter_lon } };\nvar m3 = { payload: { name: \"Boston\", iconColor: paul_icon_color, deleted: false, lat: paul_lat, lon: paul_lon } };\n\nvar m4 = { payload: { name: \"GC1\", deleted: true, color: walter_icon_color, greatcircle: [[walter_lat, walter_lon], [paul_lat, paul_lon]] } };   // Walter to Paul\nvar m5 = { payload: { name: \"GC2\", deleted: true, color: walter_icon_color, greatcircle: [[walter_lat, walter_lon], [david_lat, david_lon]] } }; // Walter to David\n\nvar m6 = { payload: { name: \"GC3\", deleted: true, color: paul_icon_color, greatcircle: [[paul_lat, paul_lon], [walter_lat, walter_lon]] } };     // Paul to Walter\nvar m7 = { payload: { name: \"GC4\", deleted: true, color: paul_icon_color, greatcircle: [[paul_lat, paul_lon], [david_lat, david_lon]] } };     // Paul to David\n\nvar m8 = { payload: { name: \"GC5\", deleted: false, color: david_icon_color, greatcircle: [[david_lat, david_lon], [paul_lat, paul_lon]] } };     // David to Paul\nvar m9 = { payload: { name: \"GC6\", deleted: false, color: david_icon_color, greatcircle: [[david_lat, david_lon], [walter_lat, walter_lon]] } };     // David to Walter\n\nreturn [[m1, m2, m3, m4, m5, m6, m7, m8, m9]];\n\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":680,"y":740,"wires":[["72b76c90f1a8cdd9"]]},{"id":"3807dcbcc8cd6437","type":"ui_button","z":"7f1f31a2780b86d4","name":"","group":"1e4408fe8754e4bf","order":21,"width":3,"height":1,"passthru":false,"label":"David to both","tooltip":"","color":"","bgcolor":"#009900","className":"","icon":"","payload":"","payloadType":"str","topic":"topic","topicType":"msg","x":460,"y":740,"wires":[["bd53e92cf92ff6af"]]},{"id":"a513618a9c7b2e9e","type":"inject","z":"7f1f31a2780b86d4","name":"","props":[{"p":"payload"}],"repeat":"1","crontab":"","once":false,"onceDelay":0.1,"topic":"","payloadType":"date","x":190,"y":860,"wires":[["6c8c595a625015f5"]]},{"id":"6c8c595a625015f5","type":"function","z":"7f1f31a2780b86d4","name":"","func":"let status = flow.get(\"status\") || \"auto\";\n\nif (status == \"auto\") {\n    let counter = flow.get(\"counter\") || 0;\n    if (counter < 9) {\n        counter = counter + 1;\n    }\n    else {\n        counter = 0;\n    }\n    flow.set(\"counter\", counter);\n    msg.payload = counter;\n    return msg;\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":360,"y":860,"wires":[["2a7a1eb624a392b5"]]},{"id":"2a7a1eb624a392b5","type":"switch","z":"7f1f31a2780b86d4","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"0","vt":"num"},{"t":"eq","v":"1","vt":"num"},{"t":"eq","v":"2","vt":"num"},{"t":"eq","v":"3","vt":"num"},{"t":"eq","v":"4","vt":"num"},{"t":"eq","v":"5","vt":"num"},{"t":"eq","v":"6","vt":"num"},{"t":"eq","v":"7","vt":"num"},{"t":"eq","v":"8","vt":"num"},{"t":"eq","v":"9","vt":"num"}],"checkall":"true","repair":false,"outputs":10,"x":510,"y":860,"wires":[["924e54fc54e725f0"],["0b9e8d90eb63da93"],["acd4ac5f2b8e4569"],["11777c28ad18d6e3"],["b8c75c465047cde3"],["02a839f92caa9c2b"],["dd24c26e3ced0d31"],["6aefd3f967e404b9"],["60444167a2d64cf8"],["bd53e92cf92ff6af"]]},{"id":"daf14e38af34c2f1","type":"ui_button","z":"7f1f31a2780b86d4","name":"Status","group":"1e4408fe8754e4bf","order":1,"width":2,"height":1,"passthru":false,"label":"{{label}}","tooltip":"","color":"","bgcolor":"","className":"","icon":"","payload":"1","payloadType":"str","topic":"topic","topicType":"msg","x":830,"y":260,"wires":[["c2d2698b2a0765be"]]},{"id":"c2d2698b2a0765be","type":"function","z":"7f1f31a2780b86d4","name":"","func":"let status = flow.get(\"status\") || \"auto\";\n\nif (status == \"auto\") {\n    status = \"manual\";\n    msg.label = \"Manual\";\n}\nelse {\n    status = \"auto\";\n    msg.label = \"Automatic\";\n}\n\nflow.set(\"status\", status);\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":840,"y":200,"wires":[["daf14e38af34c2f1"]]},{"id":"b2657f1bbc19cfb8","type":"delay","z":"7f1f31a2780b86d4","name":"","pauseType":"delay","timeout":"2","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":660,"y":260,"wires":[["daf14e38af34c2f1"]]},{"id":"0a5c17aeddb8f41f","type":"ui_spacer","z":"7f1f31a2780b86d4","name":"spacer","group":"1e4408fe8754e4bf","order":4,"width":2,"height":1},{"id":"3d391dcc2283b9e0","type":"ui_spacer","z":"7f1f31a2780b86d4","name":"spacer","group":"1e4408fe8754e4bf","order":6,"width":2,"height":1},{"id":"868586b72b40f657","type":"ui_spacer","z":"7f1f31a2780b86d4","name":"spacer","group":"1e4408fe8754e4bf","order":8,"width":2,"height":1},{"id":"abdd5dbfa46d02a0","type":"ui_spacer","z":"7f1f31a2780b86d4","name":"spacer","group":"1e4408fe8754e4bf","order":10,"width":2,"height":1},{"id":"45842fd99fe1161d","type":"ui_spacer","z":"7f1f31a2780b86d4","name":"spacer","group":"1e4408fe8754e4bf","order":12,"width":2,"height":1},{"id":"d8897c7c06ca8191","type":"ui_spacer","z":"7f1f31a2780b86d4","name":"spacer","group":"1e4408fe8754e4bf","order":14,"width":2,"height":1},{"id":"cc66c67d119a39e2","type":"ui_spacer","z":"7f1f31a2780b86d4","name":"spacer","group":"1e4408fe8754e4bf","order":16,"width":2,"height":1},{"id":"ed2fa926994a5b1a","type":"ui_spacer","z":"7f1f31a2780b86d4","name":"spacer","group":"1e4408fe8754e4bf","order":18,"width":2,"height":1},{"id":"3ac15b192e84b97f","type":"ui_spacer","z":"7f1f31a2780b86d4","name":"spacer","group":"1e4408fe8754e4bf","order":20,"width":2,"height":1},{"id":"1e4408fe8754e4bf","type":"ui_group","name":"Main display","tab":"c503638c1498ac3c","order":1,"disp":false,"width":"19","collapse":false,"className":""},{"id":"c503638c1498ac3c","type":"ui_tab","name":"Worldmap_great_circle_demo","icon":"dashboard","order":3,"disabled":false,"hidden":false}]

Great job, it is the perfect base for an antenna rotator.
Also for marking the station during the contest.

1 Like

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