Ios 如何在Mapbox中禁用用户位置注释的标注?

Ios 如何在Mapbox中禁用用户位置注释的标注?,ios,swift,mapbox,Ios,Swift,Mapbox,如何在Swift的Mapbox中禁用附加到用户位置注释的“您在这里”标注?您需要实现以下方法来检查用户位置注释 func mapView(_ mapView: MGLMapView, annotationCanShowCallout annotation: MGLAnnotation) -> Bool { if annotation is MGLUserLocation { return false } else { return true

如何在Swift的Mapbox中禁用附加到用户位置注释的“您在这里”标注?

您需要实现以下方法来检查用户位置注释

func mapView(_ mapView: MGLMapView, annotationCanShowCallout annotation: MGLAnnotation) -> Bool {
    if annotation is MGLUserLocation {
        return false
    } else {
        return true
    }
}

您需要实现以下方法来检查用户位置注释

func mapView(_ mapView: MGLMapView, annotationCanShowCallout annotation: MGLAnnotation) -> Bool {
    if annotation is MGLUserLocation {
        return false
    } else {
        return true
    }
}