MapKit - 当第一个关闭时如何获得准确的初始读数>有时1000米?
当我一直在使用 MapKit 时,我注意到当我的应用程序首次启动时,我在各处绘制了线条(我正在进行 GPS 跟踪),这表明初始读数已经偏离了很远。
我的MapKit是在它自己的MapViewController中实现的,并且所有内容都在viewDidLoad方法中初始化(即[locationManager startUpdatingLocation:YES])
是否有一个好的实践/方法在 viewDidLoad 中,您可以在显示地图和您当前位置之前触发一些 ActionSheet 或某些东西来确定您的位置,以尽可能准确?
As I've been playing with MapKit, I've noticed that when my application first launches I have drawn lines all over the place (I'm doing GPS tracking) which shows the initial readings have been way off.
My MapKit is implemented in it's own MapViewController and everything is initialized in the viewDidLoad method (ie. [locationManager startUpdatingLocation:YES])
Is there a good practice / method though where in the viewDidLoad you can fire off some ActionSheet or something which determines the your location to the best possible accuracy initially before presenting the map and your current location?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在返回的位置的精度小于应用程序将绘制的线条宽度的一半之前,请勿绘制线条。或者让线条变得更粗,直到。
另外,检查位置上的时间戳以确保它们是最近的。
Don't draw a line until the location is returned with an accuracy narrower than half the width of the lines your app will be drawing. Or make the lines much fatter until.
Also, check the time stamp on the locations to make sure that they are recent ones.