title: GEOSwift and MapviewOverlays (Swift)
body: <p>ViewController.swift</p>
  
  <p>import UIKit
  import MapKit
  import GEOSwift</p>
  
  <p>class ViewController: UIViewController, MKMapViewDelegate {</p>
  
  <pre><code>@IBOutlet weak var mapView: MKMapView!
  
  override func viewDidLoad() {
  
      mapView.delegate = self
      super.viewDidLoad()
      addBoundry()
  
  }
  
  func addBoundry()
  {
  
      if let geoJSONURL = NSBundle.mainBundle().URLForResource("multipolygon", withExtension: "geojson"),
          let geometries = try! Geometry.fromGeoJSON(geoJSONURL),
          let geo = geometries[0] as? MultiPolygon
      {
  
          geo
  
      }
  
      //mapView.addOverlay(geo)
  }
  
  
  func mapView(mapView: MKMapView, rendererForOverlay overlay: MKOverlay) -&gt; MKOverlayRenderer {
      if overlay is MKPolygon {
          let polygonView = MKPolygonRenderer(overlay: overlay)
          polygonView.strokeColor = UIColor.magentaColor()
  
          return polygonView
      }
  
      return MKOverlayRenderer()
  }}
  </code></pre>
  
  <ul>
  <li>Multipolygon.geojson is filled with the Geometries of italy 
  <a href="https://github.com/andreacremaschi/GEOSwift/blob/master/GEOSPlayground.playground/Resources/multipolygon.geojson" rel="nofollow">https://github.com/andreacremaschi/GEOSwift/blob/master/GEOSPlayground.playground/Resources/multipolygon.geojson</a></li>
  </ul>
  
  <p>I'm trying to use the libary because i want to create A Polygon with holes.
  But i cant find a way to solve my problem.</p>
  
  <p>when i try to add the Multipolygon with addoverlay </p>
  
  <p>it throws a error</p>
  
  <pre><code>Cannot invoke 'addOverlay' with an argument list of type '(MultiPolygon&lt;Polygon&gt;)'
  </code></pre>
  
  <p>anyone with a method to solve my problem ?</p>