Skip to content

Layer control events for overlays#1286

Merged
mourner merged 2 commits intoLeaflet:masterfrom
calvinmetcalf:layerControlEvents
Jan 18, 2013
Merged

Layer control events for overlays#1286
mourner merged 2 commits intoLeaflet:masterfrom
calvinmetcalf:layerControlEvents

Conversation

@calvinmetcalf
Copy link
Copy Markdown
Contributor

it would be helpful if layer control changes emitted events for overlays in addition to base ones.

@mourner
Copy link
Copy Markdown
Member

mourner commented Jan 17, 2013

Please rename the events to overlayadd, overlayremove to make them more consistent with other events.

@calvinmetcalf
Copy link
Copy Markdown
Contributor Author

updated them

mourner added a commit that referenced this pull request Jan 18, 2013
@mourner mourner merged commit 5fccd34 into Leaflet:master Jan 18, 2013
@mourner
Copy link
Copy Markdown
Member

mourner commented Jan 18, 2013

Thanks!

@shaefner
Copy link
Copy Markdown

overlayremove is also getting triggered when the baselayer is changed. Is this a bug?

Also, it might be nice if the same obj was returned from baselayerchange, overlayadd, overlayremove so that they could be "processed" in a similar way. For example, overlayadd and overlayremove return the layer name, which is useful. But I don't see anything obvious in the obj returned from baselayerchange to target the layer that fired the event.

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