overlay events

This commit is contained in:
Calvin Metcalf 2013-01-16 18:20:20 -05:00
parent 8facf33896
commit 88f1e121ee

View File

@ -217,9 +217,12 @@ L.Control.Layers = L.Control.extend({
this._map.addLayer(obj.layer);
if (!obj.overlay) {
baseLayer = obj.layer;
} else {
this._map.fire('overlaylayeradd', {layer: obj});
}
} else if (!input.checked && this._map.hasLayer(obj.layer)) {
this._map.removeLayer(obj.layer);
this._map.fire('overlaylayerremoved', {layer: obj});
}
}