Tuesday, 10 September 2013

CLLocation Manager not updating new location

CLLocation Manager not updating new location

I am calling cllocation manager and its calling its delegate method as
well. But my problem is, its not updating its New Location after
travelling a km.
i am calling cllocation manager like this :-
locationManager = [[CLLocationManager alloc] init];
locationManager.delegate = self;
locationTimer=[NSTimer scheduledTimerWithTimeInterval:1.0 target:self
selector:@selector(updateLocation1:) userInfo:nil repeats:YES];
locationManager.distanceFilter = kCLDistanceFilterNone;
locationManager.desiredAccuracy = kCLLocationAccuracyBestForNavigation;
// Method did update location - Update location when location change
- (void)locationManager:(CLLocationManager *)manager
didUpdateLocations:(NSArray *)locations
{
// this method is calling after every 1 sec interval time..
}
-(void)locationManager:(CLLocationManager *)manager
didUpdateToLocation:(CLLocation *)newLocation
fromLocation:(CLLocation *)oldLocation {
// this method is not calling once also after travelling around a km
....
}
So please tell me were, i am doing anything wrong. Thanks in advance.

No comments:

Post a Comment