MicheleBertoli / react-gmaps

A Google Maps component for React.js
http://react-gmaps.herokuapp.com/
MIT License
317 stars 68 forks source link

Basic implementation of using MarkerClusterer #123

Closed AbeCole closed 1 year ago

AbeCole commented 5 years ago

Made a few changes to allow a basic implementation of MarkerClusterer. In order to do this the following has been done:

There are still improvements that can be made, this are the mains ones I could think of at this time:

  1. Currently no events are implemented on the MarkerClusterer - most importantly onClick would be handy
  2. Adding/removing a marker after the map has been created will not update the MarkerClusterer instance
  3. Implementing something to allow 'de-clustering' would be very helpful - for example if you have 5 markers with the exact same location you would have a 'cluster' with the number 5 on it, when events are implement the onClick event would be for the whole cluster, it would be ideal to have the cluster 'split' on first click so you can then click the correct one of 5 markers
MicheleBertoli commented 1 year ago

Thanks for your contribution, @AbeCole

@AnatoleLucet proposed a full modern rewrite in #130 I'm closing this, but let's follow up if we believe that the feature is still relevant in v2