Check whether a CLLocation is based on GPS or cellular

左心房为你撑大大i 提交于 2020-01-24 22:22:10

问题


With a 3G GPS device (i.e. iPad 3G) is there a way to know if a reported CLLocation is based on a GPS signal, and not the inaccurate cellular data?


回答1:


The CLLocation class has a method called -horizontalAccuracy:. This will give you some idea of the radius of accuracy of that measurement. This is probably better than asking just "is it GPS" because GPS readings can also be pretty inaccurate, depending on receiving conditions and satellite visibility.



来源:https://stackoverflow.com/questions/6907584/check-whether-a-cllocation-is-based-on-gps-or-cellular

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!