Skip to content

Instantly share code, notes, and snippets.

@fmo91
Last active February 7, 2017 13:29
Show Gist options
  • Save fmo91/fda881628190e880f17de35a5ceea785 to your computer and use it in GitHub Desktop.
Save fmo91/fda881628190e880f17de35a5ceea785 to your computer and use it in GitHub Desktop.
Sample use for rendererForOverlay
func mapView(_ mapView: MKMapView, rendererFor overlay: MKOverlay) -> MKOverlayRenderer {
// This is the final step. This code can be copied and pasted into your project
// without thinking on it so much. It simply instantiates a MKTileOverlayRenderer
// for displaying the tile overlay.
if let tileOverlay = overlay as? MKTileOverlay {
return MKTileOverlayRenderer(tileOverlay: tileOverlay)
} else {
return MKOverlayRenderer(overlay: overlay)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment