js-markerclusterer icon indicating copy to clipboard operation
js-markerclusterer copied to clipboard

AdvancedMarker not showing up when cluster is expanded (was: Incorrect display of markers on click(onClusterClick) on markercluster)

Open dspex opened this issue 2 years ago • 6 comments

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

dspex avatar Aug 30 '23 17:08 dspex

https://github.com/googlemaps/js-markerclusterer/assets/64427434/e2c2920a-70f9-4a7c-b9a3-d25fbbeb88bf

dspex avatar Aug 30 '23 17:08 dspex

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:

This is an automated message, feel free to ignore.

wangela avatar Aug 30 '23 17:08 wangela

Let's hope it will be fixed in the new version.

novakand avatar Aug 30 '23 20:08 novakand

This is especially noticeable with the new google.maps.marker.AdvancedMarkerView parameter collisionBehavior: google.maps.CollisionBehavior.OPTIONAL_AND_HIDES_LOWER_PRIORITY

novakand avatar Sep 01 '23 10:09 novakand

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)

usefulthink avatar Sep 29 '23 12:09 usefulthink

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.

renenybo avatar Oct 14 '23 09:10 renenybo