module Geocoder::Store::Base

def distance_to(point, units = nil)


(:mi or :km; can be specified in Geocoder configuration).
the point. Also takes a symbol specifying the units
See Geocoder::Calculations.distance_between for ways of specifying
Calculate the distance from the object to an arbitrary point.
#
def distance_to(point, units = nil)
  units ||= self.class.geocoder_options[:units]
  return nil unless geocoded?
  Geocoder::Calculations.distance_between(
    to_coordinates, point, :units => units)
end