【发布时间】:2018-09-27 05:38:23
【问题描述】:
如何删除地图框默认显示的用户位置图标
- (MGLAnnotationView *)mapView:(MGLMapView *)mapView viewForAnnotation:(id<MGLAnnotation>)annotation{
if (mapView.userTrackingMode == MGLUserTrackingModeFollow) {
return nil;
}
return Nil;
}
嗨,我已经实现了这段代码。我查看了didload试过这个
mapView.tintColor = [UIColor clearColor];
mapView.backgroundColor = [UIColor clearColor];
[mapView.attributionButton setTintColor:[UIColor clearColor]];
但仍然显示...
【问题讨论】:
-
显示您尝试过的代码。
-
R u 使用谷歌地图,如果是,请使用此功能 yourMapView.myLocationEnabled = false
-
我。更新了我的代码@Anbu.karthik
-
我正在使用 mapbox @iOS
-
试试这个 mapView.showsUserHeadingIndicator = false
标签: ios objective-c mapbox