]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/tracepoint.rb
Handle errors a bit better.
[rails.git] / app / models / tracepoint.rb
index 90de368b551a27210973059f2893e4b9aaeb7aa3..70d0f99e8b6c0300e7a92c2486a6f6405afe46e6 100644 (file)
@@ -22,4 +22,12 @@ set_table_name 'gps_points'
   def lon
     return self.longitude.to_f / 1000000
   end
+
+  def to_xml_node
+    el1 = XML::Node.new 'trkpt'
+    el1['lat'] = self.lat.to_s
+    el1['lon'] = self.lon.to_s
+    return el1
+  end
+
 end