Contents

clusteringIdentifier

An identifier that determines whether the annotation view participates in clustering.

Declaration

var clusteringIdentifier: String? { get set }

Discussion

The default value of this property is nil, which prevents MapKit from clustering the annotation view with other annotation views. Setting the property to a non-nil value enables it to participate in clustering.

Clustering occurs when there’s a collision between multiple annotation views with the same identifier on the map surface. MapKit removes the annotation views involved in the collision from the map view and replaces them with a clustering annotation view, which displays the title from one of the annotations and provides access to the other annotations.

See Also

Clustering annotation views