Custom Zip Code Map Locater Script

Where would I find, or how would this be possible, to create a script where it would display a generalized location of a map based upon a zip code, much like a ‘Store Locater’ you see on retail sites?

For example, a customer would type in a zip code in an input box. After clicking ‘Search’, the system processes and displays a map with the nearest location and phone number.

Or is this a jQuery thing? I’m looking for some clues on how this is developed or if there is an external service that specializes in this.

Thank you!

You need a database of zip codes mapped to latitude/longitude and you also need latitude/longitude of your stores.
Once you have those then it’s a matter of some trigonometry to calculate distance.

I think zipcodedownload.com sells zip codes database like that. US postal service used to sell their zip codes data on a CD but I am not sure that they are doing it anymore.

There are free zip code GPS databases out there, but I don’t think you’ll need one. Are you using Google Maps? If so, you can use their Geocoder to geocode the zip code (to the center of the zip) and then plot it on a map. You can do it server-side using PHP or client-side if they have javascript enabled.

Google’s geocoder terms of service changed earlier this year. You can only use it if you intend to use the geocodes on a Google Map.

I’ve done something similar. It’s quite a bit of work.

Thanks a lot guys!

I never consider using Google Maps. I might venture that direction to see if I can use GeoCoder.

Thank you!