-
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
zoomToShowLayer fails after initial spiderfy. #286
Comments
Hi, I'm commenting here cause I fell into a deep bug about the zoomToShowLayer function. This is happening when all markers inside a cluster have the same position AND your initial map position is the same (centered on this cluster). The callback of zoomToShowLayer() is simply not called. I'm looking for a fix and I'll try to do a PR if I find something, bug maybe you have an idea of how to fix this issue easily? |
@Grsmto Thanks, have added a fix for this, it should be a bit more reliable than just checking the center. |
@danzel Awesome, thank you! :) |
As referenced in issue #203 and pull request #228, after a cluster is initially spiderfied zoomToShowLayer fails if the view extent has been changed by a method which does not collapse the cluster (such as panTo) as the layer._icon is still present due to zoomToShowLayer. You can reproduce this issue with this fiddle by clicking 'Zoom to marker', then 'Cause issue' and the 'Zoom to marker' again. There seems to be a pretty simple fix similar to that in #228 but you mentioned in #203 that we might want to look at it more deeply.
The text was updated successfully, but these errors were encountered: