fix update layercontrol

This commit is contained in:
Dave Conway-Jones 2019-04-29 23:05:17 +01:00
parent 6687c08e3c
commit 18466c0542
No known key found for this signature in database
GPG Key ID: 9E7F9C73F5168CD4
2 changed files with 2 additions and 2 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "node-red-contrib-web-worldmap", "name": "node-red-contrib-web-worldmap",
"version": "2.0.4-beta", "version": "2.0.5-beta",
"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

@ -1663,7 +1663,7 @@ function doCommand(cmd) {
if (overlays.hasOwnProperty(cmd.map.delete[a])) { delete overlays[cmd.map.delete[a]]; } if (overlays.hasOwnProperty(cmd.map.delete[a])) { delete overlays[cmd.map.delete[a]]; }
} }
if (showLayerMenu) { if (showLayerMenu) {
layercontrol.removeFrom(map); map.removeControl(layercontrol);
layercontrol = L.control.layers(basemaps, overlays).addTo(map); layercontrol = L.control.layers(basemaps, overlays).addTo(map);
} }
} }