diff --git a/README.rdoc b/README.rdoc index 1919bc2c951489fa24d5843cb8c6e604b1b76d04..7f9c7bab9d6af3c3424ec5f177f530b96edaf400 100644 --- a/README.rdoc +++ b/README.rdoc @@ -1,13 +1,21 @@ = Geocoder -Geocoder is a plugin for Rails that provides database-agnostic object geocoding (via Google) and some utilities for working with geocoded objects. It does not rely on proprietary database functions so reasonably accurate distances can be calculated in MySQL or even SQLite. +Geocoder adds database-agnostic object geocoding to Rails (via Google). It does not rely on proprietary database functions so reasonably accurate distances can be calculated in MySQL or even SQLite. == Setup -Use the Rails plugin install script: +Install either *as a plugin*: script/plugin install git://github.com/alexreisner/geocoder.git +or *as a gem*: + + # add to config/environment.rb: + config.gem :geocoder, :source => "http://gemcutter.org/" + + # at command prompt: + sudo rake gems:install + To add geocoding features to a class: geocoded_by :location @@ -45,7 +53,7 @@ Assuming +obj+ has a valid string for its +location+: Assuming +obj+ is geocoded (has latitude and longitude): - obj.nearbys(30) # other objects within radius + obj.nearbys(30) # other objects within 30 miles obj.distance_to(40.714, -100.234) # distance to arbitrary point Some utility methods are also available: