From ebbc969587a3c614277382b15615dac3c73fe94f Mon Sep 17 00:00:00 2001 From: Ari Pollak <ajp@aripollak.com> Date: Tue, 4 Jun 2013 11:18:21 -0300 Subject: [PATCH] Update README to reflect bounding box optimization --- README.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/README.md b/README.md index 6194ca27..bba2d618 100644 --- a/README.md +++ b/README.md @@ -223,9 +223,7 @@ When querying for objects (if you're using ActiveRecord) you can also look withi box = Geocoder::Calculations.bounding_box(center_point, distance) Venue.within_bounding_box(box) -This can also dramatically improve query performance, especially when used in conjunction with indexes on the latitude/longitude columns. Note, however, that returned results do not include `distance` and `bearing` attributes. If you want to improve performance AND have access to distance and bearing info, use both scopes: - - Venue.near(center_point, distance).within_bounding_box(box) +This can also dramatically improve query performance, especially when used in conjunction with indexes on the latitude/longitude columns. Note, however, that returned results do not include `distance` and `bearing` attributes. Note that `#near` performs both bounding box and radius queries for speed. Advanced Geocoding -- GitLab