views:

414

answers:

2

Hi,

I need to find the driving distance between 2 locations. I do not need to display the directions in a map, just need to calculate the distance, which I need to use in my application.

Does MapKit allow this? Is there an alternative that can be used?

I am able to get forward geo-coding using CloudMade, but there doesn't seem to be an option to obtain driving distance.

Appreciate any help.

+2  A: 

CloudMade also offers driving directions. If you are only interested in the distance, simply ignore the instructions.

An API-Call looks like this:

http://navigation.cloudmade.com/YOUR-API-KEY-GOES-HERE/api/0.3/47.25976,9.58423,47.26117,9.59882/car/shortest.js

and the JSON includes

....
route_summary: {
total_distance: Distance in meters,...

Source

Felix
Thanks for the heads up. That works. The frustrating part is that the cloudmade API is in such intense development that documentation becomes easily outdated. Is there a v2 version of this call, or will this call continue to work in the future?Thanks.
Prasanna
We have worked with the API for routing since August last year and did not see any changes since (other than it becoming faster and better on the backend).
Felix
A: 

Found this in Google Groups, is that helpful?

http://groups.google.com/group/google-maps-api/msg/4dc2fad4f74e3314?pli=1

Marco