开发者

MapKit - How to get accurate initial reading when first ones are off > 1000 meters sometimes?

开发者 https://www.devze.com 2023-02-11 11:51 出处:网络
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

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 poss开发者_如何学Goible accuracy initially before presenting the map and your current location?


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消