Forum Moderators: phranque

Message Too Old, No Replies

Google Maps - Distance between ZIP

         

webfoo

12:48 pm on Jul 13, 2008 (gmt 0)

10+ Year Member



Does Google Maps (or any other product) have a feature for web developers that returns the distance between two ZIP codes? I don't want all the directions and maps, just a number - the distance in miles. Wher I input two ZIP codes like this ...

[maps.example.com...]

and it will return a number like

16

which is the number of miles between the ZIP codes.

eelixduppy

3:25 am on Jul 14, 2008 (gmt 0)



This script can be written by you if you have access to a few things. 1) Server-side scripting language (ie PHP), and a database containing a list of all national zipcodes with a relative location for each (coordinates). Databases such as these can be found for free, although the accuracy of them may be off and they aren't nearly updated that much, or purchased from a company which would be much more accurate. As far as the script goes it's not that much once you have the data, but I'm sure you can find something other there that is prewritten for this use. Check on the online script repositories such as [sourceforge.net,...] [hotscripts.com,...] etc...