make updateSize not call setCenter if map has no center, and remove unused code, r=tschaub (closes #2105) (closes #2114)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@9587 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -1343,12 +1343,12 @@ OpenLayers.Map = OpenLayers.Class({
|
||||
this.layers[i].onMapResize();
|
||||
}
|
||||
|
||||
if (this.baseLayer != null) {
|
||||
var center = new OpenLayers.Pixel(newSize.w /2, newSize.h / 2);
|
||||
var centerLL = this.getLonLatFromViewPortPx(center);
|
||||
var center = this.getCenter();
|
||||
|
||||
if (this.baseLayer != null && center != null) {
|
||||
var zoom = this.getZoom();
|
||||
this.zoom = null;
|
||||
this.setCenter(this.getCenter(), zoom);
|
||||
this.setCenter(center, zoom);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user