Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disabling MKMapView clustering annotations automatically [duplicate]

I have two classes that both conform to MKAnnotation, and I was wondering, is there a way to force MapKit to not cluster the annotation when a user zooms out and display all annotations?

like image 459
dinosaysrawr Avatar asked Feb 17 '26 11:02

dinosaysrawr


1 Answers

The mentioned solution didn't work for me, but this solution worked:

final class CarPinMarkerView: MKMarkerAnnotationView {
  override var annotation: MKAnnotation? {
    willSet {
        displayPriority = MKFeatureDisplayPriority.required
    }
  }
}

Hope it helps.

like image 153
Tung Fam Avatar answered Feb 20 '26 10:02

Tung Fam



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!