js-markerclusterer
js-markerclusterer copied to clipboard
AdvancedMarker not showing up when cluster is expanded (was: Incorrect display of markers on click(onClusterClick) on markercluster)
When clicking on the markercluster, the number of clusters is displayed incorrectly, but if you move the map, the error disappears and the number of clusters corresponds to the number on the markercluster.
This error can not always be tracked, the error occurs periodically!
https://jsfiddle.net/Novakand/w86dyebc/
https://github.com/googlemaps/js-markerclusterer/assets/64427434/2b9b1359-bc54-4536-81b7-2060e3e5fdd5
https://github.com/googlemaps/js-markerclusterer/assets/64427434/e2c2920a-70f9-4a7c-b9a3-d25fbbeb88bf
If you would like to upvote the priority of this issue, please comment below or react on the original post above with :+1: so we can see what is popular when we triage.
@dspex Thank you for opening this issue. 🙏 Please check out these other resources that might help you get to a resolution in the meantime:
- Check the issue tracker - bugs and feature requests for Google Maps Platform APIs and SDKs
- Open a support case - Get 1:1 support in Cloud Console.
- Discord - chat with other developers
- StackOverflow - use the
google-mapstag
This is an automated message, feel free to ignore.
Let's hope it will be fixed in the new version.
This is especially noticeable with the new google.maps.marker.AdvancedMarkerView parameter collisionBehavior: google.maps.CollisionBehavior.OPTIONAL_AND_HIDES_LOWER_PRIORITY
I can somewhat reliably reproduce that using the provided jsfiddle:
- look for a place where a cluster of 5-7 markers is relatively isolated
- click the cluster to expand it
- quite often not all markers are immediately visible in the expanded view. They will only appear when the map is moved (notable: they also don't get rendered when the map is resized)
I can somewhat reliably reproduce that using the provided jsfiddle:
- look for a place where a cluster of 5-7 markers is relatively isolated
- click the cluster to expand it
- quite often not all markers are immediately visible in the expanded view. They will only appear when the map is moved (notable: they also don't get rendered when the map is resized)
My workaround is to catch the clusterclick, and recreate the clusters there. The users will not notice the flickering, because of the zooming on the map.
The bug also happens when zooming in fast (not like panning like zoom) to a marker, then the markers of the expanded clusters will sometimes not be redrawn before the map is moved on the screen. Also here I recreate the clusters.