Location
Moderator: General Moderators
Location
I want my users to be able to search for users close to them.. I see some sites do it by zip code (for US users) but I have no idea how to do that....
I could do it by state if I cant figure out this.... but zip codes seem to do distance best....
My only question... Is there a resource somewhere that helps calculate this or do you have to do it manually?
I could do it by state if I cant figure out this.... but zip codes seem to do distance best....
My only question... Is there a resource somewhere that helps calculate this or do you have to do it manually?
- daedalus__
- DevNet Resident
- Posts: 1925
- Joined: Thu Feb 09, 2006 4:52 pm
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
-
MicahCarrick
- Forum Newbie
- Posts: 23
- Joined: Sat Apr 09, 2005 5:40 pm
I also posted a free PHP script and MySQL database for this: PHP Zip Code Range and Distance Calculation
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
if you have a search for my name on here and 'zip', some solutions will come up. i've done this with the help of people on this forum a long time ago.
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
- Maugrim_The_Reaper
- DevNet Master
- Posts: 2704
- Joined: Tue Nov 02, 2004 5:43 am
- Location: Ireland
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
- Kieran Huggins
- DevNet Master
- Posts: 3635
- Joined: Wed Dec 06, 2006 4:14 pm
- Location: Toronto, Canada
- Contact:
The Google Maps API is quite good, but obviously not perfect. The strongest case to use it is that is accepts free-form address input, which is the only way to collect international addresses with any accuracy.
Also, I hear Google has routing built in to their API now, so you might be able to get the driving distance as well as the "as the crow flies" distance.
Also, I hear Google has routing built in to their API now, so you might be able to get the driving distance as well as the "as the crow flies" distance.
Canada and Mexico, that I know of. I believe England and some other European countries, too, but I cannot say that with certainty.ayvah wrote:Out of curiousity, do any of the listed options include support for zip/postcodes in any non-US countries?
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.