node-red-contrib-web-worldmap 2.37.0 → 2.37.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 +4 -2
- package/README.md +4 -2
- package/package.json +1 -1
- package/worldmap/worldmap.js +5 -0
- package/worldmap.js +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
### Change Log for Node-RED Worldmap
|
|
2
2
|
|
|
3
|
+
- v2.37.2 - If custom layer is only layer then show it automatically. Issue #230
|
|
4
|
+
- v2.37.1 - Warn (and drop) messages that are missing a payload. Issue #229
|
|
3
5
|
- v2.37.0 - Allow fly instead of fit option when using command to move view window. (PR #225)
|
|
4
6
|
- v2.36.0 - Add edge icons for SIDC markers just off the map.
|
|
5
7
|
- v2.35.0 - Let clickable:false work for markers as well.
|
|
6
|
-
- v2.34.0 - Let icon "url" be a local fixed path
|
|
7
|
-
- v2.33.0 - Let shapes create click event.
|
|
8
|
+
- v2.34.0 - Let icon "url" be a local fixed path. PR #223
|
|
9
|
+
- v2.33.0 - Let shapes create click event. from PR #221
|
|
8
10
|
Fix heatmap delete point bug. Issue #222
|
|
9
11
|
- v2.32.3 - Fix map split in iframe position
|
|
10
12
|
- v2.32.1 - Let command.heatmap replace complete heatmap array.
|
package/README.md
CHANGED
|
@@ -11,11 +11,13 @@ map web page for plotting "things" on.
|
|
|
11
11
|
|
|
12
12
|
### Updates
|
|
13
13
|
|
|
14
|
+
- v2.37.2 - If custom layer is only layer then show it automatically. Issue #230
|
|
15
|
+
- v2.37.1 - Warn (and drop) messages that are missing a payload. Issue #229
|
|
14
16
|
- v2.37.0 - Allow fly instead of fit option when using command to move view window. (PR #225)
|
|
15
17
|
- v2.36.0 - Add edge icons for SIDC markers just off the map.
|
|
16
18
|
- v2.35.0 - Let clickable:false work for markers as well.
|
|
17
|
-
- v2.34.0 - Let icon "url" be a local fixed path
|
|
18
|
-
- v2.33.0 - Let shapes create click event.
|
|
19
|
+
- v2.34.0 - Let icon "url" be a local fixed path. PR #223
|
|
20
|
+
- v2.33.0 - Let shapes create click event. from PR #221
|
|
19
21
|
Fix heatmap delete point bug. Issue #222
|
|
20
22
|
- v2.32.2 - Fix map split in iframe position
|
|
21
23
|
- v2.32.1 - Let command.map.heatmap replace complete heatmap array.
|
package/package.json
CHANGED
package/worldmap/worldmap.js
CHANGED
|
@@ -2388,6 +2388,11 @@ function doCommand(cmd) {
|
|
|
2388
2388
|
if (!existsalready) {
|
|
2389
2389
|
layercontrol.addBaseLayer(basemaps[cmd.map.name],cmd.map.name);
|
|
2390
2390
|
}
|
|
2391
|
+
// if new layer is only layer then show it.
|
|
2392
|
+
if (Object.keys(basemaps).length === 1) {
|
|
2393
|
+
baselayername = cmd.map.name;
|
|
2394
|
+
basemaps[baselayername].addTo(map);
|
|
2395
|
+
}
|
|
2391
2396
|
}
|
|
2392
2397
|
// Add or swap new minimap layer
|
|
2393
2398
|
if (cmd.map && cmd.map.hasOwnProperty("minimap")) {
|
package/worldmap.js
CHANGED
|
@@ -121,6 +121,7 @@ module.exports = function(RED) {
|
|
|
121
121
|
node.status({fill:"green",shape:"dot",text:"connected "+Object.keys(clients).length,_sessionid:client.id});
|
|
122
122
|
}
|
|
123
123
|
node.on('input', function(msg) {
|
|
124
|
+
if (!msg.hasOwnProperty("payload")) { node.warn("Missing payload"); return; }
|
|
124
125
|
if (msg.hasOwnProperty("_sessionid")) {
|
|
125
126
|
if (clients.hasOwnProperty(msg._sessionid)) {
|
|
126
127
|
clients[msg._sessionid].write(JSON.stringify(msg.payload));
|