CoreLocation如何定位设备? [英] How does CoreLocation locate the device?
问题描述
更具体地说,CL是否要求用户建立数据连接?还是可以只使用电话服务连接?
More specifically, does CL require the user to have a data connection? Or is it possible to just use the phones service connection?
谢谢!
推荐答案
它实际上使用了多种机制.
It actually uses several mechanisms.
- GPS
- 蜂窝塔三角剖分
- Wifi热点编目
- 随机假设你在库比蒂诺(little Cupertino)
需要根据速度,精度和可用硬件进行权衡.当iPhone模拟器使用最后一种机制时,第一代iPad将仅提供3选项.
There are tradeoffs based on speed, precision, and available hardware. A first Gen iPad will only have the 3 option available while the iPhone simulator makes use of the last mechanism.
您可以在地图应用程序中观察这些系统的差异,该应用程序最初会根据蜂窝塔进行猜测,然后通过GPS完善猜测.
You can observe the difference in these systems in the map application where it initially guesses based on the cell tower, then refines the guess via GPS.
只有选项3需要数据连接.
Only options #3 requires a data connection.
对于包括#4在内的幽默受损者,虽然在功能上是正确的,但并不完全严重. (我认为他们模拟的是GPS报告的位置信息,而不仅仅是对其进行硬编码,但我没有检查.)
And for the humor impaired including #4 was not totally serious although it is functionally correct. (I think they simulate the GPS reporting that location rather than just hard coding it, but I haven't checked.)
这篇关于CoreLocation如何定位设备?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!