开发者

How can I move MkMapView.userLocation on iPhone?

开发者 https://www.devze.com 2023-03-20 23:20 出处:网络
I want to make an application that will need userLocati开发者_JS百科on, but MkMapView.userLocation is just readonly, can\'t be change. how can I use it? can I setting userLocation like

I want to make an application that will need userLocati开发者_JS百科on, but MkMapView.userLocation is just readonly, can't be change. how can I use it? can I setting userLocation like myMap.userLocation=MyCurrentLocation;

any code I need to make it easy?


You need CLLocationManager to get the current location of the user updated. The locationManager:didUpdateToLocation:fromLocation: method of CLLocationManagerDelegate will update you the current user location.

You may follow this tutorial to learn to implement it.

0

精彩评论

暂无评论...
验证码 换一张
取 消