2011-12-21 85 views
1

我有一个奇怪的问题。我有一个应用程序,它使用GPS进行基于位置的更新以显示地图。我发现应用程序内的GPS精确度很差,但如果我打开Goog​​le地图并返回到我的应用程序,那么准确性就会显现。打开Goog​​le地图后GPS位置更新更准确吗?

任何想法?

- (void)locationManager:(CLLocationManager *)manager 
     didUpdateToLocation:(CLLocation *)newLocation 
     fromLocation:(CLLocation *)oldLocation 
{ 
double lat; 
double lng; 
lat = newLocation.coordinate.latitude; 
lng = newLocation.coordinate.longitude; 

//Other stuff that uses the location 
} 

回答

1

你可以要求特定的精度,当你创建你的位置管理是这样的:

[manager setDesiredAccuracy:kCLLocationAccuracyBest]; 

documentation here

+0

谢谢,我会试一试,让你知道它是否有帮助。 – Adam 2011-12-23 01:29:20

+0

花了一段时间才得到用户反馈,但似乎已经做到了。谢谢! – Adam 2012-04-17 11:44:06

相关问题