开发者

MKMapKit true distance between two annotations

I want to make a application that calculates the distance between the user's current location and the nearest something (store, whatnot). Is there any way to obtain the real distance (following public roads ) instead of a direct dista开发者_开发问答nce (line from point A to B) ??

Thank you


Use google API to get the route and distance: http://code.google.com/apis/maps/documentation/directions/

I don't think you can get the route (following roads) from MKMapKit.

The google maps API will return the route (following roads) as a set of latitude and longitude coordinates. It will also return the calculated distance.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜