]> git.openstreetmap.org Git - rails.git/blobdiff - app/views/changeset/_map.html.erb
Update Polatch 2 to 2.3-407-g55bf495 build
[rails.git] / app / views / changeset / _map.html.erb
index f052eadbe74828d5c410e9b1f1eb2f57ea2aec4f..a490ad1d89465e9c0e853127017ab1a2a1bd4cc9 100644 (file)
@@ -37,7 +37,7 @@
     $("#tr-changeset-" + id).removeClass("selected");
   }
 
-  function init() {
+  $(document).ready(function () {
     var map = createMap("changeset_list_map", {
       controls: [
         new OpenLayers.Control.Navigation(),
     selectControl.activate();
 
     <% if ! @bbox.nil? %>
-      map.setExtent(proj(new OpenLayers.Bounds(<%= @bbox %>)));
+      map.zoomToExtent(proj(new OpenLayers.Bounds(<%= @bbox %>)));
     <% else %>
-      map.setExtent(proj(bounds));
+      map.zoomToExtent(proj(bounds));
     <% end %>
-  }
-
-  Event.observe(window, "load", init);
+  });
 </script>