Skip to content

Instantly share code, notes, and snippets.

@fmo91
Created February 6, 2017 23:55
Show Gist options
  • Save fmo91/0afbd203f5b4feabc6f52182958d8d5a to your computer and use it in GitHub Desktop.
Save fmo91/0afbd203f5b4feabc6f52182958d8d5a to your computer and use it in GitHub Desktop.
private func configureTileOverlay() {
// We first need to have the path of the overlay configuration JSON
guard let overlayFileURLString = Bundle.main.path(forResource: "overlay", ofType: "json") else {
return
}
let overlayFileURL = URL(fileURLWithPath: overlayFileURLString)
// After that, you can create the tile overlay using MapKitGoogleStyler
guard let tileOverlay = try? MapKitGoogleStyler.buildOverlay(with: overlayFileURL) else {
return
}
// And finally add it to your MKMapView
mapView.add(tileOverlay)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment