lib/mongoid/geo/point.rb in mongoid_geo-0.4.1 vs lib/mongoid/geo/point.rb in mongoid_geo-0.4.2
- old
+ new
@@ -25,11 +25,16 @@
end
private
def get_the_location obj
- return [obj.lat, obj.lng] if obj.respond_to? :lat
- return [obj.latitude, obj.longitude] if obj.respond_to? :latitude
+ # if Mongoid::Geo.spherical
+ # return [obj.lng, obj.lat] if obj.respond_to? :lat
+ # return [obj.longitude, obj.latitude] if obj.respond_to? :latitude
+ # else
+ return [obj.lat, obj.lng] if obj.respond_to? :lat
+ return [obj.latitude, obj.longitude] if obj.respond_to? :latitude
+ # end
obj.to_f
end
end
end
\ No newline at end of file