Geokit: Geocoding and Location Finding on Rails 2.2
It's not exactly new - we covered it on Ruby Inside back in early 2007 - but Geokit, a geocoding and location finder plugin for Rails, has recently been updated and is now Rails 2.2 compatible. Not only that, but it's now available as a separate gem rather than solely as a plugin.
Developed by Bill Eisenhauer and Andre Lewis, GeoKit makes it easy to build location-based apps. You get a range of geocoding and location based features, such as distance calculation, out of the box. If you wanted to, say, find all items in your database located within a 20 mile radius (and assuming those items have geographical coordinates associated with them) you can do it with Geokit.
Geokit is now also hosted on Github - in geokit-gem and geokit-rails repositories.
January 1st, 2009 at 12:55 pm
i your displaying markers on maps/searching for objects around other objects have a look at has_a_location ( http://github.com/grosser/has_a_location/ ) geokit addon (not gemified yet ...)
January 1st, 2009 at 6:47 pm
Was hoping this would mean some added 'named_scope' compatibility. The only way I could do it is to use a select statement ({:select => "*, #{distance_sql} as distance}) which then hinders the use of :include. Any other ideas?