lib/geokit-rails/adapters/mysql2.rb in geokit-rails-2.0.0.rc1 vs lib/geokit-rails/adapters/mysql2.rb in geokit-rails-2.0.0

- old
+ new

@@ -1,22 +1,8 @@ +require 'geokit-rails/adapters/mysql' + module Geokit module Adapters - class Mysql2 < Abstract - - def sphere_distance_sql(lat, lng, multiplier) - %| - (ACOS(least(1,COS(#{lat})*COS(#{lng})*COS(RADIANS(#{qualified_lat_column_name}))*COS(RADIANS(#{qualified_lng_column_name}))+ - COS(#{lat})*SIN(#{lng})*COS(RADIANS(#{qualified_lat_column_name}))*SIN(RADIANS(#{qualified_lng_column_name}))+ - SIN(#{lat})*SIN(RADIANS(#{qualified_lat_column_name}))))*#{multiplier}) - | - end - - def flat_distance_sql(origin, lat_degree_units, lng_degree_units) - %| - SQRT(POW(#{lat_degree_units}*(#{origin.lat}-#{qualified_lat_column_name}),2)+ - POW(#{lng_degree_units}*(#{origin.lng}-#{qualified_lng_column_name}),2)) - | - end - + class Mysql2 < MySQL end end -end \ No newline at end of file +end