node-red-contrib-web-worldmap 2.23.0 → 2.23.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +28 -0
- package/README.md +4 -19
- package/examples/Convex Hull around points.json +1 -0
- package/examples/Split Map With Swipe.json +1 -112
- package/examples/Trigger reload of data.json +1 -1
- package/package.json +6 -2
- package/worldmap/index3d.html +19 -10
- package/worldmap/leaflet/3dstyle.json +11296 -0
- package/worldmap/worldmap.js +10 -3
- package/worldmap.html +6 -4
- package/worldmap.js +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
### Change Log for Node-RED Worldmap
|
|
2
2
|
|
|
3
|
+
- v2.23.4 - Fix opacity of area borders
|
|
4
|
+
- v2.23.3 - Fix initial load of maps
|
|
5
|
+
- v2.23.2 - Add convex-hull example
|
|
6
|
+
- v2.23.1 - Fix saving of custom map layer
|
|
3
7
|
- v2.23.0 - Give logo and id so it can be overridden by toplogo command. PR #188.
|
|
8
|
+
|
|
4
9
|
- v2.22.3 - Don't show empty popup for geojson object. Issue #186. Add wobble to null island.
|
|
5
10
|
- v2.22.2 - Be more tolerant of speed string types
|
|
6
11
|
- v2.22.0 - Separate out layer events in worldmap in
|
|
12
|
+
|
|
7
13
|
- v2.21.9 - Unbreak Drawing layer that I must have broken recently
|
|
8
14
|
- v2.21.8 - Let SIDC/icon short code be only 4 chars long
|
|
9
15
|
- v2.21.5 - Fix handling of "old" ship nav to ship navigation
|
|
@@ -12,34 +18,47 @@
|
|
|
12
18
|
- v2.21.2 - Expand ship nav to ship navigation.
|
|
13
19
|
- v2.21.1 - Fix ui check callback to not use .
|
|
14
20
|
- v2.21.0 - Let config panel select maps to show, default map and choice of overlays.
|
|
21
|
+
|
|
15
22
|
- v2.20.0 - Add support of .pbf map layers. Issue #123.
|
|
23
|
+
|
|
16
24
|
- v2.19.0 - Bump leaflet to latest. v1.7
|
|
25
|
+
|
|
17
26
|
- v2.18.1 - Let fillOpacity be 0.
|
|
18
27
|
- v2.18.0 - Add bounds event onzoom or drag.
|
|
28
|
+
|
|
19
29
|
- v2.17.3 - Yet more better feedback on clicks, moves.
|
|
20
30
|
- v2.17.2 - Add smallplane icon.
|
|
21
31
|
- v2.17.1 - More complete feedback on click, better popup image sizing.
|
|
32
|
+
|
|
22
33
|
- v2.16.3 - Ensure polygons can be deleted.
|
|
23
34
|
- v2.16.2 - Better handling of unpacked kmz objects.
|
|
24
35
|
- v2.16.0 - Allow specifying custom base map server.
|
|
36
|
+
|
|
25
37
|
- v2.15.8 - Adjust ui check timing for UI worldmap.
|
|
26
38
|
- v2.15.7 - Tidy up geoJson handling a bit more.
|
|
27
39
|
- v2.15.5 - Fix SIDC icons to accept unicoded icons as labels.
|
|
28
40
|
- v2.15.4 - Let clear heatmap command do what it says.
|
|
29
41
|
- v2.15.3 - Fix panit command to work, try to use alt units, popup alignments.
|
|
30
42
|
- v2.15.0 - Let speed be text and specify units if required (kt,kn,knots,mph,kmh,kph) default m/s.
|
|
43
|
+
|
|
31
44
|
- v2.14.0 - Let geojson features be clickable if added as overlay.
|
|
45
|
+
|
|
32
46
|
- v2.13.4 - Fix list of map choices to be in sync. Fix popup auto sizing.
|
|
33
47
|
- v2.13.3 - Fix unchanged layer propagation.
|
|
34
48
|
- v2.13.2 - Add mayflower icon.
|
|
35
49
|
- v2.13.0 - Tidy velocity layer. Feedback any url parameters.
|
|
50
|
+
|
|
36
51
|
- v2.12.1 - Only show online layer options if we are online.
|
|
37
52
|
- v2.12.0 - Add live rainfall radar data layer. Remove some non-loading overlays.
|
|
53
|
+
|
|
38
54
|
- v2.11.2 - Allow thicknesss of arc to be specified by weight
|
|
39
55
|
- v2.11.1 - Better handle KML point info - add popup.
|
|
40
56
|
- v2.11.0 - Add option to smooth tracks using bezier curves.
|
|
57
|
+
|
|
41
58
|
- v2.10.0 - Save latest position to browser for refresh if in iframe/dashboard. Allow fractional Zoom levels.
|
|
59
|
+
|
|
42
60
|
- v2.9.0 - Let weblinks be an array of links. Add more info to readme about Mapservers.
|
|
61
|
+
|
|
43
62
|
- v2.8.9 - Only load cgi module if we have a local mapserv file
|
|
44
63
|
- v2.8.8 - Change length of speed leader to show where you will be in 1 min if speed in m/s
|
|
45
64
|
- v2.8.7 - Delay start of ui widget.
|
|
@@ -49,10 +68,13 @@
|
|
|
49
68
|
- v2.8.2 - Improve direction handling of 3d objects.
|
|
50
69
|
- v2.8.1 - Fix old tracks re-appearing afer hide/show. Issue #135
|
|
51
70
|
- v2.8.0 - Align vector with `track`, prioritise hdg and heading over bearing. Add old location to move action.
|
|
71
|
+
|
|
52
72
|
- v2.7.1 - Also allow geojson files to be dropped, and better png handling
|
|
53
73
|
- v2.7.0 - Allow track and image files to be dragged onto the map, if enabled
|
|
74
|
+
|
|
54
75
|
- v2.6.1 - Better fit for worldmap when in ui_template
|
|
55
76
|
- v2.6.0 - Add route capability to draw line when online
|
|
77
|
+
|
|
56
78
|
- v2.5.9 - Fix handling of multiple hulls, tidy contextmenu handling
|
|
57
79
|
- v2.5.8 - Let node name be the full page map title
|
|
58
80
|
- v2.5.7 - Let fillColor set color of hulls
|
|
@@ -63,8 +85,10 @@
|
|
|
63
85
|
- v2.5.2 - Add boolean parameter to feedback call to allow auto close of popup on click. Set Esc key to close all open popups. Issue #146
|
|
64
86
|
- v2.5.1 - Add lat, lng and layer to feedback function.
|
|
65
87
|
- v2.5.0 - Add minimap capability.
|
|
88
|
+
|
|
66
89
|
- v2.4.2 - Fix editing injected shapes.
|
|
67
90
|
- v2.4.1 - Add convex-hull node for grouping objects.
|
|
91
|
+
|
|
68
92
|
- v2.3.16 - Add heading to default addMarker, allow custom http icon size.
|
|
69
93
|
- v2.3.13 - Fix geoson feature properties fill color, and better marker handling
|
|
70
94
|
- v2.3.11 - Better editing of drawing layer, add OpenTopoMap, and better Esri satellite
|
|
@@ -78,8 +102,10 @@
|
|
|
78
102
|
- v2.3.2 - Add better geojson support - name plus geojson properties
|
|
79
103
|
- v2.3.1 - Stop adding point when you add a circle
|
|
80
104
|
- v2.3.0 - Add colour options for drawing layer
|
|
105
|
+
|
|
81
106
|
- v2.2.1 - Better implementation of legend create/show/hide
|
|
82
107
|
- v2.2.0 - Add range rings and arcs function
|
|
108
|
+
|
|
83
109
|
- v2.1.6 - Add legend command to allow inserting an html legend
|
|
84
110
|
- v2.1.5 - Fix squawk icon color handling
|
|
85
111
|
- v2.1.4 - Fix alt and speed as strings
|
|
@@ -87,6 +113,7 @@
|
|
|
87
113
|
- v2.1.2 - Fix layercontrol remove bug. Issue #116
|
|
88
114
|
- v2.1.1 - Fix bug in repeated add with polygon
|
|
89
115
|
- v2.1.0 - Add ui-worldmap node to make embedding in Dashboard easier. Let -in node specify connection actions only.
|
|
116
|
+
|
|
90
117
|
- v2.0.22 - fix SIDC missing property
|
|
91
118
|
- v2.0.21 - allow adding overlays without making them visible (visible:false). Issue #108
|
|
92
119
|
- v2.0.20 - ensure `fit` option is boolean, Issue #109. Fix track layers, Issue #110.
|
|
@@ -105,6 +132,7 @@
|
|
|
105
132
|
- v2.0.2-beta - Let lines and areas also have popups
|
|
106
133
|
- v2.0.1-beta - Add optional graticule.
|
|
107
134
|
- v2.0.0-beta - Move to leaflet 1.4.x plus all plugins updated
|
|
135
|
+
|
|
108
136
|
- v1.5.40 - Only enable on.location function when not in an iframe. Issue #89. Tidy html.
|
|
109
137
|
- v1.5.39 - Add weather-lite icons
|
|
110
138
|
- v1.5.38 - Add Esri dark grey and ocean, re-add hikebike, layers
|
package/README.md
CHANGED
|
@@ -11,29 +11,14 @@ map web page for plotting "things" on.
|
|
|
11
11
|
|
|
12
12
|
### Updates
|
|
13
13
|
|
|
14
|
+
- v2.23.4 - Fix opacity of area borders
|
|
15
|
+
- v2.23.3 - Fix initial load of maps
|
|
16
|
+
- v2.23.2 - Add convex-hull example
|
|
17
|
+
- v2.23.1 - Fix saving of custom map layer
|
|
14
18
|
- v2.23.0 - Give logo and id so it can be overridden by toplogo command. PR #188.
|
|
15
19
|
- v2.22.3 - Don't show empty popup for geojson object. Issue #186. Add wobble to null island.
|
|
16
20
|
- v2.22.2 - Be more tolerant of speed string types
|
|
17
21
|
- v2.22.0 - Separate out layer events in worldmap in
|
|
18
|
-
- v2.21.9 - Unbreak Drawing layer that I must have broken recently
|
|
19
|
-
- v2.21.8 - Let SIDC/icon short code be only 4 chars long
|
|
20
|
-
- v2.21.5 - Fix handling of "old" ship nav to ship navigation
|
|
21
|
-
- v2.21.4 - Fix speed leader length. Add transparentPixels option..
|
|
22
|
-
- v2.21.3 - Add zoom to bounds action. Adjust map layers max zoom levels.
|
|
23
|
-
- v2.21.2 - Expand ship nav to ship navigation.
|
|
24
|
-
- v2.21.1 - Fix ui check callback to not use .
|
|
25
|
-
- v2.21.0 - Let config panel select maps to show, default map and choice of overlays.
|
|
26
|
-
- v2.20.0 - Add support of .pbf map layers. Issue 123.
|
|
27
|
-
- v2.19.1 - Add filter for bounds events only.
|
|
28
|
-
- v2.19.0 - Bump leaflet to latest. v1.7
|
|
29
|
-
- v2.18.1 - Let fillOpacity be 0.
|
|
30
|
-
- v2.18.0 - Add bounds event onzoom or drag.
|
|
31
|
-
- v2.17.3 - Yet more better feedback on clicks, moves.
|
|
32
|
-
- v2.17.2 - Add smallplane icon.
|
|
33
|
-
- v2.17.1 - More complete feedback on click, better popup image sizing.
|
|
34
|
-
- v2.16.3 - Ensure polygons can be deleted.
|
|
35
|
-
- v2.16.2 - Better handling of unpacked kmz objects.
|
|
36
|
-
- v2.16.0 - Allow specifying custom base map server.
|
|
37
22
|
|
|
38
23
|
- see [CHANGELOG](https://github.com/dceejay/RedMap/blob/master/CHANGELOG.md) for full list of changes.
|
|
39
24
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
[{"id":"a0cdb588.2ba408","type":"inject","z":"fc2b85b48b73e276","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payloadType":"date","x":180,"y":90,"wires":[["d7a5c615.1e6578"]],"l":false},{"id":"d7a5c615.1e6578","type":"function","z":"fc2b85b48b73e276","name":"Add Dave","func":"msg.payload = {\n name:\"Dave\",\n lat:51,\n lon:-1,\n layer:\"foo\"\n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":300,"y":90,"wires":[["4b5f6be5.96c1f4","fd654fbf.7e7db"]]},{"id":"7dcb7d4e.f5faa4","type":"function","z":"fc2b85b48b73e276","name":"Add Bob","func":"msg.payload = {\n name:\"Bob\",\n lat:52,\n lon:-1,\n layer:\"foo\"\n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":300,"y":135,"wires":[["4b5f6be5.96c1f4","fd654fbf.7e7db"]]},{"id":"a498ec44.fde27","type":"function","z":"fc2b85b48b73e276","name":"Add Fred","func":"msg.payload = {\n name:\"Fred\",\n lat:51,\n lon:-2,\n layer:\"foo\"\n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":300,"y":180,"wires":[["4b5f6be5.96c1f4","fd654fbf.7e7db"]]},{"id":"5c92395d.d709f8","type":"function","z":"fc2b85b48b73e276","name":"Add Joe","func":"msg.payload = {\n name:\"Joe\",\n lat:52,\n lon:-2,\n layer:\"foo\",\n iconColor:\"blue\"\n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":300,"y":225,"wires":[["4b5f6be5.96c1f4","fd654fbf.7e7db"]]},{"id":"1836dc1e.3ec894","type":"function","z":"fc2b85b48b73e276","name":"Add Mark","func":"msg.payload = {\n name:\"Mark\",\n lat:51.5,\n lon:-1.5,\n layer:\"foo\",\n iconColor:\"green\"\n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":300,"y":270,"wires":[["4b5f6be5.96c1f4","fd654fbf.7e7db"]]},{"id":"d439a183.9d7ca","type":"function","z":"fc2b85b48b73e276","name":"Add John","func":"msg.payload = {\n name:\"John\",\n lat:50.5,\n lon:-2.5,\n layer:\"foo\",\n iconColor:\"blue\"\n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":300,"y":315,"wires":[["4b5f6be5.96c1f4","fd654fbf.7e7db"]]},{"id":"43bc41e8.0385a","type":"function","z":"fc2b85b48b73e276","name":"Remove Mark","func":"msg.payload = {\n name:\"Mark\",\n layer:\"foo\",\n deleted:true\n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":320,"y":570,"wires":[["fd654fbf.7e7db","4b5f6be5.96c1f4"]]},{"id":"4b5f6be5.96c1f4","type":"worldmap-hull","z":"fc2b85b48b73e276","name":"","prop":"layer","x":595,"y":255,"wires":[["fd654fbf.7e7db"]]},{"id":"fd654fbf.7e7db","type":"worldmap","z":"fc2b85b48b73e276","name":"","lat":"","lon":"","zoom":"8","layer":"OSMG","cluster":"","maxage":"","usermenu":"show","layers":"show","panit":"false","panlock":"false","zoomlock":"false","hiderightclick":"false","coords":"none","showgrid":"false","path":"/worldmap","overlist":"CO","maplist":"OSMG,OSMC,OSMH,EsriC,EsriS,EsriT","mapname":"","mapurl":"","mapopt":"","mapwms":false,"x":600,"y":360,"wires":[]},{"id":"38179d31.94a972","type":"function","z":"fc2b85b48b73e276","name":"Remove Dave","func":"msg.payload = {\n name:\"Dave\",\n layer:\"foo\",\n deleted:true\n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":320,"y":390,"wires":[["4b5f6be5.96c1f4","fd654fbf.7e7db"]]},{"id":"b4ebdd.d201a42","type":"function","z":"fc2b85b48b73e276","name":"Remove Bob","func":"msg.payload = {\n name:\"Bob\",\n layer:\"foo\",\n deleted:true\n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":310,"y":435,"wires":[["4b5f6be5.96c1f4","fd654fbf.7e7db"]]},{"id":"4ab765d5.d63b7c","type":"function","z":"fc2b85b48b73e276","name":"Remove Fred","func":"msg.payload = {\n name:\"Fred\",\n layer:\"foo\",\n deleted:true\n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":320,"y":480,"wires":[["fd654fbf.7e7db","4b5f6be5.96c1f4"]]},{"id":"41fbcbe1.602224","type":"function","z":"fc2b85b48b73e276","name":"Remove Joe","func":"msg.payload = {\n name:\"Joe\",\n layer:\"foo\",\n deleted:true\n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":310,"y":525,"wires":[["4b5f6be5.96c1f4","fd654fbf.7e7db"]]},{"id":"0f4e6585f9afbcd7","type":"inject","z":"fc2b85b48b73e276","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payloadType":"date","x":180,"y":135,"wires":[["7dcb7d4e.f5faa4"]],"l":false},{"id":"6c436bd05eaaa4e3","type":"inject","z":"fc2b85b48b73e276","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payloadType":"date","x":180,"y":180,"wires":[["a498ec44.fde27"]],"l":false},{"id":"e97b916faeca80c5","type":"inject","z":"fc2b85b48b73e276","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payloadType":"date","x":180,"y":225,"wires":[["5c92395d.d709f8"]],"l":false},{"id":"611d3c4798865b0c","type":"inject","z":"fc2b85b48b73e276","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payloadType":"date","x":180,"y":270,"wires":[["1836dc1e.3ec894"]],"l":false},{"id":"3c835edcbc03e15f","type":"inject","z":"fc2b85b48b73e276","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payloadType":"date","x":180,"y":315,"wires":[["d439a183.9d7ca"]],"l":false},{"id":"029fdb18b1447049","type":"inject","z":"fc2b85b48b73e276","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payloadType":"date","x":180,"y":390,"wires":[["38179d31.94a972"]],"l":false},{"id":"9d473630bf56f60d","type":"inject","z":"fc2b85b48b73e276","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payloadType":"date","x":180,"y":435,"wires":[["b4ebdd.d201a42"]],"l":false},{"id":"0efe0d29dc967c6b","type":"inject","z":"fc2b85b48b73e276","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payloadType":"date","x":180,"y":480,"wires":[["4ab765d5.d63b7c"]],"l":false},{"id":"c059eda796d691f4","type":"inject","z":"fc2b85b48b73e276","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payloadType":"date","x":180,"y":525,"wires":[["41fbcbe1.602224"]],"l":false},{"id":"78fe9cfb7d147384","type":"inject","z":"fc2b85b48b73e276","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payloadType":"date","x":180,"y":570,"wires":[["43bc41e8.0385a"]],"l":false},{"id":"26d08e189f6137c0","type":"function","z":"fc2b85b48b73e276","name":"Remove John","func":"msg.payload = {\n name:\"John\",\n layer:\"foo\",\n deleted:true\n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":320,"y":615,"wires":[["fd654fbf.7e7db","4b5f6be5.96c1f4"]]},{"id":"ba88e8b9f69dc254","type":"inject","z":"fc2b85b48b73e276","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payloadType":"date","x":180,"y":615,"wires":[["26d08e189f6137c0"]],"l":false}]
|
|
@@ -1,112 +1 @@
|
|
|
1
|
-
[
|
|
2
|
-
{
|
|
3
|
-
"id": "2e9ce367.acdb9c",
|
|
4
|
-
"type": "worldmap",
|
|
5
|
-
"z": "82738787.0e0338",
|
|
6
|
-
"name": "",
|
|
7
|
-
"lat": "",
|
|
8
|
-
"lon": "",
|
|
9
|
-
"zoom": "8",
|
|
10
|
-
"layer": "OSM",
|
|
11
|
-
"cluster": "0",
|
|
12
|
-
"maxage": "",
|
|
13
|
-
"usermenu": "show",
|
|
14
|
-
"layers": "show",
|
|
15
|
-
"panit": "false",
|
|
16
|
-
"path": "/worldmap",
|
|
17
|
-
"x": 580,
|
|
18
|
-
"y": 920,
|
|
19
|
-
"wires": []
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
"id": "8d0f8d4c.3cd21",
|
|
23
|
-
"type": "function",
|
|
24
|
-
"z": "82738787.0e0338",
|
|
25
|
-
"name": "remove split",
|
|
26
|
-
"func": "msg.payload = {command:{side:\"none\"}};\nreturn msg;",
|
|
27
|
-
"outputs": 1,
|
|
28
|
-
"noerr": 0,
|
|
29
|
-
"x": 390,
|
|
30
|
-
"y": 980,
|
|
31
|
-
"wires": [
|
|
32
|
-
[
|
|
33
|
-
"2e9ce367.acdb9c"
|
|
34
|
-
]
|
|
35
|
-
]
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
"id": "311acf75.93ff8",
|
|
39
|
-
"type": "function",
|
|
40
|
-
"z": "82738787.0e0338",
|
|
41
|
-
"name": "Satellite",
|
|
42
|
-
"func": "msg.payload = {\n command:{\n side: \"Esri Satellite\", \n split: 66,\n showlayer: \"roads\"\n }\n};\nreturn msg;",
|
|
43
|
-
"outputs": 1,
|
|
44
|
-
"noerr": 0,
|
|
45
|
-
"x": 400,
|
|
46
|
-
"y": 920,
|
|
47
|
-
"wires": [
|
|
48
|
-
[
|
|
49
|
-
"2e9ce367.acdb9c"
|
|
50
|
-
]
|
|
51
|
-
]
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
"id": "eaea1a90.f27b98",
|
|
55
|
-
"type": "worldmap in",
|
|
56
|
-
"z": "82738787.0e0338",
|
|
57
|
-
"name": "",
|
|
58
|
-
"path": "/worldmap",
|
|
59
|
-
"x": 100,
|
|
60
|
-
"y": 920,
|
|
61
|
-
"wires": [
|
|
62
|
-
[
|
|
63
|
-
"4540d879.244f88"
|
|
64
|
-
]
|
|
65
|
-
]
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
"id": "4540d879.244f88",
|
|
69
|
-
"type": "switch",
|
|
70
|
-
"z": "82738787.0e0338",
|
|
71
|
-
"name": "",
|
|
72
|
-
"property": "payload.action",
|
|
73
|
-
"propertyType": "msg",
|
|
74
|
-
"rules": [
|
|
75
|
-
{
|
|
76
|
-
"t": "eq",
|
|
77
|
-
"v": "connected",
|
|
78
|
-
"vt": "str"
|
|
79
|
-
}
|
|
80
|
-
],
|
|
81
|
-
"checkall": "true",
|
|
82
|
-
"repair": false,
|
|
83
|
-
"outputs": 1,
|
|
84
|
-
"x": 250,
|
|
85
|
-
"y": 920,
|
|
86
|
-
"wires": [
|
|
87
|
-
[
|
|
88
|
-
"311acf75.93ff8"
|
|
89
|
-
]
|
|
90
|
-
]
|
|
91
|
-
},
|
|
92
|
-
{
|
|
93
|
-
"id": "f77366dc.818138",
|
|
94
|
-
"type": "inject",
|
|
95
|
-
"z": "82738787.0e0338",
|
|
96
|
-
"name": "",
|
|
97
|
-
"topic": "",
|
|
98
|
-
"payload": "",
|
|
99
|
-
"payloadType": "str",
|
|
100
|
-
"repeat": "",
|
|
101
|
-
"crontab": "",
|
|
102
|
-
"once": false,
|
|
103
|
-
"onceDelay": 0.1,
|
|
104
|
-
"x": 110,
|
|
105
|
-
"y": 980,
|
|
106
|
-
"wires": [
|
|
107
|
-
[
|
|
108
|
-
"8d0f8d4c.3cd21"
|
|
109
|
-
]
|
|
110
|
-
]
|
|
111
|
-
}
|
|
112
|
-
]
|
|
1
|
+
[{"id":"2e9ce367.acdb9c","type":"worldmap","z":"e956b3364e3ffca6","name":"","lat":"","lon":"","zoom":"8","layer":"OSMG","cluster":"0","maxage":"","usermenu":"show","layers":"show","panit":"false","hiderightclick":"false","coords":"none","path":"/worldmap","overlist":"CO","maplist":"OSMG,OSMC,OSMH,EsriC,EsriS,EsriT,EsriO","mapname":"","mapurl":"","mapopt":"","mapwms":false,"x":570,"y":600,"wires":[]},{"id":"8d0f8d4c.3cd21","type":"function","z":"e956b3364e3ffca6","name":"remove split","func":"msg.payload = {command:{side:\"none\"}};\nreturn msg;","outputs":1,"noerr":0,"x":380,"y":660,"wires":[["2e9ce367.acdb9c"]]},{"id":"311acf75.93ff8","type":"function","z":"e956b3364e3ffca6","name":"Satellite","func":"msg.payload = {\n command:{\n side: \"Esri Satellite\", \n split: 66,\n showlayer: \"roads\"\n }\n};\nreturn msg;","outputs":1,"noerr":0,"x":390,"y":600,"wires":[["2e9ce367.acdb9c"]]},{"id":"eaea1a90.f27b98","type":"worldmap in","z":"e956b3364e3ffca6","name":"","path":"/worldmap","events":"connect","x":90,"y":600,"wires":[["4540d879.244f88"]]},{"id":"4540d879.244f88","type":"switch","z":"e956b3364e3ffca6","name":"","property":"payload.action","propertyType":"msg","rules":[{"t":"eq","v":"connected","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":240,"y":600,"wires":[["311acf75.93ff8"]]},{"id":"f77366dc.818138","type":"inject","z":"e956b3364e3ffca6","name":"","repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"str","x":100,"y":660,"wires":[["8d0f8d4c.3cd21"]]}]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"id":"62ae3b3c.8de704","type":"worldmap in","z":"
|
|
1
|
+
[{"id":"62ae3b3c.8de704","type":"worldmap in","z":"e956b3364e3ffca6","name":"","path":"/worldmap","events":"connect","x":165,"y":630,"wires":[["2eadb3d5.d063ec","259809c4.43edf6"]]},{"id":"2eadb3d5.d063ec","type":"debug","z":"e956b3364e3ffca6","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":335,"y":590,"wires":[]},{"id":"259809c4.43edf6","type":"switch","z":"e956b3364e3ffca6","name":"","property":"payload.action","propertyType":"msg","rules":[{"t":"eq","v":"connected","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":335,"y":630,"wires":[[]]},{"id":"13a00ba8.dcc8e4","type":"comment","z":"e956b3364e3ffca6","name":"Reload trigger","info":"The output from the switch will fire whenever a browser connects (or reconnects).\n\nThis can be used to retrieve stored datapoints and resend them to the map, as by default the main does not retain any sata between refreshes.\n\nThe debug node will show other properties that may be useful to trigger other actions.\n","x":175,"y":590,"wires":[]}]
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-red-contrib-web-worldmap",
|
|
3
|
-
"version": "2.23.
|
|
3
|
+
"version": "2.23.4",
|
|
4
4
|
"description": "A Node-RED node to provide a web page of a world map for plotting things on.",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@turf/bezier-spline": "~6.5.0",
|
|
@@ -27,6 +27,7 @@
|
|
|
27
27
|
"world"
|
|
28
28
|
],
|
|
29
29
|
"node-red": {
|
|
30
|
+
"version": ">=1.0.0",
|
|
30
31
|
"nodes": {
|
|
31
32
|
"worldmap": "worldmap.js"
|
|
32
33
|
}
|
|
@@ -38,5 +39,8 @@
|
|
|
38
39
|
},
|
|
39
40
|
"contributors": [
|
|
40
41
|
"@HiroyasuNishiyama"
|
|
41
|
-
]
|
|
42
|
+
],
|
|
43
|
+
"engines": {
|
|
44
|
+
"node": ">=10"
|
|
45
|
+
}
|
|
42
46
|
}
|
package/worldmap/index3d.html
CHANGED
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
<meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no'/>
|
|
7
7
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
8
8
|
<script src="leaflet/sockjs.min.js"></script>
|
|
9
|
-
<script src='https://api.tiles.mapbox.com/mapbox-gl-js/
|
|
10
|
-
<link href='https://api.tiles.mapbox.com/mapbox-gl-js/
|
|
9
|
+
<script src='https://api.tiles.mapbox.com/mapbox-gl-js/v2.6.1/mapbox-gl.js'></script>
|
|
10
|
+
<link href='https://api.tiles.mapbox.com/mapbox-gl-js/v2.6.1/mapbox-gl.css' rel='stylesheet'/>
|
|
11
11
|
<style>
|
|
12
12
|
body { margin:0; padding:0; }
|
|
13
13
|
#map { position:absolute; top:0; bottom:0; width:100%; }
|
|
@@ -17,11 +17,21 @@
|
|
|
17
17
|
<div id='map'></div>
|
|
18
18
|
<script>
|
|
19
19
|
|
|
20
|
-
//
|
|
21
|
-
|
|
22
|
-
//
|
|
20
|
+
// TO MAKE THE MAP APPEAR YOU MUST ADD YOUR ACCESS TOKEN FROM https://account.mapbox.com
|
|
21
|
+
mapboxgl.accessToken = '';
|
|
22
|
+
//mapboxgl.accessToken = 'pk.eyJ1IjoiZGNlZWpheSIsImEiOiJjaml1aDR6ejQwMml0M3dtdGFlbmEyZHVpIn0.3aD-974hxir335vuLjHOSg';
|
|
23
|
+
mapboxgl.accessToken = 'pk.eyJ1Ijoib3NtYnVpbGRpbmdzIiwiYSI6IjNldU0tNDAifQ.c5EU_3V8b87xO24tuWil0w';
|
|
24
|
+
// if (process.env.MAPBOXGL_TOKEN) {
|
|
25
|
+
// mapboxgl.accessToken = process.env.MAPBOXGL_TOKEN
|
|
26
|
+
// }
|
|
23
27
|
|
|
24
|
-
|
|
28
|
+
if (mapboxgl.accessToken === "") {
|
|
29
|
+
alert("To make the map apperar you must add your Access Token from https://account.mapbox.com")
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
var mbstyle = 'mapbox://styles/mapbox/streets-v10';
|
|
33
|
+
// var mbstyle = 'mapbox://styles/mapbox/light-v10';
|
|
34
|
+
// var mbstyle = 'https://data.osmbuildings.org/0.2/anonymous/style.json';
|
|
25
35
|
|
|
26
36
|
var map = new mapboxgl.Map({
|
|
27
37
|
container: 'map',
|
|
@@ -35,7 +45,6 @@ var map = new mapboxgl.Map({
|
|
|
35
45
|
|
|
36
46
|
var people = {};
|
|
37
47
|
|
|
38
|
-
|
|
39
48
|
map.on('load', function() {
|
|
40
49
|
|
|
41
50
|
var layers = map.getStyle().layers;
|
|
@@ -65,7 +74,7 @@ map.on('load', function() {
|
|
|
65
74
|
"interpolate", ["linear"], ["zoom"],
|
|
66
75
|
15, 0, 15.05, ["get", "min_height"]
|
|
67
76
|
],
|
|
68
|
-
'fill-extrusion-opacity': .
|
|
77
|
+
'fill-extrusion-opacity': .4
|
|
69
78
|
}
|
|
70
79
|
}, firstSymbolId);
|
|
71
80
|
|
|
@@ -199,8 +208,8 @@ map.on('load', function() {
|
|
|
199
208
|
//console.log({p},{t},{fac},{base},{tall});
|
|
200
209
|
var sin = 1;
|
|
201
210
|
var cos = 0;
|
|
202
|
-
p.hdg = p.hdg || p.heading;
|
|
203
|
-
if (p.hasOwnProperty("hdg")) {
|
|
211
|
+
p.hdg = Number(p.hdg || p.heading);
|
|
212
|
+
if (p.hasOwnProperty("hdg") && !isNaN(p.hdg)) {
|
|
204
213
|
sin = Math.sin((90 - p.hdg) * Math.PI / 180);
|
|
205
214
|
cos = Math.cos((90 - p.hdg) * Math.PI / 180);
|
|
206
215
|
}
|