"Find Nearest Location"

Discussion in 'Web Design and Development' started by swb1192, Jan 3, 2009.

  1. swb1192 macrumors 6502

    Joined:
    Dec 4, 2007
    #1
    I have a bunch of locations (of chapels across the US) and I need to make it so the user can "find the nearest location" of a chapel. I'm not sure how I should go about doing this. The website uses Joomla (I'm not the one who thought of using it... I hate it!), so if there are any extensions you know of that would let me do that I would appreciate it. If there are any other ways of doing it, I'll take those too. Little to no cost would be great, too.
     
  2. cr2sh macrumors 68030

    cr2sh

    Joined:
    May 28, 2002
    Location:
    downtown
    #3
    You could use the google maps geocode function, pass the addresses and get a latitude and longitude for each address.... then compute the hypotenuse of the differences and select the lowest value of the set... that would be your closest chapel. Across a small enough area polar coordinates can be used to approximate a rectangular coordinate system.

    http://code.google.com/apis/maps/documentation/services.html#Geocoding

    Check out my awesome graphic:
     

    Attached Files:

  3. swb1192 thread starter macrumors 6502

    Joined:
    Dec 4, 2007
    #4
    This will take some learning, but I'll see what I can do. I'll probably try angelwatt's idea first.

    Thanks for the great graphic :)
     

Share This Page