[英]Show route between current and desired location on iPhone MapView
[英]iPhone dev - Can't show user's current location on mapView
我将mapView的showUserLocation属性设置为YES,但它什么也不做。 我可以使用CLLocationManager将地图置于用户当前位置的中心,但是屏幕上没有图钉/点。 如何在地图上放置大头针以查看用户的确切位置?
在Nib名称中,您可以设置showuserlocation来标记Mapview。
这使我烦了好几次,但是很容易解决
问题是您的代码是:
[self.mapView showUserLocation:YES];
应该:
[self.mapView setShowsUserLocation:YES]
还要确保您也设置了委托
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.