react-google-maps-api icon indicating copy to clipboard operation
react-google-maps-api copied to clipboard

Clicking clusters that overlay a POI will zoom to POI instead of markers

Open fabyeah opened this issue 4 years ago • 1 comments

When clicking a cluster that is on top of a clickable point of interest (which opens an info window on click) such as a city district name, it will zoom to the markers, but then jump to the info window.

Point of interest next to cluster. No problem. Screenshot 2021-05-03 at 12 17 40

Clicking the point of interest opens an info window. Screenshot 2021-05-03 at 12 17 30

Point of interest behind cluster. Problem! Screenshot 2021-05-03 at 12 18 08

When clicking the cluster it zooms to the markers, but jumps to the info window immediately after Screenshot 2021-05-03 at 12 34 54

I tested this issue with Google's example map for marker clusters (https://developers.google.com/maps/documentation/javascript/marker-clustering), but could not replicate it with this POI clickable park behind the cluster Screenshot 2021-05-03 at 12 20 39

So not sure if this is somehow specific to this package.

My current workaround is to make the POIs not clickable via GoogleMap prop clickableIcons={false} which isn't ideal as users may for example try to click on metro stations to get line info, to find out how to get to a location.

Your Environment

MacOS, Android React 17 @react-google-maps 2.1.1

fabyeah avatar May 03 '21 10:05 fabyeah

please provide minimal reproduction in codesandbox.io

JustFly1984 avatar Aug 09 '21 23:08 JustFly1984