Changed zoomToFullExtent to call getZoomForExtent rather than just using zoom level 0.

git-svn-id: http://svn.openlayers.org/branches/openlayers/1.0@729 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
Schuyler Erle
2006-06-25 10:18:13 +00:00
parent 00c0655cd2
commit d8263d200b

View File

@@ -545,12 +545,11 @@ OpenLayers.Map.prototype = {
*/ */
zoomToFullExtent: function() { zoomToFullExtent: function() {
var fullExtent = this.getFullExtent(); var fullExtent = this.getFullExtent();
var oldZoom = this.zoom;
this.setCenter( this.setCenter(
new OpenLayers.LonLat((fullExtent.left+fullExtent.right)/2, new OpenLayers.LonLat((fullExtent.left+fullExtent.right)/2,
(fullExtent.bottom+fullExtent.top)/2), (fullExtent.bottom+fullExtent.top)/2),
0 this.getZoomForExtent(fullExtent)
); );
}, },
/** /**