node-red-contrib-web-worldmap 2.23.1 → 2.23.5
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 +9 -22
- 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/worldmap.js +13 -3
- package/worldmap.js +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
### Change Log for Node-RED Worldmap
|
|
2
2
|
|
|
3
|
+
- v2.23.5 - Fix addtoheatmap. Issue #192
|
|
4
|
+
- v2.23.4 - Fix opacity of area borders
|
|
5
|
+
- v2.23.3 - Fix initial load of maps
|
|
6
|
+
- v2.23.2 - Add convex-hull example
|
|
3
7
|
- v2.23.1 - Fix saving of custom map layer
|
|
4
8
|
- v2.23.0 - Give logo and id so it can be overridden by toplogo command. PR #188.
|
|
9
|
+
|
|
5
10
|
- v2.22.3 - Don't show empty popup for geojson object. Issue #186. Add wobble to null island.
|
|
6
11
|
- v2.22.2 - Be more tolerant of speed string types
|
|
7
12
|
- v2.22.0 - Separate out layer events in worldmap in
|
|
13
|
+
|
|
8
14
|
- v2.21.9 - Unbreak Drawing layer that I must have broken recently
|
|
9
15
|
- v2.21.8 - Let SIDC/icon short code be only 4 chars long
|
|
10
16
|
- v2.21.5 - Fix handling of "old" ship nav to ship navigation
|
|
@@ -13,34 +19,47 @@
|
|
|
13
19
|
- v2.21.2 - Expand ship nav to ship navigation.
|
|
14
20
|
- v2.21.1 - Fix ui check callback to not use .
|
|
15
21
|
- v2.21.0 - Let config panel select maps to show, default map and choice of overlays.
|
|
22
|
+
|
|
16
23
|
- v2.20.0 - Add support of .pbf map layers. Issue #123.
|
|
24
|
+
|
|
17
25
|
- v2.19.0 - Bump leaflet to latest. v1.7
|
|
26
|
+
|
|
18
27
|
- v2.18.1 - Let fillOpacity be 0.
|
|
19
28
|
- v2.18.0 - Add bounds event onzoom or drag.
|
|
29
|
+
|
|
20
30
|
- v2.17.3 - Yet more better feedback on clicks, moves.
|
|
21
31
|
- v2.17.2 - Add smallplane icon.
|
|
22
32
|
- v2.17.1 - More complete feedback on click, better popup image sizing.
|
|
33
|
+
|
|
23
34
|
- v2.16.3 - Ensure polygons can be deleted.
|
|
24
35
|
- v2.16.2 - Better handling of unpacked kmz objects.
|
|
25
36
|
- v2.16.0 - Allow specifying custom base map server.
|
|
37
|
+
|
|
26
38
|
- v2.15.8 - Adjust ui check timing for UI worldmap.
|
|
27
39
|
- v2.15.7 - Tidy up geoJson handling a bit more.
|
|
28
40
|
- v2.15.5 - Fix SIDC icons to accept unicoded icons as labels.
|
|
29
41
|
- v2.15.4 - Let clear heatmap command do what it says.
|
|
30
42
|
- v2.15.3 - Fix panit command to work, try to use alt units, popup alignments.
|
|
31
43
|
- v2.15.0 - Let speed be text and specify units if required (kt,kn,knots,mph,kmh,kph) default m/s.
|
|
44
|
+
|
|
32
45
|
- v2.14.0 - Let geojson features be clickable if added as overlay.
|
|
46
|
+
|
|
33
47
|
- v2.13.4 - Fix list of map choices to be in sync. Fix popup auto sizing.
|
|
34
48
|
- v2.13.3 - Fix unchanged layer propagation.
|
|
35
49
|
- v2.13.2 - Add mayflower icon.
|
|
36
50
|
- v2.13.0 - Tidy velocity layer. Feedback any url parameters.
|
|
51
|
+
|
|
37
52
|
- v2.12.1 - Only show online layer options if we are online.
|
|
38
53
|
- v2.12.0 - Add live rainfall radar data layer. Remove some non-loading overlays.
|
|
54
|
+
|
|
39
55
|
- v2.11.2 - Allow thicknesss of arc to be specified by weight
|
|
40
56
|
- v2.11.1 - Better handle KML point info - add popup.
|
|
41
57
|
- v2.11.0 - Add option to smooth tracks using bezier curves.
|
|
58
|
+
|
|
42
59
|
- v2.10.0 - Save latest position to browser for refresh if in iframe/dashboard. Allow fractional Zoom levels.
|
|
60
|
+
|
|
43
61
|
- v2.9.0 - Let weblinks be an array of links. Add more info to readme about Mapservers.
|
|
62
|
+
|
|
44
63
|
- v2.8.9 - Only load cgi module if we have a local mapserv file
|
|
45
64
|
- v2.8.8 - Change length of speed leader to show where you will be in 1 min if speed in m/s
|
|
46
65
|
- v2.8.7 - Delay start of ui widget.
|
|
@@ -50,10 +69,13 @@
|
|
|
50
69
|
- v2.8.2 - Improve direction handling of 3d objects.
|
|
51
70
|
- v2.8.1 - Fix old tracks re-appearing afer hide/show. Issue #135
|
|
52
71
|
- v2.8.0 - Align vector with `track`, prioritise hdg and heading over bearing. Add old location to move action.
|
|
72
|
+
|
|
53
73
|
- v2.7.1 - Also allow geojson files to be dropped, and better png handling
|
|
54
74
|
- v2.7.0 - Allow track and image files to be dragged onto the map, if enabled
|
|
75
|
+
|
|
55
76
|
- v2.6.1 - Better fit for worldmap when in ui_template
|
|
56
77
|
- v2.6.0 - Add route capability to draw line when online
|
|
78
|
+
|
|
57
79
|
- v2.5.9 - Fix handling of multiple hulls, tidy contextmenu handling
|
|
58
80
|
- v2.5.8 - Let node name be the full page map title
|
|
59
81
|
- v2.5.7 - Let fillColor set color of hulls
|
|
@@ -64,8 +86,10 @@
|
|
|
64
86
|
- 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
|
|
65
87
|
- v2.5.1 - Add lat, lng and layer to feedback function.
|
|
66
88
|
- v2.5.0 - Add minimap capability.
|
|
89
|
+
|
|
67
90
|
- v2.4.2 - Fix editing injected shapes.
|
|
68
91
|
- v2.4.1 - Add convex-hull node for grouping objects.
|
|
92
|
+
|
|
69
93
|
- v2.3.16 - Add heading to default addMarker, allow custom http icon size.
|
|
70
94
|
- v2.3.13 - Fix geoson feature properties fill color, and better marker handling
|
|
71
95
|
- v2.3.11 - Better editing of drawing layer, add OpenTopoMap, and better Esri satellite
|
|
@@ -79,8 +103,10 @@
|
|
|
79
103
|
- v2.3.2 - Add better geojson support - name plus geojson properties
|
|
80
104
|
- v2.3.1 - Stop adding point when you add a circle
|
|
81
105
|
- v2.3.0 - Add colour options for drawing layer
|
|
106
|
+
|
|
82
107
|
- v2.2.1 - Better implementation of legend create/show/hide
|
|
83
108
|
- v2.2.0 - Add range rings and arcs function
|
|
109
|
+
|
|
84
110
|
- v2.1.6 - Add legend command to allow inserting an html legend
|
|
85
111
|
- v2.1.5 - Fix squawk icon color handling
|
|
86
112
|
- v2.1.4 - Fix alt and speed as strings
|
|
@@ -88,6 +114,7 @@
|
|
|
88
114
|
- v2.1.2 - Fix layercontrol remove bug. Issue #116
|
|
89
115
|
- v2.1.1 - Fix bug in repeated add with polygon
|
|
90
116
|
- v2.1.0 - Add ui-worldmap node to make embedding in Dashboard easier. Let -in node specify connection actions only.
|
|
117
|
+
|
|
91
118
|
- v2.0.22 - fix SIDC missing property
|
|
92
119
|
- v2.0.21 - allow adding overlays without making them visible (visible:false). Issue #108
|
|
93
120
|
- v2.0.20 - ensure `fit` option is boolean, Issue #109. Fix track layers, Issue #110.
|
|
@@ -106,6 +133,7 @@
|
|
|
106
133
|
- v2.0.2-beta - Let lines and areas also have popups
|
|
107
134
|
- v2.0.1-beta - Add optional graticule.
|
|
108
135
|
- v2.0.0-beta - Move to leaflet 1.4.x plus all plugins updated
|
|
136
|
+
|
|
109
137
|
- v1.5.40 - Only enable on.location function when not in an iframe. Issue #89. Tidy html.
|
|
110
138
|
- v1.5.39 - Add weather-lite icons
|
|
111
139
|
- v1.5.38 - Add Esri dark grey and ocean, re-add hikebike, layers
|
package/README.md
CHANGED
|
@@ -11,30 +11,15 @@ map web page for plotting "things" on.
|
|
|
11
11
|
|
|
12
12
|
### Updates
|
|
13
13
|
|
|
14
|
+
- v2.23.5 - Fix addtoheatmap. Issue #192
|
|
15
|
+
- v2.23.4 - Fix opacity of area borders
|
|
16
|
+
- v2.23.3 - Fix initial load of maps
|
|
17
|
+
- v2.23.2 - Add convex-hull example
|
|
14
18
|
- v2.23.1 - Fix saving of custom map layer
|
|
15
19
|
- v2.23.0 - Give logo and id so it can be overridden by toplogo command. PR #188.
|
|
16
20
|
- v2.22.3 - Don't show empty popup for geojson object. Issue #186. Add wobble to null island.
|
|
17
21
|
- v2.22.2 - Be more tolerant of speed string types
|
|
18
22
|
- v2.22.0 - Separate out layer events in worldmap in
|
|
19
|
-
- v2.21.9 - Unbreak Drawing layer that I must have broken recently
|
|
20
|
-
- v2.21.8 - Let SIDC/icon short code be only 4 chars long
|
|
21
|
-
- v2.21.5 - Fix handling of "old" ship nav to ship navigation
|
|
22
|
-
- v2.21.4 - Fix speed leader length. Add transparentPixels option..
|
|
23
|
-
- v2.21.3 - Add zoom to bounds action. Adjust map layers max zoom levels.
|
|
24
|
-
- v2.21.2 - Expand ship nav to ship navigation.
|
|
25
|
-
- v2.21.1 - Fix ui check callback to not use .
|
|
26
|
-
- v2.21.0 - Let config panel select maps to show, default map and choice of overlays.
|
|
27
|
-
- v2.20.0 - Add support of .pbf map layers. Issue 123.
|
|
28
|
-
- v2.19.1 - Add filter for bounds events only.
|
|
29
|
-
- v2.19.0 - Bump leaflet to latest. v1.7
|
|
30
|
-
- v2.18.1 - Let fillOpacity be 0.
|
|
31
|
-
- v2.18.0 - Add bounds event onzoom or drag.
|
|
32
|
-
- v2.17.3 - Yet more better feedback on clicks, moves.
|
|
33
|
-
- v2.17.2 - Add smallplane icon.
|
|
34
|
-
- v2.17.1 - More complete feedback on click, better popup image sizing.
|
|
35
|
-
- v2.16.3 - Ensure polygons can be deleted.
|
|
36
|
-
- v2.16.2 - Better handling of unpacked kmz objects.
|
|
37
|
-
- v2.16.0 - Allow specifying custom base map server.
|
|
38
23
|
|
|
39
24
|
- see [CHANGELOG](https://github.com/dceejay/RedMap/blob/master/CHANGELOG.md) for full list of changes.
|
|
40
25
|
|
|
@@ -143,6 +128,7 @@ then rather than draw a point and icon it draws the polygon. If the "area" array
|
|
|
143
128
|
elements, then it assumes this is a bounding box for a rectangle and draws a rectangle.
|
|
144
129
|
|
|
145
130
|
Likewise if it contains a **line** property it will draw the polyline.
|
|
131
|
+
If the payload also includes a property `fit:true` the map will zoom to fit the line or area.
|
|
146
132
|
|
|
147
133
|
There are extra optional properties you can specify - see Options below.
|
|
148
134
|
|
|
@@ -246,14 +232,15 @@ Areas, Rectangles, Lines, Circles and Ellipses can also specify more optional pr
|
|
|
246
232
|
|
|
247
233
|
- **layer** : declares which layer you put it on.
|
|
248
234
|
- **color** : can set the colour of the polygon or line.
|
|
235
|
+
- **opacity** : the opacity of the line or outline.
|
|
249
236
|
- **fillColor** : can set the fill colour of the polygon.
|
|
250
237
|
- **fillOpacity** : can set the opacity of the polygon fill colour.
|
|
251
238
|
- **dashArray** : optional dash array for polyline.
|
|
252
239
|
- **clickable** : boolean - set to true to allow click to show popup.
|
|
253
240
|
- **popup** : html string to display in popup (as well as name).
|
|
254
|
-
- **editable** : boolean - set to true to allow simple edit/delete right click contextmenu
|
|
255
|
-
- **contextmenu** : html string to display a more complex right click contextmenu
|
|
256
|
-
- **weight** : the width of the line
|
|
241
|
+
- **editable** : boolean - set to true to allow simple edit/delete right click contextmenu.
|
|
242
|
+
- **contextmenu** : html string to display a more complex right click contextmenu.
|
|
243
|
+
- **weight** : the width of the line or outline.
|
|
257
244
|
|
|
258
245
|
Other properties can be found in the leaflet documentation.
|
|
259
246
|
|
|
@@ -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.5",
|
|
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/worldmap.js
CHANGED
|
@@ -1351,13 +1351,15 @@ function setMarker(data) {
|
|
|
1351
1351
|
opt.color = data.color || data.lineColor || "#910000";
|
|
1352
1352
|
opt.fillColor = data.fillColor || "#910000";
|
|
1353
1353
|
opt.stroke = (data.hasOwnProperty("stroke")) ? data.stroke : true;
|
|
1354
|
-
opt.weight = data.weight
|
|
1355
|
-
opt.opacity = data.opacity
|
|
1354
|
+
opt.weight = data.weight;
|
|
1355
|
+
opt.opacity = data.opacity;
|
|
1356
1356
|
opt.fillOpacity = data.fillOpacity;
|
|
1357
1357
|
opt.clickable = (data.hasOwnProperty("clickable")) ? data.clickable : false;
|
|
1358
1358
|
opt.fill = (data.hasOwnProperty("fill")) ? data.fill : true;
|
|
1359
1359
|
if (data.hasOwnProperty("dashArray")) { opt.dashArray = data.dashArray; }
|
|
1360
1360
|
if (opt.fillOpacity === undefined) { opt.fillOpacity = 0.2; }
|
|
1361
|
+
if (opt.opacity === undefined) { opt.opacity = 1; }
|
|
1362
|
+
if (opt.weight === undefined) { opt.weight = 2; }
|
|
1361
1363
|
|
|
1362
1364
|
// Replace building
|
|
1363
1365
|
if (data.hasOwnProperty("building")) {
|
|
@@ -1426,12 +1428,18 @@ function setMarker(data) {
|
|
|
1426
1428
|
if (!data.hasOwnProperty("opacity")) { opt.opacity = 0.8; }
|
|
1427
1429
|
var polyln = L.polyline(data.line, opt);
|
|
1428
1430
|
polygons[data.name] = rightmenu(polyln);
|
|
1431
|
+
if (data.hasOwnProperty("fit") && data.fit === true) {
|
|
1432
|
+
map.fitBounds(polygons[data.name].getBounds(),{padding:[50,50]})
|
|
1433
|
+
}
|
|
1429
1434
|
}
|
|
1430
1435
|
else if (data.hasOwnProperty("area") && Array.isArray(data.area)) {
|
|
1431
1436
|
var polyarea;
|
|
1432
1437
|
if (data.area.length === 2) { polyarea = L.rectangle(data.area, opt); }
|
|
1433
1438
|
else { polyarea = L.polygon(data.area, opt); }
|
|
1434
1439
|
polygons[data.name] = rightmenu(polyarea);
|
|
1440
|
+
if (data.hasOwnProperty("fit") && data.fit === true) {
|
|
1441
|
+
map.fitBounds(polygons[data.name].getBounds(),{padding:[50,50]})
|
|
1442
|
+
}
|
|
1435
1443
|
}
|
|
1436
1444
|
else if (data.hasOwnProperty("sdlat") && data.hasOwnProperty("sdlon")) {
|
|
1437
1445
|
if (!data.hasOwnProperty("iconColor")) { opt.color = "blue"; } //different standard Color Settings
|
|
@@ -1989,7 +1997,7 @@ function setMarker(data) {
|
|
|
1989
1997
|
fb.action = "click";
|
|
1990
1998
|
ws.send(JSON.stringify(fb));
|
|
1991
1999
|
});
|
|
1992
|
-
if (heat && ((data.addtoheatmap
|
|
2000
|
+
if (heat && ((data.addtoheatmap != false) || (!data.hasOwnProperty("addtoheatmap")))) { // Added to give ability to control if points from active layer contribute to heatmap
|
|
1993
2001
|
if (heatAll || map.hasLayer(layers[lay])) { heat.addLatLng(lli); }
|
|
1994
2002
|
}
|
|
1995
2003
|
markers[data.name] = marker;
|
|
@@ -2062,9 +2070,11 @@ function setMarker(data) {
|
|
|
2062
2070
|
function doCommand(cmd) {
|
|
2063
2071
|
// console.log("COMMAND",cmd);
|
|
2064
2072
|
if (cmd.init && cmd.hasOwnProperty("maplist")) {
|
|
2073
|
+
basemaps = [];
|
|
2065
2074
|
addBaseMaps(cmd.maplist,cmd.layer);
|
|
2066
2075
|
}
|
|
2067
2076
|
if (cmd.init && cmd.hasOwnProperty("overlist")) {
|
|
2077
|
+
overlays = [];
|
|
2068
2078
|
addOverlays(cmd.overlist);
|
|
2069
2079
|
}
|
|
2070
2080
|
if (cmd.hasOwnProperty("toptitle")) {
|
package/worldmap.js
CHANGED
|
@@ -486,16 +486,16 @@ module.exports = function(RED) {
|
|
|
486
486
|
node.send(newmsg);
|
|
487
487
|
}
|
|
488
488
|
if (leafletHull.length === 2 && (oldl === 1 || oldl === 3)) {
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
489
|
+
var newmsg2 = RED.util.cloneMessage(newmsg);
|
|
490
|
+
newmsg2.payload.deleted = true;
|
|
491
|
+
node.send(newmsg2);
|
|
492
492
|
newmsg.payload.line = leafletHull;
|
|
493
493
|
node.send(newmsg);
|
|
494
494
|
}
|
|
495
495
|
if (leafletHull.length === 3 && oldl === 2) {
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
496
|
+
var newmsg3 = RED.util.cloneMessage(newmsg);
|
|
497
|
+
newmsg3.payload.deleted = true;
|
|
498
|
+
node.send(newmsg3);
|
|
499
499
|
}
|
|
500
500
|
if (leafletHull.length >= 3) {
|
|
501
501
|
newmsg.payload.area = leafletHull;
|