You may or may not have seen this too, but it is a big part of every
geocoding Rails app I build:

http://geokit.rubyforge.org/

It adds a number of geocode-specific methods to ActiveRecord which
allow you to query records based on their proximity to a location
(e.g. @locations = Location.find(:all, :origin => @address, :within =>
@within, :order => 'distance')). It can also automatically geocode a
location upon create using either Google, Yahoo, or GeoNames. You
provide your API key and GeoKit handles the grunt work. Very handy
tool. :-)

Good luck with your project.

On Aug 23, 7:54 am, Peter Laurens <[email protected]>
wrote:
> This is a broad question to get me started in the right direction:
>
> I would like to provide a location-based service so that users can tag
> articles with a location (the place where the article took place), and
> search (or list) articles by location.
>
> This raises some questions:
>
> - Presumably best practice is to allow the user not to type free-form
> locations, but to help them pick a location from a list?
>
> - Are there any frameworks that handle geographical hierarchies? For
> example, an article may be tagged with a city name, and a user may want
> to list all articles for a county, we'd need to know all of the cities
> in each county or we'd return nothing.
>
> The simplest thing may be to just have a flat list of places, with no
> hierarchy, a list of cities and major towns for example?
>
> Any broad advice on what's out there to provide any
> geographical/location services would be much appreciated!
>
> Thanks!
> --
> Posted viahttp://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to