fix update layercontrol
This commit is contained in:
parent
6687c08e3c
commit
18466c0542
@ -1,6 +1,6 @@
|
||||
{
|
||||
"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.",
|
||||
"dependencies": {
|
||||
"cgi": "0.3.1",
|
||||
|
@ -1663,7 +1663,7 @@ function doCommand(cmd) {
|
||||
if (overlays.hasOwnProperty(cmd.map.delete[a])) { delete overlays[cmd.map.delete[a]]; }
|
||||
}
|
||||
if (showLayerMenu) {
|
||||
layercontrol.removeFrom(map);
|
||||
map.removeControl(layercontrol);
|
||||
layercontrol = L.control.layers(basemaps, overlays).addTo(map);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user