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

时间:2017-09-13 03:39:45

标签: ios swift mapbox

如何禁用"你在这里" callout附加到Swift中Mapbox中的用户位置注释?

1 个答案:

答案 0 :(得分:2)

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

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