Enhancement for PR

This commit is contained in:
fkloft
2015-10-11 00:05:28 +02:00
parent 6d2f0c1e1e
commit 6ade4563b9

View File

@ -415,6 +415,7 @@ window.addLayerGroup = function(name, layerGroup, defaultDisplay) {
}
window.removeLayerGroup = function(layerGroup) {
if(!layerChooser._layers[layerGroup._leaflet_id]) throw('Layer was not found');
// removing the layer will set it's default visibility to false (store if layer gets added again)
var name = layerChooser._layers[layerGroup._leaflet_id].name;
var enabled = isLayerGroupDisplayed(name);
@ -485,3 +486,4 @@ L.Draggable.prototype._onDown = function(e) {
L.DomEvent.on(document, "touchcancel", this._onUp, this);
}
}