-
Notifications
You must be signed in to change notification settings - Fork 22
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
Removing layers doesn't work with MarkerCluster #11
Comments
It does seem like the code should handle that case though, trying to work out what's up. |
Ah no, sorry, yeah, it always passes the numeric ID of the layer to remove, which isn't handled very well by markercluster. |
Not sure if I should suggest that MarkerCluster should support removal by ID rather than Layer object, but as the fix here is super easy, I'm going to fork and suggest the change. |
Hi, Thank you for your report and for the PR! Good catch about MCG not handling Looking at my code I see another inconsistency, hopefully I can fix that later on. Thank you for your contribution! |
…-markercluster Remove layers by layer object, not id
I have an application that needs to remove layers from the group, and have the parent group get updated.
This works fine if the parent group is, for example, the map or another layer group.
However, if the parent group is the markercluster then this doesn't work.
This is because the markercluster is expecting a fully loaded layer object to be passed to removeLayer, instead it's passed the ID of the layer, which fails to remove it as far as I can see.
The text was updated successfully, but these errors were encountered: