Applied Corey Puffault's zoomToExtent() patch from #107.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@789 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -552,6 +552,14 @@ OpenLayers.Map.prototype = {
|
||||
);
|
||||
},
|
||||
|
||||
zoomToExtent: function(bounds) {
|
||||
this.setCenter(
|
||||
new OpenLayers.LonLat((bounds.left+bounds.right)/2,
|
||||
(bounds.bottom+bounds.top)/2),
|
||||
this.getZoomForExtent(bounds)
|
||||
);
|
||||
},
|
||||
|
||||
/**
|
||||
* @param {OpenLayers.LonLat} lonlat
|
||||
* @private
|
||||
|
||||
Reference in New Issue
Block a user