iPhone dev - 无法在mapView上显示用户的当前位置

时间:2011-08-04 16:55:46

标签: iphone android-mapview mkannotation

我将mapView的showUserLocation属性设置为YES,它什么都不做。我能够使用CLLocationManager将地图置于用户当前位置的中心位置,但屏幕上没有引脚/点。如何在地图上放置针脚以确定用户的确切位置?

2 个答案:

答案 0 :(得分:0)

这让我搞砸了几次,但这很容易解决

问题是你的代码是:

 [self.mapView showUserLocation:YES];

应该是:

 [self.mapView setShowsUserLocation:YES]

还要确保您也设置了委托

答案 1 :(得分:0)

在Nib名称中,您可以设置showuserlocation以标记Mapview。

相关问题