简体   繁体   中英

How can i determine if iphones CoreLocation is using satellites or cell tower triangulation to find the current location?

I'm using CoreLocation to find a users current location and display it on a map. I want to show an icon with an antenna when the location is established using satellites and a icon with towers when it uses tower cell triangulation. In my test app i set the desired accuracy to be kCLLocationAccuracyNearestTenMeters if using tower cell triangulation this may never be reached but when it uses satellites i had promising results.

How can i determine the mode of retrieving the current location, satellites or towers, should i see if the accuracy provided by CoreLocation is less than the desired one then is using satellites and if not is using tower cell triangulation or there is another way?

框架不公开确定位置的方法。

区分GPS更新的一种方法是:设置高度参数。

While the framework does not expose which hardware device is providing location information, it does provide accuracy information with the properties: horizontalAccuracy and verticalAccuracy . You can fake it by looking at how precise those values are.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM