bpillon / google_maps_cluster_manager

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

Overlapping clusters at lower zoom levels... #17

Closed mistyn8 closed 3 years ago

mistyn8 commented 3 years ago

How can I avoid clusters overlapping? (I need clustering for my clusters :-) )

I've had a look at setting levels, but can't quite understand what levels are actually doing and whatever I do seems to make it worse, not better. Any pointers greatly received.

screen

mistyn8 commented 3 years ago

Had another look and got a better setup with levels: [1, 4.25, 6.75, 8.25, 11.5, 14.5, 16.0, 16.5, 20.0], rather than the default levels: [1, 3.5, 5, 8.25, 11.5, 14.5, 16.0, 16.5, 20.0],

Also have a better understanding of levels.. which basically work alongside geohash and matching substring of chars. (with overriding limits of google map zoom 1 -> 19 and only 12 levels available)

I think some of the issue here is that geohash inherently limits proximity due to 12chars when encoded...

km

1 ± 2500 2 ± 630 3 ± 78 4 ± 20 5 ± 2.4 6 ± 0.61 7 ± 0.076 8 ± 0.019 9 ± 0.0024 10 ± 0.00060 11 ± 0.000074

So a little arbitrary when trying to match to zoom levels?

bpillon commented 3 years ago

Hello Mike. Indeed the values I use as default are completely arbitrary and based on few tests. Is the rendering OK now with your new values ? May be I could update the default ones with yours.

mistyn8 commented 3 years ago

feel free, seems to work better for our needs.

FYI some user testing feedback for you I am having to explain why the difference from the previous incarnation which was based on Fluster. Geohash seems much more performant, but some users are a little unnerved by the clustering changing when panning viewport, as opposed to fluster where clusters remain constant when panning.

bpillon commented 3 years ago

I have trouble understanding exactly what you mean by "panning" ? You have a use-case where your map view size is changing ?

mistyn8 commented 3 years ago

panning the map around (dragging without zoom)