From: Richard Fairhurst Date: Fri, 13 Feb 2009 15:12:52 +0000 (+0000) Subject: be a bit smarter about enlarging the bbox (note to self: must remember to put this... X-Git-Tag: live~8162 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/79d3ee46545f1a5b60d40bfe8a803974a97d0a09?ds=sidebyside be a bit smarter about enlarging the bbox (note to self: must remember to put this in 0.6 too) --- diff --git a/app/controllers/amf_controller.rb b/app/controllers/amf_controller.rb index 2b21221c0..febc4db68 100644 --- a/app/controllers/amf_controller.rb +++ b/app/controllers/amf_controller.rb @@ -126,8 +126,9 @@ class AmfController < ApplicationController # are IDs only. def whichways(xmin, ymin, xmax, ymax) #:doc: - xmin -= 0.01; ymin -= 0.01 - xmax += 0.01; ymax += 0.01 + enlarge = [(xmax-xmin)/8,0.01].min + xmin -= enlarge; ymin -= enlarge + xmax += enlarge; ymax += enlarge if POTLATCH_USE_SQL then way_ids = sql_find_way_ids_in_area(xmin, ymin, xmax, ymax)