Only add layer to control if control exisits

to close #50
This commit is contained in:
Dave Conway-Jones 2018-10-04 16:16:08 +01:00
parent 68953a1747
commit 31fe6d5ec1
No known key found for this signature in database
GPG Key ID: 9E7F9C73F5168CD4
2 changed files with 4 additions and 2 deletions

View File

@ -798,7 +798,9 @@ function setMarker(data) {
//zoomToBoundsOnClick:false
});
overlays[lay] = layers[lay];
layercontrol.addOverlay(layers[lay],lay);
if (showLayerMenu !== false) {
layercontrol.addOverlay(layers[lay],lay);
}
map.addLayer(overlays[lay]);
//console.log("ADDED LAYER",lay,layers);
}

View File

@ -1,5 +1,5 @@
CACHE MANIFEST
# date: Oct 2nd 2018 - v1.4.5
# date: Oct 3rd 2018 - v1.4.5
CACHE:
index.html