From 770a990ed9de47a828945a40448b69fe7cc17f28 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Thu, 15 Mar 2012 17:01:16 +0000 Subject: [PATCH] It's zoomToExtent, not setExtent --- app/views/browse/_map.html.erb | 2 +- app/views/changeset/_map.html.erb | 4 ++-- app/views/site/index.html.erb | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/views/browse/_map.html.erb b/app/views/browse/_map.html.erb index 333fc9f30..fda602bf0 100644 --- a/app/views/browse/_map.html.erb +++ b/app/views/browse/_map.html.erb @@ -79,7 +79,7 @@ var bbox = new OpenLayers.Bounds(minlon, minlat, maxlon, maxlat); var centre = bbox.getCenterLonLat(); - map.setExtent(proj(bbox)); + map.zoomToExtent(proj(bbox)); addBoxToMap(bbox); $("#loading").hide(); diff --git a/app/views/changeset/_map.html.erb b/app/views/changeset/_map.html.erb index f052eadbe..88dd53c99 100644 --- a/app/views/changeset/_map.html.erb +++ b/app/views/changeset/_map.html.erb @@ -80,9 +80,9 @@ 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 %> } 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); } -- 2.39.5