title: MKOverlayRenderer not rendering
body: <p>I'm having trouble getting an MKPolygonRenderer to appear over my map. I have a class <code>MapViewController</code> that contains an <code>MKMapView</code>, and create <code>CustomMapOverlay</code> instances to render over the <code>MKMapView</code>.</p>
  
  <p><strong>MapViewController.m:</strong></p>
  
  <pre><code>- (void)viewDidLoad {
      [super viewDidLoad];
      self.mapView.delegate = self;
      self.mapView.showsUserLocation = YES;
  }
  
  // ...
  
  // Later, I retrieve some models and generate CustomMapOverlay instances from them...
  for (Model *model in models) {
      CustomMapOverlay *customMapOverlay = [[CustomMapOverlay alloc] initWithModel:model];
      [self.mapView addOverlay:customMapOverlay];
  }
  
  // ...
  
  // Implement MKMapViewDelegate protocol
  - (MKOverlayRenderer *)mapView:(MKMapView *)mapView rendererForOverlay:(id&lt;MKOverlay&gt;)overlay {
      MKPolygonRenderer *polygonRenderer = [[MKPolygonRenderer alloc] initWithOverlay:overlay];
      polygonRenderer.lineWidth = 2;
      polygonRenderer.strokeColor = [UIColor colorWithRed:0.0 green:0.5 blue:1.0 alpha:1.0];
      polygonRenderer.fillColor = [UIColor colorWithRed:0.0 green:0.5 blue:1.0 alpha:0.5];
      return polygonRenderer;
  }
  </code></pre>
  
  <p><strong>CustomMapOverlay.m:</strong></p>
  
  <pre><code>@implementation CustomMapOverlay
  
  // Required by MKOverlay protocol
  @synthesize coordinate,
      boundingMapRect;
  
  - (instancetype)initWithModel:(Model *)model {
      coordinate = CLLocationCoordinate2DMake(model.latitude, model.longitude);
      double radiusInPoints = MKMapPointsPerMeterAtLatitude(model.latitude) * model.radius;
      boundingMapRect = MKMapRectMake(model.latitude, model.longitude, radiusInPoints, radiusInPoints);
      return self;
  }
  
  @end
  </code></pre>
  
  <p><code>mapView:rendererForOverlay</code> is getting called, and inspecting the <code>overlay</code> in the debugger I see a <code>coordinate</code> within the map's current on-screen bounds and what seems like a reasonable <code>boundingMapRect</code> (though I'm not sure what "map points" are, I'm trusting that <code>MKMapPointsPerMeterAtLatitude</code> method to do what it says it does).</p>
  
  <p>But, no polygons appear on the map.</p>
  
  <hr>
  
  <p><strong>UPDATE:</strong></p>
  
  <p>I realize now that I'm attempting to render polygons without creating them. Instead of <code>CustomMapOverlay</code>, then, I'm now generating <code>MKPolygon</code> overlays like this:</p>
  
  <pre><code>CLLocationCoordinate2D centerCoordinate = CLLocationCoordinate2DMake(model.latitude, model.longitude);
  MKCoordinateRegion region = MKCoordinateRegionMakeWithDistance(centerCoordinate, model.radius, model.radius);
  
  int numCoords = 4;
  CLLocationCoordinate2D *coords = malloc(sizeof(CLLocationCoordinate2D) * numCoords);
  coords[0] = CLLocationCoordinate2DMake((region.center.longitude - 0.5*region.span.longitudeDelta), (region.center.latitude + 0.5*region.span.latitudeDelta));
  coords[1] = CLLocationCoordinate2DMake((region.center.longitude + 0.5*region.span.longitudeDelta), (region.center.latitude + 0.5*region.span.latitudeDelta));
  coords[2] = CLLocationCoordinate2DMake((region.center.longitude + 0.5*region.span.longitudeDelta), (region.center.latitude - 0.5*region.span.latitudeDelta));
  coords[3] = CLLocationCoordinate2DMake((region.center.longitude - 0.5*region.span.longitudeDelta), (region.center.latitude - 0.5*region.span.latitudeDelta));
  MKPolygon *polygon = [MKPolygon polygonWithCoordinates:coords count:numCoords];
  free(coords);
  
  [self.mapView addOverlay:polygon];
  </code></pre>
  
  <p>However, now <code>mapView:rendererForOverlay</code> is no longer getting called at all.</p>