I'm after a callback or protocol that will notify me when the user's location is available. So that when a user's location is found I can zoom into where they are. What can I use to do this?
I was thinking there waas something in CoreLocation that could do it, but I can't find how to do it.
[Update]
I've implemented <CLLocationManagerDelegate>
with locationManager:didUpdateToLocation:fromLocation:
and created an CLLocationManager instance.
locationManager = [[[CLLocationManager alloc] init] autorelease];
locationManager.delegate = self;
[locationManager startUpdatingLocation];
but I'm still not getting any location updates. Also if I use didUpdateLocation:
then it will re-zoom to the user each update. Is there a better way than having a check to see if it's the first update?
[Update 2]
adding self.
to the locationManager
got it going and I checked to see if fromLocation:
is nil
to tell if it was the first update.