title: Custom MKOverlayRenderer drawMapRect function not drawing polygons
body: <p>I have built a custom MKOverlayRenderer in order to build polygons, apply a blend mode, then add them to the map view. In my drawMapRect function, I use an array of CGPoints to build the polygon, and create a path.</p>
  
  <p>However, during runtime nothing shows on my map view. My best guess would be the order of which I create the polygon in my drawMapRect function. Any help or guidance would be greatly appreciated, thanks!</p>
  
  <pre><code>override func drawMapRect(mapRect: MKMapRect, zoomScale: MKZoomScale, inContext context: CGContext) {
  
      super.drawMapRect(mapRect, zoomScale: zoomScale, inContext: context)
      CGContextSaveGState(context)
      CGContextSetBlendMode(context, CGBlendMode.Exclusion)
      CGContextSetFillColorWithColor(context, self.fillColor)
      CGContextSetStrokeColorWithColor(context, UIColor.whiteColor().CGColor)
      CGContextSetLineWidth(context, 1.0)
  
      let point = MKMapPointForCoordinate(self.polygon.points[0])
      CGContextMoveToPoint(context, CGFloat(point.x), CGFloat(point.y))
      for i in 1..&lt;self.polygon.points.count {
          let point = polygon.points[i]
          let p = MKMapPointForCoordinate(point)
          CGContextAddLineToPoint(context, CGFloat(p.x), CGFloat(p.y))
      }
  
      CGContextClosePath(context)
      CGContextDrawPath(context, CGPathDrawingMode.FillStroke)
      CGContextRestoreGState(context)
  }
  </code></pre>
  
  <p>Here is where my custom overlay renderer is initialized: </p>
  
  <pre><code>func mapView(mapView: MKMapView, rendererForOverlay overlay: MKOverlay) -&gt; MKOverlayRenderer {
      if (overlay is MKPolygon) {
          let polygonRenderer = MyCustomMapRenderer(overlay: overlay, fillColor: self.polyFactory!.getPolygonColor().CGColor, polygon: self.currentPolygon!)
          return polygonRenderer
      }
      return MKOverlayRenderer()
  }
  </code></pre>