node-red-contrib-web-worldmap 2.37.3 → 2.37.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 CHANGED
@@ -1,5 +1,6 @@
1
1
  ### Change Log for Node-RED Worldmap
2
2
 
3
+ - v2.37.4 - Fix sessionid specific data not to be sent on reload/refresh
3
4
  - v2.37.3 - Fix hang on layer change
4
5
  - v2.37.2 - If custom layer is only layer then show it automatically. Issue #230
5
6
  - v2.37.1 - Warn (and drop) messages that are missing a payload. Issue #229
package/README.md CHANGED
@@ -11,6 +11,7 @@ map web page for plotting "things" on.
11
11
 
12
12
  ### Updates
13
13
 
14
+ - v2.37.4 - Fix sessionid specific data not to be sent on reload/refresh
14
15
  - v2.37.3 - Fix hang on layer change
15
16
  - v2.37.2 - If custom layer is only layer then show it automatically. Issue #230
16
17
  - v2.37.1 - Warn (and drop) messages that are missing a payload. Issue #229
@@ -422,13 +423,15 @@ Optional properties include
422
423
  - **zoomlock** - locks the zoom control to the current value and removes zoom control - `{"command":{"zoomlock":true}}`
423
424
  - **hiderightclick** - disables the right click that allows adding or deleting points on the map - `{"command":{"hiderightclick":true}}`
424
425
  - **coords** - turns on and off a display of the current mouse co-ordinates. Values can be "deg", "dms", or "none" (default). - `{"command":{"coords":"deg"}}`
425
- - **showruler** - turns on and off a display of the ruler control. Values can be "true" or "false". - `{"command":{"showruler":true}}`
426
+ - **showruler** - turns on and off a display of the ruler control. Values can be "true" or "false". - `{"command": {"ruler": {"showruler": true}}}`
426
427
  - **button** - if supplied with a `name` and `icon` property - adds a button to provide user input - sends
427
428
  a msg `{"action":"button", "name":"the_button_name"}` to the worldmap in node. If supplied with a `name` property only, it will remove the button. Optional `position` property can be 'bottomright', 'bottomleft', 'topleft' or 'topright' (default). button can also be an array of button objects.
428
429
  - **contextmenu** - html string to define the right click menu when not on a marker. Defaults to the simple add marker input. Empty string `""` disables this right click.
429
430
  - **toptitle** - Words to replace title in title bar (if not in iframe)
430
431
  - **toplogo** - URL to logo image for top tile bar (if not in iframe) - ideally 60px by 24px.
431
432
  - **trackme** - Turns on/off the browser self locating. Boolean false = off, true = cyan circle showing accuracy error, or an object like `{"command":{"trackme":{"name":"Dave","icon":"car","iconColor":"blue","layer":"mytrack","accuracy":false}}}`. Usual marker options can be applied.
433
+ - **showmenu** - Show or hide the display of the hamberger menu control in the top right . Values can be "show" or "hide". - `{"command":{"showmenu: "hide"}}`
434
+ - **showlayers** - Show or hide the display of selectable layers. Does not control the display of an individual layer, rather a users ability to interact with them. Values can be "show" or "hide". - `{"command":{"showlayers: "hide"}}`
432
435
 
433
436
  #### To switch layer, move map and zoom
434
437
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-red-contrib-web-worldmap",
3
- "version": "2.37.3",
3
+ "version": "2.37.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",
package/worldmap.js CHANGED
@@ -120,6 +120,7 @@ module.exports = function(RED) {
120
120
  });
121
121
  node.status({fill:"green",shape:"dot",text:"connected "+Object.keys(clients).length,_sessionid:client.id});
122
122
  }
123
+
123
124
  node.on('input', function(msg) {
124
125
  if (!msg.hasOwnProperty("payload")) { node.warn("Missing payload"); return; }
125
126
  if (msg.hasOwnProperty("_sessionid")) {
@@ -134,7 +135,7 @@ module.exports = function(RED) {
134
135
  }
135
136
  }
136
137
  }
137
- if (msg.payload.hasOwnProperty("name")) {
138
+ if (msg.payload.hasOwnProperty("name") && !msg.hasOwnProperty("_sessionid")) {
138
139
  allPoints[msg.payload.name] = RED.util.cloneMessage(msg.payload);
139
140
  var t = node.maxage || 3600;
140
141
  if (msg.payload.ttl && msg.payload.ttl < t) { t = msg.payload.ttl; }