X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/bed240597382b8af6a0a0762c8085a07994f6ba0..b25a468e3c0aeb868f46ea758d4cf33ad7890bcb:/app/views/site/index.html.erb diff --git a/app/views/site/index.html.erb b/app/views/site/index.html.erb index 242890e28..8d0864f01 100644 --- a/app/views/site/index.html.erb +++ b/app/views/site/index.html.erb @@ -68,7 +68,7 @@ end # Decide on a lat lon to initialise the map with. Various ways of doing this if params[:bbox] bbox = true - minlon, minlat, maxlon, maxlat = params[:bbox].split(",").collect { |c| c.to_i } + minlon, minlat, maxlon, maxlat = params[:bbox].split(",").collect { |c| c.to_f } layers = params[:layers] box = true if params[:box] == "yes" object_zoom = false @@ -280,7 +280,15 @@ end map.setCenter(centre, zoom); }); - <% if params[:action] == 'export' %> - <%= remote_function :url => { :controller => 'export', :action => 'start' } %> - <% end %> + document.observe("dom:loaded", function () { + $("exportanchor").observe("click", function (e) { + <%= remote_function :url => { :controller => 'export', :action => 'start' } %>; + Event.stop(e); + }); + + <% if params[:action] == 'export' %> + <%= remote_function :url => { :controller => 'export', :action => 'start' } %>; + <% end %> + }); +// -->