title: MapKit - Change the Color/Stroke of a MKPolyline
body: <p>I have already added an Overlay to my Map with the follwing code:</p>
  
  <pre><code>func mapView(mapView: MKMapView!, rendererForOverlay overlay: MKOverlay!) -&gt; MKOverlayRenderer! {
      if overlay.isKindOfClass(MKPolyline) {
          // draw the track
  
          let polyLine = overlay as! MKPolyline
          let polyLineRenderer = MKPolylineRenderer(overlay: polyLine)
          polyLineRenderer.strokeColor = UIColor.blueColor()
          polyLineRenderer.lineWidth = 2.0
          return polyLineRenderer
      }
  
      return nil
  }
  </code></pre>
  
  <p>Now I want to change the color or line width of that Polyline.<br>
  The only way I found to do that is:</p>
  
  <pre><code>func randomMethod()
  {
      ...// find aPolyline
      self.myOverlay = aPolyLine
      self.map.removeOverlay(self.myOverlay)
      self.map.addOverlay(self.myOverlay)
  }
  </code></pre>
  
  <p>On the mapView renderForOverLay method added this:   </p>
  
  <pre><code>if (polyLine == self.myOverlay)
  {
     polyLineRenderer.strokeColor = UIColor.redColor()
     polyLineRenderer.lineWidth = 5.0
  }else{
     polyLineRenderer.strokeColor = UIColor.blueColor()
     polyLineRenderer.lineWidth = 2.0
   }
  </code></pre>
  
  <p>There has to be a better way than removing the overlay and adding it back.<br>
  Do you know any other way?</p>