diff --git a/lib/OpenLayers/Map.js b/lib/OpenLayers/Map.js index fecd812fc2..9ad0a38d24 100644 --- a/lib/OpenLayers/Map.js +++ b/lib/OpenLayers/Map.js @@ -545,10 +545,8 @@ OpenLayers.Map.prototype = { */ zoomToFullExtent: function() { var fullExtent = this.getFullExtent(); - this.setCenter( - new OpenLayers.LonLat((fullExtent.left+fullExtent.right)/2, - (fullExtent.bottom+fullExtent.top)/2), - this.getZoomForExtent(fullExtent) + this.setCenter(fullExtent.getCenterLonLat(), + this.getZoomForExtent(fullExtent) ); },