It's zoomToExtent, not setExtent
This commit is contained in:
parent
13a98cf7eb
commit
770a990ed9
3 changed files with 5 additions and 5 deletions
|
@ -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();
|
||||
|
|
|
@ -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 %>
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue