DayoFade
DayoFade

Reputation: 31

My mapview hides a lot of annotation points, how do i force ALL points to show?

I have 200+ points on my map and they a lot of them are hidden upon runtime until zoom in is increased. Is there a boolean function or other to resolve this?

Upvotes: 0

Views: 195

Answers (1)

DayoFade
DayoFade

Reputation: 31

You need to create your annotation view class outside of your view controller and change it’s displayPriority = .required

class annotationView: MKMarkerAnnotationView {

  override var annotation: MKAnnotation? {
    willSet {
        
      guard let "arrayOfAnnotations" = "newValue" as? "annotationClass" else {
        return
      }
        self.displayPriority = .required
      }
    }
}

Upvotes: 0

Related Questions