Skip to content
Snippets Groups Projects
Commit 5be6333b authored by Alex Reisner's avatar Alex Reisner
Browse files

Clarify documentation.

parent 1a4d501c
No related branches found
No related tags found
No related merge requests found
...@@ -41,14 +41,13 @@ Assuming +Venue+ is a geocoded model: ...@@ -41,14 +41,13 @@ Assuming +Venue+ is a geocoded model:
Assuming +obj+ has a valid string for its +location+: Assuming +obj+ has a valid string for its +location+:
obj.fetch_coordinates # returns coordinates [lat, lon] obj.fetch_coordinates # returns coordinates [lat, lon]
obj.fetch_and_assign_coordinates # writes values to object obj.fetch_and_assign_coordinates # writes values to object
obj.nearbys(30) # gets other objects within given radius
Find distance between object and a point: Assuming +obj+ is geocoded (has latitude and longitude):
obj.distance_to(40.71432, -100.23487) # in miles obj.nearbys(30) # other objects within radius
obj.distance_to(40.71432, -100.23487, :km) # in kilometers obj.distance_to(40.714, -100.234) # distance to arbitrary point
Some utility methods are also available: Some utility methods are also available:
...@@ -59,7 +58,7 @@ Some utility methods are also available: ...@@ -59,7 +58,7 @@ Some utility methods are also available:
Geocoder.fetch_coordinates("25 Main St, Cooperstown, NY") Geocoder.fetch_coordinates("25 Main St, Cooperstown, NY")
Please see the code for more methods and detailed information about arguments. Please see the code for more methods and detailed information about arguments (eg, working with kilometers).
Copyright (c) 2009 Alex Reisner, released under the MIT license Copyright (c) 2009 Alex Reisner, released under the MIT license
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment