From f4342723e401c361ec4dd3b03384350cde368c94 Mon Sep 17 00:00:00 2001 From: euzuro Date: Tue, 27 Jun 2006 10:47:48 +0000 Subject: [PATCH] use bound's built in getCenter() function. git-svn-id: http://svn.openlayers.org/trunk/openlayers@790 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf --- lib/OpenLayers/Map.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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) ); },