Question

I would like to know if it is possible to get the total miles traveled (via road/interstate) in each state instead of the total miles only.

For example: From Chicago, IL to Atlanta, GA the total miles traveled in each state would be: IL=16 miles IN=284 miles KY=137 miles TN=152 miles GA=128 miles

From what I understand this is not possible in google maps api but I wanted to see if it is possible using anything else, Bing, YAhoo, Mapquest ???

Thanks for any help...

Was it helpful?

Solution

You might be able to use the MapQuest Directions Service to come up with very basic/general distances for each state, but I'm not sure if the distances will be exact enough to fit your needs. Basically, the directions service returns driving directions in terms of "maneuvers" and you can make a request to the directions service that tells it to include crossing state boundaries in the maneuvers it returns. You may be able to parse the data that is returned to calculate the route distances between the "crossing into (state name)" maneuvers, but again, it might not be exact enough.

It might be worth a look. I've never done this before, but it's my first thought. The MapQuest Developer Network has forums, so it might be worth it to post the question there, too.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top