]> git.openstreetmap.org Git - rails.git/blobdiff - app/views/site/index.html.erb
Fix some deprecation warnings in the file_column plugin
[rails.git] / app / views / site / index.html.erb
index 242890e28df73c769f658c068db52abb98280b3e..8d0864f01329055db8fae49782d1831922318169 100644 (file)
@@ -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 %>
+  });
+// -->
 </script>