-
Notifications
You must be signed in to change notification settings - Fork 76
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
Clicking a cluster zooms on marker outside it if the marker has a visible infoWindow #623
Comments
If you would like to upvote the priority of this issue, please comment below or react with 👍 so we can see what is popular when we triage.@smohadjer Thank you for opening this issue. 🙏
This is an automated message, feel free to ignore. |
If I disable infoWindow's auto panning by setting disableAutoPan to true, this bug doesn't happen, so I think the problem happens because a click on cluster pushes the visible infoWindow out of map's visible viewport, so perhaps the bug is not in MarkerClusterer, but in how AutoPan is implemented by Google Maps. |
@smohadjer While this bug is active, I was able to create a work around to this by adding a click event listener to the MarkerClusterer and use that event listener to close the active infoWindow |
@HarrisonMaindonald I already tried that workaround, but that doesn't fix the problem completely. For example if infowindow is visible for a marker and you zoom out so that marker goes inside a cluster, now the call to close the infowindow won't close it anymore and if you click on a cluster it will still zoom and center the map on wrong marker. To solve the problem I ended up disabling autopan inside cluster's click handler before map.fitBounds() is called and then enabling it after map.fitBounds() call with a delay.
|
When the infoWindow of a marker is visible and we click on a cluster somewhere else on the map, the map zooms and centers on the marker with infoWindow instead of zooming and centering on markers inside the cluster.
The text was updated successfully, but these errors were encountered: