</div>
<script type="text/javascript">
- OpenLayers.Lang.setCode("<%= I18n.locale.to_s %>");
-
var highlight;
function highlightChangeset(id) {
$("#tr-changeset-" + id).removeClass("selected");
}
- function init() {
+ $(document).ready(function () {
var map = createMap("changeset_list_map", {
controls: [
new OpenLayers.Control.Navigation(),
- new OpenLayers.Control.PanZoom(),
- new OpenLayers.Control.PanZoomBar()
+ new OpenLayers.Control.Zoom(),
+ new OpenLayers.Control.SimplePanZoom()
]
});
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>