From: Shaun McDonald Date: Thu, 21 May 2009 17:25:39 +0000 (+0000) Subject: allow the user to pass in a gpx and a zoom X-Git-Tag: live~7917 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/961020a5dc3c9e0dd8d02b72132e25a22edb91bd allow the user to pass in a gpx and a zoom --- diff --git a/app/views/site/edit.rhtml b/app/views/site/edit.rhtml index 372a70d3b..d8f556d9f 100644 --- a/app/views/site/edit.rhtml +++ b/app/views/site/edit.rhtml @@ -36,6 +36,10 @@ elsif params['mlon'] and params['mlat'] zoom = h(params['zoom']) elsif params['gpx'] + # The user may pass a gpx and zoom + if params['zoom'] + zoom = h(params['zoom']) + end #use gpx id to locate (dealt with below) elsif cookies.key?("_osm_location") @@ -83,6 +87,7 @@ zoom='14' if zoom.nil? fo.addVariable('token','<%= session[:token] %>'); if (lat) { fo.addVariable('lat',lat); } if (lon) { fo.addVariable('long',lon); } + if (zoom) { fo.addVariable('zoom',zoom); } <% if params['gpx'] %>fo.addVariable('gpx' ,'<%= h(params['gpx'] ) %>');<% end %> <% if params['way'] %>fo.addVariable('way' ,'<%= h(params['way'] ) %>');<% end %> <% if params['node'] %>fo.addVariable('node','<%= h(params['node']) %>');<% end %>