title: How to change image to an MKAnnotation with Swift
body: <p>I have a map with 2 annotations and I want 2 different images to each of them.</p>
  
  <p>I know how to do it with one annotation, but my problem is with two annotations.</p>
  
  <p>Here is my code for one:</p>
  
  <pre><code> func mapView(mapView: MKMapView, viewForAnnotation annotation: MKAnnotation) -&gt; MKAnnotationView? {
          let reuseId = "pin"
  
          var anView = mapView.dequeueReusableAnnotationViewWithIdentifier(reuseId)
  
  
          anView = MKAnnotationView(annotation: annotation, reuseIdentifier: reuseId)
          anView!.image = nil;
          anView!.image = UIImage(named:"destinationPin")
  
  
          return anView
  
      }
  </code></pre>
  
  <p>And If anyone can I'd really appreciate if you explain me what is reuseId.</p>
  
  <p>Thanks in advance</p>