我如何确定由CLLocationManager返回的位置信息是否有效? [英] How can i determine if location information returned by CLLocationManager is valid?

查看:115
本文介绍了我如何确定由CLLocationManager返回的位置信息是否有效?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何确定CLLocationManager返回的位置信息是否有效? 解决方案

要查找两件事情,时间戳和hdop(水平精度)。第一个会告诉你什么时候阅读,第二个会告诉你阅读的错误程度。例如1000的hdop会告诉你,测量精确到1000米以内。显然,hdop越低越好。



它们都在Core Location更新中。


How can I determine if location information returned by CLLocationManager is valid?

解决方案

Two things to look for, the timestamp and the hdop (Horizontal Degree of Precision). The first one will tell you when the reading was taken, the second will tell you the level of error in the reading. For example a hdop of 1000 will tell you that the measurement is accurate to within 1000 metres. Obviously the lower the hdop the better.

They are both in the Core Location update you get.

这篇关于我如何确定由CLLocationManager返回的位置信息是否有效?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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