CLLocationManager没有互联网吗?

编程入门 行业动态 更新时间:2024-10-28 04:24:28
本文介绍了CLLocationManager没有互联网吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

愚蠢的问题!!虽然我想知道CLLocationManager可以在没有Internet的情况下工作吗?????

Silly question !! Though I want to know that is it possible that CLLocationManager works without Internet ?????

即。 iPhone根本没有连接到互联网

i.e. iPhone is not connected to internet at all

推荐答案

iPhoneiPadDev的答案有些错误:虽然有时的位置经理会失败,它可以在没有网络连接的情况下工作如果你想亲眼看看这个,可以去一个可怕的或不存在蜂窝接收的地方:GPS仍然有效。

iPhoneiPadDev's answer is slightly wrong: whilst sometimes the location manager will fail, it can work without network connectivity. If you want to see this for yourself, go for a drive somewhere with terrible or nonexistent cellular reception: GPS will still work.

这很大程度上取决于周围的环境条件你和你正在使用的设备。 iPod Touches和一些iPad没有GPS,并依靠WiFi热点来确定他们的位置数据。如果您没有网络访问权限, CLLocationManager 将返回无效位置。

It very much depends on the environmental conditions around you, and the device you're using. iPod Touches and some iPads don't have GPS, and rely on WiFi hotspots to determine their location data. If you don't have network access the CLLocationManager will return an invalid location.

iPhone和3G iPad 拥有GPS,因此您可以获得返回的适当位置。 然而,他们使用A-GPS(辅助GPS),它使用来自网络的信息以实现更快的GPS锁定。如果您没有互联网连接,GPS芯片可能需要一些时间才能获得信号并提供准确的位置:如果您在室内或者看不到天空,那么准确性可能会大幅下降。

iPhones and 3G iPads do have GPS, so you may get an appropriate location returned. However, they use A-GPS (assisted GPS), which uses information from the network to allow a faster GPS lock. If you don't have internet connectivity it may take some time for the GPS chip to obtain a signal and provide an accurate location: and accuracy may be wildly off, if you're indoors or don't have plain sight of the sky.

重要事项: CLLocationManager 即使没有可用的地址也能返回您的位置:但坐标无效。重要的是要测试返回的位置,并确保在使用它们之前确定它们是正确的。

Important point: CLLocationManager can and will return you locations even if none are available: the coordinates, however, will be invalid. It's important to test the locations being returned and make sure you're satisfied they are correct before using them.

更多推荐

CLLocationManager没有互联网吗?

本文发布于:2023-11-27 17:03:22,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1638855.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:互联网   CLLocationManager

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!