title: Remove a polyLine from the mapView
body: <p>I've read many posts about it and still i have a problem.
  This is my code to draw a polyLine between two points:</p>
  
  <pre><code>-(void) drawAline:(CLLocation*)newLocation
  {
  //drawing a line
  CLLocationCoordinate2D coordinateArray[2];
  coordinateArray[0] = CLLocationCoordinate2DMake(newLocation.coordinate.latitude, newLocation.coordinate.longitude);
  coordinateArray[1] = CLLocationCoordinate2DMake(self.jerusalem.coordinate.latitude, self.jerusalem.coordinate.longitude);
  
  self.routeLine = [MKPolyline polylineWithCoordinates:coordinateArray count:2];
  [self.mapView setVisibleMapRect:[self.routeLine boundingMapRect]];
  [self.mapView addOverlay:self.routeLine];
  
  }
  
  -(MKOverlayView *)mapView:(MKMapView *)mapView viewForOverlay:(id&lt;MKOverlay&gt;)overlay
  {
  if(overlay == self.routeLine)
  {
      if(nil == self.routeLineView)
      {
          self.routeLineView = [[MKPolylineView alloc] initWithPolyline:self.routeLine];
          self.routeLineView.fillColor = [UIColor blueColor];
          self.routeLineView.strokeColor = [UIColor blueColor];
          self.routeLineView.lineWidth = 5;
      }
      return self.routeLineView;
  }
  
  return nil;
  </code></pre>
  
  <p>}</p>
  
  <p>thats works fine.
  The problem is to remove the line.
  The next code doesn't work:</p>
  
  <pre><code>    for (id&lt;MKOverlay&gt; overlayToRemove in self.mapView.overlays)
  {
      if ([overlayToRemove isKindOfClass:[MKPolylineView class]])
      {
          [mapView removeOverlay:overlayToRemove];
      }
  }
  </code></pre>
  
  <p>the next code doesn't work neither:</p>
  
  <pre><code>     if (self.routeLine)
  {
  [self.mapView removeOverlay:self.routeLine];
      self.routeLineView = nil;
      self.routeLine = nil;
  }
  </code></pre>
  
  <p>Thanks!</p>