]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/api_controller.rb
Fix bogus SQL.
[rails.git] / app / controllers / api_controller.rb
index 054a9ca62078640d335debac6bc5f537eec564e7..be00b9f9c8b1d39a7763008a1e246de94f49561a 100644 (file)
@@ -73,7 +73,7 @@ class ApiController < ApplicationController
     min_lon = min_lon * 1000000
     max_lon = max_lon * 1000000
     # get all the points
     min_lon = min_lon * 1000000
     max_lon = max_lon * 1000000
     # get all the points
-    points = Tracepoint.find(:all, :conditions => ['latitude BETWEEN ? AND ? AND longitude BETWEEN ? AND ?', min_lat.to_i, max_lat.to_i, min_lon.to_i, max_lon.to_i], :select => "SELECT DISTINCT *", :offset => offset, :limit => TRACEPOINTS_PER_PAGE, :order => "timestamp DESC" )
+    points = Tracepoint.find(:all, :conditions => ['latitude BETWEEN ? AND ? AND longitude BETWEEN ? AND ?', min_lat.to_i, max_lat.to_i, min_lon.to_i, max_lon.to_i], :select => "DISTINCT *", :offset => offset, :limit => TRACEPOINTS_PER_PAGE, :order => "timestamp DESC" )
 
     doc = XML::Document.new
     doc.encoding = 'UTF-8'
 
     doc = XML::Document.new
     doc.encoding = 'UTF-8'