efremidze / Cluster

Easy Map Annotation Clustering 📍
MIT License
1.28k stars 121 forks source link

Pins are clustered into two cluster, that are overlapping each other #49

Closed IVANKRUPSKI closed 7 years ago

IVANKRUPSKI commented 7 years ago

Hey!

Sometimes pins are clustered into more than one cluster, and these clusters are overlapping each other. That is really confusing, sometimes two overlapping cluster pins are exactly on the same place on the map, which looks like a mistake in calculation.

Is that normal, expected behaviour of the framework?

screenshot at oct 07 16-56-42

efremidze commented 7 years ago

What settings are you using? Is shouldRemoveInvisibleAnnotations enabled?

IVANKRUPSKI commented 7 years ago

No, it's not. Should that be enabled.

efremidze commented 7 years ago

Yes it should

IVANKRUPSKI commented 7 years ago

Well, I played a bit with shouldRemoveInvisibleAnnotations, and couldn't solve the problem.

shouldRemoveInvisibleAnnotations when TRUE only removes pins (whether cluster or single ones) that are currently not visible on the screen. It doesn't influence pins that are currently shown on the screen.

efremidze commented 7 years ago

I thought u were seeing this when scrolling. Can u send me a demo?

IVANKRUPSKI commented 7 years ago

Ok. I will try to.

IVANKRUPSKI commented 7 years ago

Here it is.

https://www.dropbox.com/s/ir17dxvuhwhzq9h/test.zip?dl=0

The questions are (1) Why sometimes two overlapping clustered pins are not consolidated into one, (2) Why sometimes single pins, that are overlapping with clustered pin, are not consolidated into this clustered pin.

These are the screenshots from this demo, simulator iPhone 5, black - clustered pin, green-gray - single pin. screenshot at oct 11 00-29-03 screenshot at oct 11 00-29-28 screenshot at oct 11 00-29-47

efremidze commented 7 years ago

Ill take a look. Make a PR if u find a solution.

IVANKRUPSKI commented 7 years ago

Ok

hjalmarsn commented 7 years ago

Having the same bug of a pin being isolated in the middle of a cluster

efremidze commented 7 years ago

Fixed the issue in latest release 2.0.1

Add this: manager.shouldCenterAlignClusters = true