From: Richard Fairhurst Date: Sun, 30 Mar 2008 00:17:24 +0000 (+0000) Subject: 0.8a X-Git-Tag: live~7867 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/4ebf47b73434961a84b81af3db65159b29054070 0.8a --- diff --git a/app/views/site/edit.rhtml b/app/views/site/edit.rhtml index d2657d26f..c72a3ab1d 100644 --- a/app/views/site/edit.rhtml +++ b/app/views/site/edit.rhtml @@ -26,15 +26,19 @@ <% if params['mlon'] and params['mlat'] %> <% lon = h(params['mlon']) %> <% lat = h(params['mlat']) %> -<% zoom = h(params['zoom'] || '12') %> -<% elsif @user and params['lon'].nil? and params['lat'].nil? %> +<% zoom = h(params['zoom'] || '14') %> +<% elsif @user and params['lon'].nil? and params['lat'].nil? and params['gpx'].nil? %> <% lon = @user.home_lon %> <% lat = @user.home_lat %> -<% zoom = '12' %> -<%else%> +<% zoom = '14' %> +<% elsif params['gpx'].nil? %> <% lon = h(params['lon'] || '-0.1') %> <% lat = h(params['lat'] || '51.5') %> -<% zoom = h(params['zoom'] || '12') %> +<% zoom = h(params['zoom'] || '14') %> +<% else %> +<% lon = nil %> +<% lat = nil %> +<% zoom = '14' %> <% end %>
You need a Flash player to use Potlatch, the @@ -59,17 +63,17 @@ function doSWF(lat,lon,sc) { if (sc < 11) sc = 11; - fo.addVariable('lat',lat); - fo.addVariable('long',lon); fo.addVariable('scale',sc); fo.addVariable('token','<%= session[:token] %>'); + if (lat) { fo.addVariable('lat',lat); } + if (lon) { fo.addVariable('long',lon); } <% if params['gpx'] %> fo.addVariable('gpx','<%= h(params['gpx']) + "/data.xml" %>'); <% end %> fo.write("map"); } - doSWF(<%= lat %>,<%= lon %>,<%= zoom %>); + doSWF(<%= lat || 'null' %>,<%= lon || 'null' %>,<%= zoom %>); function setPosition(lat, lon, zoom) { doSWF(lat, lon, zoom); diff --git a/public/potlatch/potlatch.swf b/public/potlatch/potlatch.swf index 5bcae1491..bbea6ea23 100755 Binary files a/public/potlatch/potlatch.swf and b/public/potlatch/potlatch.swf differ