Jump to content

Archived

This topic is now archived and is closed to further replies.

megashell

zip code locator

Recommended Posts

Many websites I have something like a store locator where you enter a zipcode and it gives nearby stores up to 20 or 30 miles from your zip code. How would I go about making something like this?


Thanks!

Share this post


Link to post
Share on other sites
First of all you'll need a database of all of your zip codes and their latitude and longitudes. Then there is a massive and complicated mathematical function to work out the distance of which I currently don't have close to me, but a search on Google should find it for you.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.