JustFly1984 / react-google-maps-api

React Google Maps API
MIT License
1.79k stars 438 forks source link

MarkerClusterer Blinking on click #3288

Closed rohank05 closed 1 year ago

rohank05 commented 1 year ago

Please provide an explanation of the issue

MarkerClustered On Click Blinks when i am not zooming by clicking just opening a card. Video Link: https://streamable.com/4ywifu

As you can see in the video the clustered Marker is blinking when i am opening card. I checked onClickEvent. Is there a way to avoid this blinking

How does it behave?

  1. It is currently Blinking when using I am not zooming it.

    How should it behave correctly?

  2. It should not blink
JustFly1984 commented 1 year ago

use MarkerClustererF

rohank05 commented 1 year ago

I tried using MarkerClustererF doesn't seem to affect. Do I need to provide anyother properties to it

<MarkerClustererF averageCenter={true} calculator={clusterPriority} onClick={handleClusterClick} styles={clusterStyle}> </MarkerClustererF>

JustFly1984 commented 1 year ago

As I understand it could be issue with Strict mode. You can disable strict mode, or make a PR to fix an issue in MarkerClustererF

rohank05 commented 1 year ago

since zoom on click is true by default. Since click will always first try to render. even if it is max zoom. So I will need to stop rendering on marker when on max zoom. I will look into it more and If i could fix it, I will create a PR