module Geocoder::Store::ActiveRecord::ClassMethods

def near_scope_options(latitude, longitude, radius = 20, options = {})


* +:exclude+ - an object to exclude (used by the +nearbys+ method)
* +:order+ - column(s) for ORDER BY SQL clause; default is distance
* +:select+ - string with the SELECT SQL fragment (e.g. “id, name”)
set to false for no bearing calculation
between the given point and each found nearby point;
the method to be used for calculating the bearing (direction)
* +:bearing+ - :linear (default) or :spherical;
is added to each found nearby object
for interpreting radius as well as the +distance+ attribute which
* +:units+ - :mi (default) or :km; to be used

Options hash may include:
records within a radius (in miles) of the given point.
Get options hash suitable for passing to ActiveRecord.find to get
#
def near_scope_options(latitude, longitude, radius = 20, options = {})
  if connection.adapter_name.match /sqlite/i
    approx_near_scope_options(latitude, longitude, radius, options)
  else
    full_near_scope_options(latitude, longitude, radius, options)
  end
end