applidium / ADClusterMapView

MKMapView with clustering
http://applidium.github.io/ADClusterMapView/
Other
658 stars 129 forks source link

Why clusters would change with just panning around the map and not zooming ? #12

Closed ngooran closed 11 years ago

ngooran commented 11 years ago

I've tested your library in my app which has near 2000 annotations in a city on the map to cluster them. it clusters my annotations but whenever I pan around the map without even zooming in or out, the clusters would change and it is somehow weird ! I didn't expect one of my annotations that belongs to a cluster, gets out of that cluster without any zooming in or out ! could you please help me and suggest why this would happen ?

Ecco commented 11 years ago

This happens because our clustering algorithm enforces a given number of clusters on screen. So when you pan to an area with fewer annotations, some of your clusters will be split out to get to the desired number of clusters on the screen.

This is the desired behavior. It might indeed not fit your need, but this is the way it's intended to work.