use bound's built in getCenter() function.

git-svn-id: http://svn.openlayers.org/trunk/openlayers@790 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
euzuro
2006-06-27 10:47:48 +00:00
parent fbbf1b317a
commit f4342723e4

View File

@@ -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)
);
},