检查Mapkit中的用户位置年龄 - MapKit用户位置的GPS精度明显优于CLLocationManager吗? [英] Check user location age in Mapkit - GPS accuracy for MapKit User Location significantly better than from CLLocationManager?

查看:120
本文介绍了检查Mapkit中的用户位置年龄 - MapKit用户位置的GPS精度明显优于CLLocationManager吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在室内使用iPhone 4.
WiFi禁用

Indoors on an iPhone 4. WiFi disabled

运行LocateMe SDK示例或我自己的代码30-60秒可产生2294米的水平精度。细胞塔三角测量非常不准确但合理。查看其他反向地理编码的应用或像Foursquare这样的位置信息显示类似的缺乏准确性。

Running the LocateMe SDK sample or my own code for 30-60 seconds produces horizontal accuracy of 2294 meters. Pretty inaccurate but reasonable for cell tower triangulation. Looking at other apps that do reverse geocoding or location stuff like Foursquare shows a similar lack of accuracy.

但是,如果我切换到我的应用中使用Mapkit的另一个视图并检查/显示它所在的用户位置。我的意思是在地图上准确的房子级别,我将与WiFi级别位置或强大的GPS读取相关联。

However, if I switch over to another view in my app that uses Mapkit and check/display the user location it is spot on. I mean to the house level accurate on the map which I would associate with WiFi level location or a strong GPS read.

所以我认为Mapkit可能依赖于缓存在我的设备上启用WiFi时导出的位置读取。我在设置中关闭了位置服务。重新启动地图应用程序将地图从我当前位置移开。退出重新启用的位置服务。再次打开地图应用程序 - bingo右后方有强大的位置读取。

So I figured that Mapkit is likely relying on a cached location read that was derived when WiFi was enabled on my device. I turned off location services in settings. Restarted the Map app moved the map away from my current location. Exit Re-enabled location services. Open Map app again - bingo right back with the strong location read.

据我所知,位置服务是系统级单例,意味着相同的数据与MapKit共享使用我的CLLocationManager实例。我唯一能想到的是,MapKit上的位置被更加宽松地缓存,即使启动了map.app,关闭位置服务也无法清除它的缓存。

As far as I know the Location Service is system level singleton meaning the same data is shared with MapKit as with my CLLocationManager instance. The only thing I can think of is the location is being cached more liberally on MapKit and turning off location services doesn't clear it's cache even when map.app is started.

有人知道在MapKit中检查用户位置的年龄的方法吗?我想进一步调查,即使它是一个我无法发送的无证电话或财产我真的很想用它来调试以了解发生了什么。

Is anyone aware of a way to check the age of the user location in MapKit? I'd like to investigate further and even if it's an undocumented call or property I can't ship with I'd really like to use it for debugging to understand what is going on.

谢谢

推荐答案

您可以访问 MKMapView <使用的用户位置的时间戳/ code>如下:

You can access the timestamp of the user's location used by a MKMapView as follows:

[[[mapView userLocation] location] timestamp];

时间戳是 NSDate ,它告诉我们你确定这个位置的时候。

The timestamp is an NSDate and it tells you when this location was determined.

这篇关于检查Mapkit中的用户位置年龄 - MapKit用户位置的GPS精度明显优于CLLocationManager吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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