THIS SDK ISDEPRECATED.

We rolled out a new and better SDK for you.

Annotations clustering

Allow your users to cluster annotations for better visualization. By default, annotations clustering is disabled. You can decide per each marker if it should be included in the clustering process or not (e.g., you want to have a few annotations that are never clustered). To manipulate marker clustering, use TTAnnotationManager obtained from TTMapView.

Sample use case: You want to display the distribution of parking spots across the city. Individual parking spots are shown only at higher zoom levels, otherwise data is clustered for better visualization.

To enable annotations clustering:

mapView.annotationManager.clustering = true
self.mapView.annotationManager.clustering = YES

To flag a marker indicating that it should be clustered:

annotation.shouldCluster = true
annotation.shouldCluster = YES;

Examples are shown below:

image

Lower zoom level

image

Higher zoom level