Skip to content

Commit cab4ecd

Browse files
committed
Fix 2525D flag handling to be much cleaner
and add example, bump package
1 parent 350a5da commit cab4ecd

File tree

6 files changed

+35
-30
lines changed

6 files changed

+35
-30
lines changed

β€ŽCHANGELOG.mdβ€Ž

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
### Change Log for Node-RED Worldmap
22

3+
- v5.0.8 - Fix flag handling for SIDC 2525D, add example.
34
- v5.0.7 - Allow Tooltip options (see new example). #PR295.
45
- v5.0.6 - Tweak SIDC flag handling slightly to show direction if available and moving.
56
- v5.0.4 - Tweak CoT handling slightly.

β€ŽREADME.mdβ€Ž

Lines changed: 30 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -13,33 +13,34 @@ Feel free to [![](https://img.shields.io/static/v1?label=Sponsor&message=%E2%9D%
1313

1414
### Updates
1515

16-
- v5.0.7 - Allow Tooltip options (see new example). #PR295.
17-
- v5.0.6 - Tweak SIDC flag handling slightly to show direction if available and moving.
18-
- v5.0.4 - Tweak CoT handling slightly.
19-
- v5.0.3 - Add great context menu example flow. PR#290. Bump express lib. PR#291.
20-
- v5.0.2 - Fix sidcEdgeIcon docs PR#289.
21-
- v5.0.1 - Fix isArray error PR #288.
22-
- v5.0.0 - v5.0.0 - Feedback cleanup PR#281, edgeicons option PR#287, bump libs for vuln fixes.
23-
- v4.9.0 - If payload.flag is two char ISO code replace it with flag emoji. Revert part of PR #271
24-
- v4.8.1 - Slight tidy of some of the geojson handling
25-
- v4.8.0 - Merged PR for feedback functionality cleanup and example. PR #271 and #272
26-
- v4.7.0 - Update pmtiles library, fix feedback function inconsistency. Issue #270
27-
- v4.6.5 - Let geojson allow for generic overrides with .icon and .layer.
28-
- v4.6.4 - Fix deletion of layers logic to actually fully remove points.
29-
- v4.6.3 - Fix sending of layer events when not wanted. Issue #262
30-
- v4.6.2 - Fix multiple use of contextmenu feedback. Issue #259
31-
- v4.6.1 - Let default pmtiles be light/dark or monocolored.
32-
- v4.5.2 - Tidy up when pmtiles removed.
33-
- v4.5.0 - Fix pmtiles to look for maps in userdir rather than modules
34-
- v4.4.0 - Add quad(copter) drone icon.
35-
- v4.3.3 - Fix for objects changing layers.
36-
- v4.3.2 - Fix geojson popup missing label name.
37-
- v4.3.1 - Small fix to icon transparency, and routing detail.
38-
- v4.3.0 - Add support for PMtiles files.
39-
- v4.2.1 - Revert use of optional chaining to extend life slightly. Issue #252
40-
- v4.2.0 - Let icons also be inline images data:image...
41-
- v4.1.0 - Add optional SOG, COG, altft, altm input properties.
42-
- v4.0.0 - Breaking - Better context menu variable substitution and retention
16+
- v5.0.8 - Fix flag handling for SIDC 2525D, add example.
17+
- v5.0.7 - Allow Tooltip options (see new example). #PR295.
18+
- v5.0.6 - Tweak SIDC flag handling slightly to show direction if available and moving.
19+
- v5.0.4 - Tweak CoT handling slightly.
20+
- v5.0.3 - Add great context menu example flow. PR#290. Bump express lib. PR#291.
21+
- v5.0.2 - Fix sidcEdgeIcon docs PR#289.
22+
- v5.0.1 - Fix isArray error PR #288.
23+
- v5.0.0 - v5.0.0 - Feedback cleanup PR#281, edgeicons option PR#287, bump libs for vuln fixes.
24+
- v4.9.0 - If payload.flag is two char ISO code replace it with flag emoji. Revert part of PR #271
25+
- v4.8.1 - Slight tidy of some of the geojson handling
26+
- v4.8.0 - Merged PR for feedback functionality cleanup and example. PR #271 and #272
27+
- v4.7.0 - Update pmtiles library, fix feedback function inconsistency. Issue #270
28+
- v4.6.5 - Let geojson allow for generic overrides with .icon and .layer.
29+
- v4.6.4 - Fix deletion of layers logic to actually fully remove points.
30+
- v4.6.3 - Fix sending of layer events when not wanted. Issue #262
31+
- v4.6.2 - Fix multiple use of contextmenu feedback. Issue #259
32+
- v4.6.1 - Let default pmtiles be light/dark or monocolored.
33+
- v4.5.2 - Tidy up when pmtiles removed.
34+
- v4.5.0 - Fix pmtiles to look for maps in userdir rather than modules
35+
- v4.4.0 - Add quad(copter) drone icon.
36+
- v4.3.3 - Fix for objects changing layers.
37+
- v4.3.2 - Fix geojson popup missing label name.
38+
- v4.3.1 - Small fix to icon transparency, and routing detail.
39+
- v4.3.0 - Add support for PMtiles files.
40+
- v4.2.1 - Revert use of optional chaining to extend life slightly. Issue #252
41+
- v4.2.0 - Let icons also be inline images data:image...
42+
- v4.1.0 - Add optional SOG, COG, altft, altm input properties.
43+
- v4.0.0 - Breaking - Better context menu variable substitution and retention
4344
Now uses ${name} syntax rather than $name so we can handle user defined variables in context menus.
4445

4546
- see [CHANGELOG](https://github.com/dceejay/RedMap/blob/master/CHANGELOG.md) for full list of changes.
@@ -146,6 +147,8 @@ There are lots of extra options you can specify as `msg.payload.options` - see t
146147

147148
Note: If the SIDC code is a 2525C 15 characters long, where chars 13 and 14 are a country code - then the country flag emoji is added to the staffComments field of the icon. If it's a 20 char 2525D code then the options:country property will be used to create the flag.
148149

150+
Note: Not all browsers/OS support unicode emoji - if you can see the Swiss flag here (πŸ‡¨πŸ‡­) then you may be OK.
151+
149152
#### TAK Visualisation
150153

151154
Users of [TAK](https://tak.gov) can use the [TAK ingest node](https://flows.nodered.org/node/node-red-contrib-tak-registration) to create a JSON formatted TAK event object, received from a TAK server. This can be fed directly into the worldmap node.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
[{"id":"2e5fb67b7383373a","type":"worldmap","z":"51335a8bc38f387c","name":"","lat":"","lon":"","zoom":"","layer":"","cluster":"","maxage":"","usermenu":"show","layers":"show","panit":"false","panlock":"false","zoomlock":"false","hiderightclick":"false","coords":"false","showgrid":"false","showruler":"false","allowFileDrop":"false","path":"/worldmap","overlist":"DR,CO,RA,DN","maplist":"OSMG,OSMC,EsriC,EsriS,UKOS","mapname":"","mapurl":"","mapopt":"","mapwms":false,"x":740,"y":120,"wires":[]},{"id":"a43cf3b6fb5c779a","type":"inject","z":"51335a8bc38f387c","name":"","props":[],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":290,"y":120,"wires":[["814986215a0adc67"]]},{"id":"814986215a0adc67","type":"function","z":"51335a8bc38f387c","name":"2525C with country","func":"msg.payload = {\n name: \"Dave\",\n lat: 51.0,\n lon: -1.20,\n SIDC: \"SFAPC-------GBR\",\n options:{\n staffComments: \"Comment A\",\n direction:220,\n speed:\"111\",\n targetNumber:\"AB1234\",\n additionalInformation:\"some more info\",\n commonIdentifier:\"Hawk\",\n type:\"Some Type\"\n }\n}\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":490,"y":120,"wires":[["2e5fb67b7383373a"]]},{"id":"22188e4b94786964","type":"inject","z":"51335a8bc38f387c","name":"","props":[],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":290,"y":180,"wires":[["b33a82ee22d45a25"]]},{"id":"b33a82ee22d45a25","type":"function","z":"51335a8bc38f387c","name":"2525D with flag","func":"msg.payload = {\n name: \"Jon\",\n lat: 51.1,\n lon: -1.20,\n SIDC: \"10061500351105000000\",\n flag: \"DE\",\n options: {\n staffComments: \"Comment B\",\n direction: 300,\n speed: \"110\",\n additionalInformation: \"some more info\",\n }\n}\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":480,"y":180,"wires":[["2e5fb67b7383373a"]]},{"id":"a505c3cbe0ae507a","type":"inject","z":"51335a8bc38f387c","name":"","props":[],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":290,"y":240,"wires":[["a75fc8cb90ab6b1b"]]},{"id":"a75fc8cb90ab6b1b","type":"function","z":"51335a8bc38f387c","name":"2525D with country","func":"msg.payload = {\n name: \"Mike\",\n lat: 51.0,\n lon: -1.50,\n SIDC: \"10032700000000000000\",\n options: {\n staffComments: \"Comment C\",\n direction: 120,\n country: \"FR\",\n additionalInformation: \"yet more info\",\n }\n}\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":490,"y":240,"wires":[["2e5fb67b7383373a"]]},{"id":"84429b6fce72a6e1","type":"inject","z":"51335a8bc38f387c","name":"","props":[],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":290,"y":60,"wires":[["374f2d903bb3dc01"]]},{"id":"374f2d903bb3dc01","type":"function","z":"51335a8bc38f387c","name":"2525C with flag","func":"msg.payload = {\n name: \"Joe\",\n lat: 51.1,\n lon: -1.5,\n SIDC: \"SUGPUCATM---\",\n flag: \"CH\",\n options:{\n staffComments: \"Comment D\",\n direction:60,\n speed:\"111\"\n }\n}\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":480,"y":60,"wires":[["2e5fb67b7383373a"]]}]

β€Žpackage-lock.jsonβ€Ž

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

β€Žpackage.jsonβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "node-red-contrib-web-worldmap",
3-
"version": "5.0.7",
3+
"version": "5.0.8",
44
"description": "A Node-RED node to provide a web page of a world map for plotting things on.",
55
"dependencies": {
66
"@turf/bezier-spline": "~7.1.0",

0 commit comments

Comments
Β (0)