0

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...

compcobalt
  • 1,322
  • 7
  • 31
  • 61
  • Huh ? Don't understand the question. – JonH Jan 16 '12 at 20:24
  • Since you use the word 'travel' in your question, I'm confused as to whether you want to measure distance using a direct path from the center of one city to the other (i.e. ignoring roads and airline routes), or whether you actually want some other kind of distance. In the former case, I'm not really sure how the resulting numbers would be meaningful/useful. – void-pointer Jan 16 '12 at 20:27
  • Distance Traveled via the Road/Interstate. – compcobalt Jan 16 '12 at 22:45
  • Possible duplicate of [Google Maps API - detect when crossing state lines and calculate distance travelled in each state](http://stackoverflow.com/questions/17660677/google-maps-api-detect-when-crossing-state-lines-and-calculate-distance-travel) – geocodezip Mar 19 '16 at 00:27
  • possible duplicate of [Google maps api v3 calculate mileage by state](http://stackoverflow.com/questions/34028829/google-maps-api-v3-calculate-mileage-by-state) – geocodezip Mar 19 '16 at 00:29

2 Answers2

0

You can keep track of miles driven in each state (Example: Travel from home in New Mexico to (any city)Texas. These programs will do this for you, Trulos.com, IFTA Plus, truckingoffice.com, ifta-calculator.com Some are free others usually give a 30 day free trial. I use programs like this when I'm filing mileage/fuel reports for commercial drivers. These drivers always have to report how many miles they travel in "each" state. All you have to enter is the location of your starting point and your final destination. The program will then calculate your miles traveled for each state and also will give you the "total" miles traveled.

Dharman
  • 30,962
  • 25
  • 85
  • 135
0

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.

jharahush
  • 767
  • 4
  • 6