location caching
the CLLocationManager is caching location so that i show up where i last got a good gps location. you can fix that by ignoring CLLocation updates that are older than a certain time:
NSTimeInterval howRecent = [newLocation.timestamp timeIntervalSinceNow];
if(abs(howRecent) > 5.0){
return;
}
NSTimeInterval howRecent = [newLocation.timestamp timeIntervalSinceNow];
if(abs(howRecent) > 5.0){
return;
}
1
person has this question
I have this question, too!
Tell me when someone answers.
The more people who ask this question, the more it gets noticed.
The more people who ask this question, the more it gets noticed.
Create a customer community for your own organization
Plans starting at $19/month
-
Inappropriate?John, we'll look into this. We should be doing that already, but it doesn't always work.
-
Inappropriate?John,
We're doing this:
// throw out anything that is older than our app launch (cached location values)
if ([appStartDate earlierDate:newLocation.timestamp] == newLocation.timestamp )
return;
However, it doesn't seem to work reliably, CL is reporting the loc with a recent timestamp, even though it's old.
Martin
1 person says
this answers the question
Loading Profile...



EMPLOYEE