2015-11-06 55 views
1

我使用蜂窩數據獲取了錯誤的座標,但是當我使用wifi時,它獲取了正確的座標。我正在使用CLLocationManager獲取座標。我已經從一個月。提前致謝。在iOS中通過蜂窩網絡跟蹤時獲取錯誤的座標

self.locationManagerForCheckIn=[[CLLocationManager alloc] init]; 
self.locationManagerForCheckIn.delegate = self; 
self.locationManagerForCheckIn.distanceFilter = kCLDistanceFilterNone; 
self.locationManagerForCheckIn.desiredAccuracy = kCLLocationAccuracyBest; 
     if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 8.0) 
     [self.locationManagerForCheckIn requestWhenInUseAuthorization]; 

[self.locationManagerForCheckIn startUpdatingLocation]; 
+0

喜請檢查該http://stackoverflow.com/a/9954020/2910061 – ilesh

回答

0

我認爲它與cllocation的常見問題並不能保證實際的準確性。作爲文檔

當要求高精度的位置數據,通過位置服務交付的初始事件 可能沒有你 要求的精度。位置服務儘可能快地發送初始事件 。然後,它會繼續根據您請求的準確性確定該位置,並根據需要提供其他事件, (該數據可用時)。

我suggesions以獲得最佳效果

locationManager.desiredAccuracy = kCLLocationAccuracyBestForNavigation; 

,並請這也locationmanager responsiveness

相關問題