1

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 call the mapView.showUserLocation=YES; on the button's click event?

Stephen
  • 1,154
  • 11
  • 27
Rahul Vyas
  • 28,260
  • 49
  • 182
  • 256

1 Answers1

7

When you want to show the current user location simply write

[mapView setShowsUserLocation:YES];

Niels Castle
  • 8,039
  • 35
  • 56