X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/dc3edbe7c19c546895a9ba17cf29282802952a0d..a287d24f127d53de6a049efd798349dc409053ea:/app/controllers/api_controller.rb diff --git a/app/controllers/api_controller.rb b/app/controllers/api_controller.rb index 7e8017f4e..407f6872a 100644 --- a/app/controllers/api_controller.rb +++ b/app/controllers/api_controller.rb @@ -141,7 +141,7 @@ class ApiController < ApplicationController end # get all the nodes - nodes = Node.find(:all, :conditions => ['latitude > ? AND longitude > ? AND latitude < ? AND longitude < ? AND visible = 1', min_lat, min_lon, max_lat, max_lon]) + nodes = Node.find(:all, :conditions => ['latitude BETWEEN ? AND ? AND longitude BETWEEN ? AND ? AND visible = 1', min_lat, max_lat, min_lon, max_lon]) node_ids = nodes.collect {|node| node.id }