2011-12-21 90 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

相關問題