Skip to content

Conversation

jfirebaugh
Copy link
Member

There doesn't seem to be any public API for getting the current layers of a map. The only way is to listen to layeradd, but then you miss any layers that are already added. Map#eachLayer, following LayerGroup#eachLayer, would be the minimal API.

@jfirebaugh
Copy link
Member Author

Converted to PR.

@mourner
Copy link
Member

mourner commented Feb 27, 2013

Awesome.

mourner added a commit that referenced this pull request Feb 27, 2013
@mourner mourner merged commit 99abc3e into Leaflet:master Feb 27, 2013
mourner added a commit that referenced this pull request Feb 27, 2013
# By John Firebaugh
# Via Vladimir Agafonkin (2) and John Firebaugh (1)
* 'master' of https://github.com/Leaflet/Leaflet:
  Add Map#eachLayer (fixes #1457)
  Fix whitespace
  Use devDependencies
@jfirebaugh jfirebaugh deleted the eachLayer branch February 27, 2013 16:09
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.

2 participants