Skip to content

Conversation

jacobtoye
Copy link
Member

Handy when wanting to know when layers are added/removed to a specific LayerGroup rather than the map.

mourner added a commit that referenced this pull request Nov 6, 2012
Added 'layeradd' and 'layerremove' events to LayerGroup.
@mourner mourner merged commit 85ed215 into Leaflet:master Nov 6, 2012
@stsydow
Copy link
Contributor

stsydow commented Nov 7, 2012

This breaks the LayerGroup class - fire() is undefined.

layer = new L.LayerGroup();
map.addLayer(layer);
layer.addLayer(new L.Marker(...));

I assume LayerGroup should inherit it from somewhere.
Am I just doing it wrong?

@mourner
Copy link
Member

mourner commented Nov 7, 2012

Oops, should be moved to FeatureGroup. One moment. @jacobtoye please update to FeatureGroup

mourner added a commit that referenced this pull request Nov 7, 2012
@jacobtoye
Copy link
Member Author

Ah what a rookie :( Sorry guys.

emartinez-usgs pushed a commit to emartinez-usgs/Leaflet that referenced this pull request Feb 27, 2013
emartinez-usgs pushed a commit to emartinez-usgs/Leaflet that referenced this pull request Aug 15, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants