Hello, I'm doing a project in Ruby on Rails where I need to implement a local search engine. I have a database of businesses and their addresses (street city state zip) and I need to figure out how to do a distance based search.
A visitor to the site should be able to search by street address or zip code, and receive results of the businesses that are close to the query address, sorted by proximity, along with a google map.
Are there any API's or services out there that will do the calculations? How do I begin to implement such a system?
Do you have any names in mind? I've been looking around for a solution, I checked rubygems and github but didn't come up with anything.
Programmatically, how would you implement location based search, given only a zip code or street address? I'd imagine I'd have to tie in to a service like google maps. I skimmed through the API but so far haven't found anything helpful since the search has to be performed on my database, rather than Google's index.