node-red-contrib-web-worldmap 2.23.1 → 2.23.2
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
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
### Change Log for Node-RED Worldmap
|
|
2
2
|
|
|
3
|
+
- v2.23.2 - Add convex-hull example
|
|
3
4
|
- v2.23.1 - Fix saving of custom map layer
|
|
4
5
|
- v2.23.0 - Give logo and id so it can be overridden by toplogo command. PR #188.
|
|
5
6
|
- v2.22.3 - Don't show empty popup for geojson object. Issue #186. Add wobble to null island.
|
package/README.md
CHANGED
|
@@ -11,6 +11,7 @@ map web page for plotting "things" on.
|
|
|
11
11
|
|
|
12
12
|
### Updates
|
|
13
13
|
|
|
14
|
+
- v2.23.2 - Add convex-hull example
|
|
14
15
|
- v2.23.1 - Fix saving of custom map layer
|
|
15
16
|
- v2.23.0 - Give logo and id so it can be overridden by toplogo command. PR #188.
|
|
16
17
|
- v2.22.3 - Don't show empty popup for geojson object. Issue #186. Add wobble to null island.
|
|
@@ -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.2",
|
|
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.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;
|