Reputation: 1675
I am developing an application that allows the user to show the itinerary from the current location to the destination. The itinerary must be refreshed when the user's current location changes. I am using the LocationManager to detect the current location. When the current location changes, i re-fetch the directions and display a new itinerary that starts from the new current location. Is there a better and cleaner solution to achieve this ? Thanks.
Upvotes: 0
Views: 141
Reputation: 9841
What you are doing is correct way. Use following method of CLLocationManagerDelegate
-(void)locationManager:(CLLocationManager *)manager didUpdateLocations:(NSArray *)locations
{
}
to get location update and chage the display accordingly.
Upvotes: 1