From: Tom Hughes Date: Tue, 8 Jul 2008 09:52:08 +0000 (+0000) Subject: Add bounds to map responses. Closes #1011. X-Git-Tag: live~7746 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/6644f115c9064c70273252f69963af8a88334f19?ds=sidebyside Add bounds to map responses. Closes #1011. --- diff --git a/app/controllers/api_controller.rb b/app/controllers/api_controller.rb index 9cf8977d3..8b735600d 100644 --- a/app/controllers/api_controller.rb +++ b/app/controllers/api_controller.rb @@ -126,6 +126,14 @@ class ApiController < ApplicationController doc = OSM::API.new.get_xml_doc + # add bounds + bounds = XML::Node.new 'bounds' + bounds['minlat'] = min_lat.to_s + bounds['minlon'] = min_lon.to_s + bounds['maxlat'] = max_lat.to_s + bounds['maxlon'] = max_lon.to_s + doc.root << bounds + # get ways # find which ways are needed ways = Array.new