From 5048d111e17d4994e486f07f6c581134a2988d6c Mon Sep 17 00:00:00 2001 From: Dave Conway-Jones Date: Fri, 17 Dec 2021 22:56:58 +0000 Subject: [PATCH] Fix loading of maps --- CHANGELOG.md | 1 + README.md | 1 + package.json | 2 +- worldmap/worldmap.js | 2 ++ 4 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3431d68..04f95ee 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ ### Change Log for Node-RED Worldmap + - v2.23.3 - Fix initial laod of maps - v2.23.2 - Add convex-hull example - v2.23.1 - Fix saving of custom map layer - v2.23.0 - Give logo and id so it can be overridden by toplogo command. PR #188. diff --git a/README.md b/README.md index b1863a7..0084087 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,7 @@ map web page for plotting "things" on. ### Updates +- v2.23.3 - Fix initial laod of maps - v2.23.2 - Add convex-hull example - v2.23.1 - Fix saving of custom map layer - v2.23.0 - Give logo and id so it can be overridden by toplogo command. PR #188. diff --git a/package.json b/package.json index 6f269ee..468196e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "node-red-contrib-web-worldmap", - "version": "2.23.2", + "version": "2.23.3", "description": "A Node-RED node to provide a web page of a world map for plotting things on.", "dependencies": { "@turf/bezier-spline": "~6.5.0", diff --git a/worldmap/worldmap.js b/worldmap/worldmap.js index 6cf7542..9b6429e 100644 --- a/worldmap/worldmap.js +++ b/worldmap/worldmap.js @@ -2062,9 +2062,11 @@ function setMarker(data) { function doCommand(cmd) { // console.log("COMMAND",cmd); if (cmd.init && cmd.hasOwnProperty("maplist")) { + basemaps = []; addBaseMaps(cmd.maplist,cmd.layer); } if (cmd.init && cmd.hasOwnProperty("overlist")) { + overlays = []; addOverlays(cmd.overlist); } if (cmd.hasOwnProperty("toptitle")) {