[英]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.