I am using
startMonitoringSignificantLocationChanges
for getting the (lat,lon) values.My problem is
- (void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation
method doesn't gets called immediately after [locationMangerObject startMonitoringSignificantLocationChanges];
is encountered.Inside didUpdateToLocation
method only i maintain two global double variables for holding latitude and longitude which will be set from the coordinates obtained from didUpdateToLocation
method.These values are passed to the webservice,since didUpdateToLocation is called only a certain delay,between which the parameters for (lat,lon) takes zero as their value and passed to the service which results in an unexpected response.
How to make
- (void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation
method to get called immediately after `[locationMangerObject startMonitoringSignificantLocationChanges]; is encountered.
Please anybody suggest me a solution for resolving this issue.
Thanks in advance.