Created
February 6, 2017 23:55
-
-
Save fmo91/0afbd203f5b4feabc6f52182958d8d5a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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