For the moment, I use mapView.showsUserLocation=YES;
for the radiating blue icon showing the iPhone's position, but do not know how to get the coordinates behind it.
I tried the locationManager:didUpdateToLocation:fromLocation:
with the configuration of self.locationManager = [[[CLLocationManager alloc] init] autorelease];
locationManager.delegate = self;
locationManager.distanceFilter=kCLDistanceFilterNone; //record every movement
locationManager.desiredAccuracy=kCLLocationAccuracyBest;
[locationManager startUpdatingLocation];
I tried either both yourGPS=newLocation.coordinate;
and yourGPS=mapView.userLocation.location.coordinate;
in the didUpdateToLocation
, but most of the time I can see the blue bubble (controlled by the mapView.showsUserLocation=YES;
moving ahead, but the coordinates recorded in the in the didUpdateToLocation
are not changing.
Where should I put yourGPS=mapView.userLocation.location.coordinate;
to keep logging the coordinates driving the blue bubble please?
Thanks for any info.