Fix non-propagation of layer property

This commit is contained in:
Dave Conway-Jones 2021-04-20 15:08:38 +01:00
parent a0ea7a2817
commit 88abc87dfd
No known key found for this signature in database
GPG Key ID: 88BA2B8A411BE9FF
3 changed files with 7 additions and 2 deletions

View File

@ -1,5 +1,6 @@
### Change Log for Node-RED Worldmap ### Change Log for Node-RED Worldmap
- v2.13.3 - Fix unchanged layer proagation.
- v2.13.2 - Add mayflower icon. - v2.13.2 - Add mayflower icon.
- v2.13.0 - Tidy velocity layer. Feedback any url parameters. - v2.13.0 - Tidy velocity layer. Feedback any url parameters.
- v2.12.1 - Only show online layer options if we are online. - v2.12.1 - Only show online layer options if we are online.

View File

@ -1,6 +1,6 @@
{ {
"name": "node-red-contrib-web-worldmap", "name": "node-red-contrib-web-worldmap",
"version": "2.13.2", "version": "2.13.3",
"description": "A Node-RED node to provide a web page of a world map for plotting things on.", "description": "A Node-RED node to provide a web page of a world map for plotting things on.",
"dependencies": { "dependencies": {
"cgi": "0.3.1", "cgi": "0.3.1",

View File

@ -1287,7 +1287,11 @@ function setMarker(data) {
return; return;
} }
var lay = data.layer || "unknown"; var lll = "unknown";
if (markers.hasOwnProperty(data.name) && markers[data.name].hasOwnProperty("lay")) {
lll = markers[data.name].lay;
}
var lay = data.layer || lll;
if (!data.hasOwnProperty("action") || data.action.indexOf("layer") === -1) { if (!data.hasOwnProperty("action") || data.action.indexOf("layer") === -1) {
if (typeof layers[lay] == "undefined") { // add layer if if doesn't exist if (typeof layers[lay] == "undefined") { // add layer if if doesn't exist
if (clusterAt > 0) { if (clusterAt > 0) {