From 88abc87dfd0330698152bea8e88a32cc2349591e Mon Sep 17 00:00:00 2001 From: Dave Conway-Jones Date: Tue, 20 Apr 2021 15:08:38 +0100 Subject: [PATCH] Fix non-propagation of layer property --- CHANGELOG.md | 1 + package.json | 2 +- worldmap/worldmap.js | 6 +++++- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d64fd23..631256c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ ### Change Log for Node-RED Worldmap + - v2.13.3 - Fix unchanged layer proagation. - v2.13.2 - Add mayflower icon. - v2.13.0 - Tidy velocity layer. Feedback any url parameters. - v2.12.1 - Only show online layer options if we are online. diff --git a/package.json b/package.json index 7ea8e05..faea62a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "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.", "dependencies": { "cgi": "0.3.1", diff --git a/worldmap/worldmap.js b/worldmap/worldmap.js index 5e64eb6..f1b8772 100644 --- a/worldmap/worldmap.js +++ b/worldmap/worldmap.js @@ -1287,7 +1287,11 @@ function setMarker(data) { 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 (typeof layers[lay] == "undefined") { // add layer if if doesn't exist if (clusterAt > 0) {