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:
@@ -545,10 +545,8 @@ OpenLayers.Map.prototype = {
|
|||||||
*/
|
*/
|
||||||
zoomToFullExtent: function() {
|
zoomToFullExtent: function() {
|
||||||
var fullExtent = this.getFullExtent();
|
var fullExtent = this.getFullExtent();
|
||||||
this.setCenter(
|
this.setCenter(fullExtent.getCenterLonLat(),
|
||||||
new OpenLayers.LonLat((fullExtent.left+fullExtent.right)/2,
|
this.getZoomForExtent(fullExtent)
|
||||||
(fullExtent.bottom+fullExtent.top)/2),
|
|
||||||
this.getZoomForExtent(fullExtent)
|
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user