开发者

how to show mapkit blue dot(user's location) at desired location?

开发者 https://www.devze.com 2022-12-09 07:48 出处:网络
I am using MapKit. I want to know how to get current user\'s location. The MapKit shows a blue dot at current user location.

I am using MapKit. I want to know how to get current user's location. The MapKit shows a blue dot at current user location.

I want to do something like this: The user location is showed on the map. I have a button which, on clicking again, gets the current user location and shows the blue dot there.

Do I need to use locationManager or just ca开发者_运维知识库ll the mapView.showUserLocation=YES; on the button's click event?


When you want to show the current user location simply write

[mapView setShowsUserLocation:YES];

0

精彩评论

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