Finding user location before map loads

Posted by 4thSpace on Stack Overflow See other posts from Stack Overflow or by 4thSpace
Published on 2010-03-12T20:34:30Z Indexed on 2010/03/12 20:37 UTC
Read the original article Hit count: 212

Filed under:
|
|
|

I'm trying to find the user's location using:

CLLocationCoordinate2D _location;
CLLocation *userLoc = nil;
if(appDelegate.clLocationManager.locationServicesEnabled){
    userLoc = mapView.userLocation.location;
    _location = userLoc.coordinate;
}

The problem is that I haven't yet initialized the map so the above doesn't work. Is there a way to get the user's location without using mapkit? Or should I be using a different technique?

© Stack Overflow or respective owner

Related posts about iphone

Related posts about iphone-sdk