|
|||||||
| General Discussion and support for your general issues associated with web design. |
![]() |
|
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
Zip Code Search on Website to Locate Members Closest
Okay you know how when you go to a company website and they have a store locator where you enter in your zip code or city and it finds the closes store too you?? On our website we have a member directory and at times we need to find out which member is the closest to a certain zip code or city. The member directory all ready has this information but you would have to search through all of the entries and that is becoming time consuming. How do you put a locator that will search these entries for you and return the closest people to a location?? Thanks in advance.
|
|
#2
|
||||
|
||||
|
You'd probably need a database of zipcodes with the latitude and longitude for each. Then you'd probably do a query of all zip codes whose latitude is within x minutes of latitude and y minutes of longitude of the zip code of interest. Then you'd loop through each of those and do some spherical trigonometry to determine which of them is within the desired distance of the zip code of interest.
__________________
"That's what the gods are! An answer that will do! Because there's food to be caught and babies to be born and life to be lived and so there is not time for big, complicated, and worrying answers! Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be." -- from Nation, by Terry Pratchett freelancer.internet.com Email me |
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|