google_maps_cluster_manager icon indicating copy to clipboard operation
google_maps_cluster_manager copied to clipboard

How to cluster near by Markers?

Open bajajsahil opened this issue 3 years ago • 5 comments

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.

bajajsahil avatar Oct 16 '21 11:10 bajajsahil

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

bpillon avatar Oct 18 '21 13:10 bpillon

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.

bajajsahil avatar Oct 23 '21 06:10 bajajsahil

@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

pr-1 avatar Nov 08 '21 15:11 pr-1

@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.

bajajsahil avatar Nov 09 '21 11:11 bajajsahil

Hello @bajajsahil. Does #35 answers your problem ?

bpillon avatar Feb 02 '22 09:02 bpillon