fix update layercontrol
This commit is contained in:
parent
6687c08e3c
commit
18466c0542
@ -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",
|
||||||
|
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user