Waes Antoine
Waes Antoine

Reputation: 33

iOS 6 and Mapkit : User location

I was suprise when i saw that my app can't know where I am located with a MapKit on iOS6 !

I just want to zoom to user's location when the map is starting ! How can I do it ?

Please help me

Thank you so much !! (PS: I saw that the CLCoordinate for sending a request for routing is working fine)

Upvotes: 0

Views: 2022

Answers (1)

mightym
mightym

Reputation: 191

Do you mean that showsUserLocation doesn't have any effect? Or does your location monitoring isn't updating you position? I tested both in iOS 6, works for me. Maybe you could post some code.

EDIT:

Seems like location monitoring is not activated in your app. First of all you have to do sth like this to enable the cllocation manager:

if (nil == locationManager)
    locationManager = [[CLLocationManager alloc] init];

//set the delegate for the location manager
locationManager.delegate = self;
// set your desired accuracy
locationManager.desiredAccuracy = kCLLocationAccuracyKilometer;

[locationManager startUpdatingLocation];

At that point the blue location indicator should be visible. As long as you've set showsUserLocation = YES on your map.

Upvotes: 2

Related Questions