bpillon / google_maps_cluster_manager

Simple Flutter clustering library for Google Maps
https://pub.dev/packages/google_maps_cluster_manager
MIT License
121 stars 94 forks source link

How to cluster near by Markers? #34

Open bajajsahil opened 2 years ago

bajajsahil commented 2 years ago

Hi @bpillon,

In the current implementation, is it possible to cluster only nearby markers?

E.g. Markers having a distance difference only of 50m and on ultra-zoom, we can split them.

Thanks.

bpillon commented 2 years ago

Hello @bajajsahil, I'm not sure of totally understanding what you want to achieve. Can you rephrase it ?

bajajsahil commented 2 years ago

Hello @bpillon,

Thanks for your response.

Our app only shows places that are within 5 miles radius. And, the places which are very close are getting hidden behind each other. Users cannot see them due to overlap. So, we want to cluster those places that are very close to each other, like only a couple of meters difference e.g. 20m.

Hope it is clear now.

pr-1 commented 2 years ago

@bajajsahil Did you get any workaround for this . I am also facing this issue . single markers don't show up even if i zoom in it gets overlapped

bajajsahil commented 2 years ago

@pr-1 Not yet. You can try clustering the markers based on their distance from each other. We have Dart and Java code to get the distance between the 2 locations. It would be custom logic but yeah we can achieve that I think.

E.g. if the distance is less than 10 meters then group it and on map show it differently and handle the on tap differently for them.

bpillon commented 2 years ago

Hello @bajajsahil. Does #35 answers your problem ?