Added 'layeradd' and 'layerremove' events to LayerGroup.

This commit is contained in:
jacobtoye 2012-11-06 15:37:36 +13:00
parent 3ae809e7c9
commit 6c4221fe04

View File

@ -24,6 +24,8 @@ L.LayerGroup = L.Class.extend({
this._map.addLayer(layer);
}
this.fire('layeradd', { layer: layer });
return this;
},
@ -36,6 +38,8 @@ L.LayerGroup = L.Class.extend({
this._map.removeLayer(layer);
}
this.fire('layerremove', { layer: layer });
return this;
},