-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is eachLayer meant to work in MarkerClusterGroup? #102
Comments
Have added eachChildLayer, which provides eachLayer-like behaviour. We cannot override eachLayer as eachLayer must iterate only visible layers. LayerGroup - which MarkerClusterGroup is derived from - relies on this behaviour. Please give it a go :) |
Dave, Thanks for the quick reply. I will try it out, but it will be awhile as I find it a bit odd that eachLayer only works on visible layers. The onAdd Tim On 5 December 2012 20:51, Dave Leaver notifications@github.com wrote:
|
Your comment made me go take another look and I managed to work around the issue, so you just use eachLayers like normal and it will all work :) Invisible layers are markers you have added to a MarkerClusterGroup but they aren't currently visible on the map (either they are in a cluster or are too far off screen). |
Dave, Thanks. That's great. The MarkerCluster plugin has made me realise how Tim On 6 December 2012 00:26, Dave Leaver notifications@github.com wrote:
|
The
eachLayer
function doesn't seem to work inmarkerClusterGroup
. Is this deliberate? If so is there any alternate functionality that lets me iterate over markers?I'm writing an editor which lets you change various features of (modified) markers and one thing I need to do if a template changes is walk through and change all the markers using that template. I originally used
eachLayer
to do this, but it didn't work once I moved toMarkerClusterGroup
. I can keep a list of the markers for each template separately of course, but it would be cleaner ifLeaflet
would do it for me.The text was updated successfully, but these errors were encountered: