Create text box to allow proximity search - enter your address (or zip), and receive a list of congregations sorted by distance from your location.
Implementation:
- Temporarily geocode user's address
- Use someone's code that does the following with more subtlety (must compensate for curvature of the earth): Calculate hypotenuse of right triangle between user's address geocode and each congregation's geocode in database, sort by hypotenuse, in ascending numeric order. Alternatively, submit a driving directions request to the Google API and return the distance--this would be more accurate in the end.
Anonymous