Solved

Google Maps API - get 5 nearest zip codes

Posted on 2013-12-13
3
1,347 Views
Last Modified: 2013-12-19
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?
0
Comment
Question by:saturation
  • 2
3 Comments
 
LVL 7

Expert Comment

by:dimmergeek
ID: 39717860
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.
0
 
LVL 7

Expert Comment

by:dimmergeek
ID: 39717862
The querry could be edited to select just the top five results based on descending order of proximity to your starting zip code.
0
 
LVL 38

Accepted Solution

by:
Tom Beck earned 500 total points
ID: 39718791
Maybe this can help. I answered a similar question in June and provided a working example that sorts through 10 locations to find the two closest to a zip code entered. It also lists the 10 locations and the number of miles each is from the zip code.

http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Jquery/Q_28161118.html
0

Featured Post

ScreenConnect 6.0 Free Trial

At ScreenConnect, partner feedback doesn't fall on deaf ears. We collected partner suggestions off of their virtual wish list and transformed them into one game-changing release: ScreenConnect 6.0. Explore all of the extras and enhancements for yourself!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I've been trying to accomplish this for a while and it just struck me yesterday how to accomplish this task. I have done searches all over the internet looking for ways to email pages from my applications and finally I have done it!!! Every single s…
The task A number given should be formatted for easy reading by separating digits into triads. Format must be made inline via JavaScript, i.e., frameworks / functions are not welcome. So let’s take a number like this “12345678.91¿ and format i…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question