Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

swb1192

macrumors 6502
Original poster
Dec 4, 2007
258
0
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.
 
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:
 

Attachments

  • latlondif.jpg
    latlondif.jpg
    131 KB · Views: 104
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:

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 :)
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.