iOS使用GPS设备获取当前位置 [英] iOS get current location using GPS device

查看:253
本文介绍了iOS使用GPS设备获取当前位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用CLLocationManager来使用GPS天线获取当前的用户位置,而不是蜂窝网络。我怎样才能确保这一点?

解决方案

您的选择是标准的位置服务(例如 startUpdatingLocation ,您可以指定 desiredAccuracy )或低功耗重要更改服务(例如, startMonitoringSignificantLocationChanges )。但是您通常不会根据硬件指定位置服务,而是根据您的应用程序的功能需求来指定位置服务。如果您需要准确的位置,请使用标准服务,如果您不需要相同级别的精确度,请尝试使用重要更改服务。 =http://developer.apple.com/library/ios/#documentation/userexperience/conceptual/LocationAwarenessPG/CoreLocation/CoreLocation.html#//apple_ref/doc/uid/TP40009497-CH2-SW1 =nofollow >位置感知指南获取更多信息。


I want to use CLLocationManager to get the current user location using GPS antenna, not the cellular network. How can I ensure that?

解决方案

Your choices is either the standard location service (e.g. startUpdatingLocation, for which you can specify the desiredAccuracy), or the low-power significant change service (e.g., startMonitoringSignificantLocationChanges). But you generally don't specify location services based upon hardware, but rather on the basis of your app's functional needs. Use the standard service if you need an accurate location, and try using the significant change service if you don't need the same level of precision.

See the Location Awareness Guide for more information.

这篇关于iOS使用GPS设备获取当前位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆