title: How to install custom annotation on the map depending on the zoom
body: <p>1) I need to set a custom annotation, depending on the zoom on the map, they will be placed throughout the track on the map. (Arrows showing the direction).</p>
  
  <p>my code </p>
  
  <pre><code>   class customPin: NSObject, MKAnnotation {
      var coordinate: CLLocationCoordinate2D
      var title: String?
      var subtitle: String?
  
      init(pinTitle:String, pinSubTitle:String, location:CLLocationCoordinate2D) {
          self.title = pinTitle
          self.subtitle = pinSubTitle
          self.coordinate = location
      }
  }
  
  
      func mapView(_ mapView: MKMapView, viewFor annotation: MKAnnotation) -&gt; MKAnnotationView? {
      if annotation is MKUserLocation {
          return nil
      }
  
      let annotationView = MKAnnotationView(annotation: annotation, reuseIdentifier: "customannotation")
      annotationView.image = UIImage(named:"mov_on_2")
      annotationView.canShowCallout = true
      return annotationView
  }
  </code></pre>