Make the name of the lon/lng virtual attribute on trace points consistent.
[rails.git] / app / models / tracepoint.rb
index e48a2748d16b86b3965c415f884cb1e7112946b2..1d9f1bd6bf5e57e24188a0ea83b1e724dc834c2a 100644 (file)
@@ -22,19 +22,19 @@ class Tracepoint < ActiveRecord::Base
   end
 
   def lat=(l)
-    self.latitude = (l * 1000000).round
+    self.latitude = (l * 10000000).round
   end
 
-  def lng=(l)
-    self.longitude = (l * 1000000).round
+  def lon=(l)
+    self.longitude = (l * 10000000).round
   end
 
   def lat
-    return self.latitude.to_f / 1000000
+    return self.latitude.to_f / 10000000
   end
 
   def lon
-    return self.longitude.to_f / 1000000
+    return self.longitude.to_f / 10000000
   end
 
   def to_xml_node