Link to home
Start Free TrialLog in
Avatar of saturation
saturation

asked on

Google Maps API - get 5 nearest zip codes

I'm looking for a very basic API call to the Google Maps API (preferably in Javascript) that gets the 5 nearest zip codes to a zip code passed in as a parameter. I can't seem to find anything on the Internet. Does anyone have an example or a link to do something like this?
Avatar of dimmergeek
dimmergeek
Flag of United States of America image

Working code and an old database can be downloaded at git hub here: https://github.com/Jakobovski/Simple-Zip-Code-Script

Per the code author:
Find all the zip codes in a radius of x miles from a another zip code, or find the distance between two zip codes. The script uses the most up-to-date database provided by the U.S government with 42,000+ records. Using it is as simple as calling a PHP function. This program was written with simplicity in mind. It is very easy to use and install. This script can be used alone or easily integrated with other projects such as a store locator.
The querry could be edited to select just the top five results based on descending order of proximity to your starting zip code.
ASKER CERTIFIED SOLUTION
Avatar of Tom Beck
Tom Beck
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial