title: Custom Annotation Using MKPointAnnotation
body: <p>This what I'm trying to do:</p>
  
  <p>Use a single custom annotation for all the locations that will populate the map. I have the custom image saved in the assets but, can't make it work. </p>
  
  <p>My code is as follows:</p>
  
  <pre><code>ViewDidLoad()
  
      if let locationDict = snap.value as? Dictionary&lt;String, AnyObject&gt; {
  
          let lat = locationDict["LATITUDE"] as! CLLocationDegrees
          let long = locationDict["LONGITUDE"] as! CLLocationDegrees
          let title = locationDict["NAME"] as! String
          let center = CLLocationCoordinate2D(latitude: lat, longitude: long)
          _ = MKCoordinateRegion(center: center, span: MKCoordinateSpan(latitudeDelta: 0.10, longitudeDelta: 0.10))
  
          let annotation = MKPointAnnotation()
          annotation.coordinate = CLLocationCoordinate2DMake(lat, long)
          annotation.title = title.capitalized // if you need title, add this line
          self.mapView.addAnnotation(annotation)
      }
  </code></pre>
  
  <p>Use a single custom annotation for all the locations that will populate the map. I have the custom image saved in the assets but, can't make it work (Details in the viewDidLoad)</p>
  
  <pre><code>    func mapView(_ mapView: MKMapView, viewFor annotation: MKAnnotation) -&gt; MKAnnotationView? {
  
          var annotationView: MKAnnotationView?
  
  
          if annotation.isKind(of: MKUserLocation.self) {
              annotationView = MKAnnotationView(annotation: annotation, reuseIdentifier: "User")
              annotationView?.image = UIImage(named: "icon")
          }
  
  
  
          return annotationView
      }
  </code></pre>