Skip to content
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

Clusters keep shaking as you interact with the map #35

Closed
andrealonzo opened this issue Apr 28, 2016 · 3 comments
Closed

Clusters keep shaking as you interact with the map #35

andrealonzo opened this issue Apr 28, 2016 · 3 comments

Comments

@andrealonzo
Copy link
Collaborator

Not sure how to fix this. Maybe use shouldComponentUpdate and tell react not to update icon if the cluster is the same?

@andrealonzo
Copy link
Collaborator Author

This seems to be a known issue with google-maps react

tomchentw/react-google-maps#172
tomchentw/react-google-maps#210

@andrealonzo
Copy link
Collaborator Author

It seems like react-google-maps markerclusterer rerenders with every map event (pan, zoom, opening and close info windows). This doesn't seem like it matches the behavior of the normal markerclusterer library. Some possible ideas for fixes

  1. Debug react-google-map's markerclusterer and figure out why it keeps rerendering after a map event. It really should only rerender if something has changed.
  2. Use the normal markerclusterer library. This might work...but it means we're mixing React and non-react libraries.
  3. Limit the amount of map events. Maybe set a timeout to the marker mouseovers...?

@andrealonzo
Copy link
Collaborator Author

we will stop using clusters

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant