Reputation: 2974
How do I disable the "You are here" callout attached to the user location annotation in Mapbox in Swift?
Upvotes: 0
Views: 418
Reputation: 4064
You need to implement the following method which checks for the user location annotation.
func mapView(_ mapView: MGLMapView, annotationCanShowCallout annotation: MGLAnnotation) -> Bool {
if annotation is MGLUserLocation {
return false
} else {
return true
}
}
Upvotes: 4