我正在使用以下条件以确保我获得的位置具有足够的准确性,在我的情况下为 kCLLocationAccuracyBest。但问题是我的位置仍然不准确。
// Filter out nil locations
if(!newLocation)
return;
// Make sure that the location returned has the desired accuracy
if(newLocation.horizontalAccuracy < manager.desiredAccuracy)
return;
// Filter out points that are out of order
if([newLocation.timestamp timeIntervalSinceDate:oldLocation.timestamp] < 0)
return;
// Filter out points created before the manager was initialized
NSTimeInterval secondsSinceManagerStarted = [newLocation.timestamp timeIntervalSinceDate:locationManagerStartDate];
if(secondsSinceManagerStarted < 0)
return;
// Also, make sure that the cached location was not returned by the CLLocationManager (it's current) - Check for 5 seconds difference
if([newLocation.timestamp timeIntervalSinceReferenceDate] < [[NSDate date] timeIntervalSinceReferenceDate] - 5)
return;
当我激活 GPS 时,我在实际得到准确结果之前得到了不准确的结果。您使用什么方法来获取准确/精确的位置信息?