Is it possible to force MapKit to show all annotations without clustering?

后端 未结 2 533
梦如初夏
梦如初夏 2021-01-14 00:27

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

2条回答
  •  抹茶落季
    2021-01-14 00:51

    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.

提交回复
热议问题