X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/2c397321c9309eb9cd4dfed21375fc821a8d2d37..cf7116402bae7ac4e06d9a5d67e7f578277ca459:/app/views/site/index.html.erb?ds=sidebyside diff --git a/app/views/site/index.html.erb b/app/views/site/index.html.erb index 6cff7f133..9102214af 100644 --- a/app/views/site/index.html.erb +++ b/app/views/site/index.html.erb @@ -144,7 +144,7 @@ end <% if bbox %> var bbox = new OpenLayers.Bounds(<%= minlon %>, <%= minlat %>, <%= maxlon %>, <%= maxlat %>); - map.setExtent(proj(bbox)); + map.zoomToExtent(proj(bbox)); <% if box %> $(window).load(function() { addBoxToMap(bbox) }); @@ -200,7 +200,7 @@ end if (min_lon && min_lat && max_lon && max_lat) { var bbox = new OpenLayers.Bounds(min_lon, min_lat, max_lon, max_lat); - map.setExtent(proj(bbox)); + map.zoomToExtent(proj(bbox)); } else { setMapCenter(centre, zoom); }