我当时正在 iOS 中进行地理围栏工作。我实际上想在地图上设置不同的区域,每个区域的半径不同。
我实际上想知道 iOS 地理围栏中区域的最小和最大半径。
Thanks,
在 iOS 中,没有指定最小半径。苹果表示,“具体的阈值距离由硬件和当前可用的定位技术决定。例如,如果禁用 Wi-Fi,区域监控的准确度就会明显降低。但是,出于测试目的,您可以假设最小距离约为 200 米。”
(来源:https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/LocationAwarenessPG/RegionMonitoring/RegionMonitoring.html#//apple_ref/doc/uid/TP40009497-CH9-SW11 https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/LocationAwarenessPG/RegionMonitoring/RegionMonitoring.html#//apple_ref/doc/uid/TP40009497-CH9-SW11)
最大半径由 CLLocationManager.maximumRegionMonitoringDistance 指定,该值特定于设备和操作系统。 “该值可能会根据设备的硬件功能以及动态变化的资源限制而变化。”在我的 iPhone 5s 模拟器上,该值为 2128000.0(米,因为 MaximumRegionMonitoringDistance 是 CLLocationDistance)。
(来源:https://developer.apple.com/library/IOS/documentation/CoreLocation/Reference/CLLocationManager_Class/index.html#//apple_ref/occ/instp/CLLocationManager/maximumRegionMonitoringDistance https://developer.apple.com/library/IOS/documentation/CoreLocation/Reference/CLLocationManager_Class/index.html#//apple_ref/occ/instp/CLLocationManager/maximumRegionMonitoringDistance和 CLLocationManager.h)
在有很多建筑物的城市峡谷(例如纽约市)中,无论距离如何,地理围栏可能都没有用,您可能需要依赖 iBeacons。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)