Solved

Google Maps API - get 5 nearest zip codes

Posted on 2013-12-13
3
1,310 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

In this article, we'll look how to sort an Array in JavaScript, including the more advanced techniques of sorting a collection of records either ascending or descending on two or more fields. Basic Sorting of Arrays First, let's look at the …
Having worked on larger scale sites, we found out that you are bound to look at more scalable solutions to integrating widgets, code snippets or complete applications and mesh them into functional sites, in any given composition. To share some of…
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…

896 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now