Take care not to change layer visibility when changing layer draw order (allOverlays only). r=ahocevar (closes #2004)

git-svn-id: http://svn.openlayers.org/trunk/openlayers@9216 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
Tim Schaub
2009-04-06 21:15:39 +00:00
parent ebb7a08325
commit 85974d11a0
2 changed files with 17 additions and 3 deletions

View File

@@ -1098,7 +1098,7 @@ OpenLayers.Map = OpenLayers.Class({
if (OpenLayers.Util.indexOf(this.layers, newBaseLayer) != -1) {
// make the old base layer invisible
if (this.baseLayer != null) {
if (this.baseLayer != null && !this.allOverlays) {
this.baseLayer.setVisibility(false);
}
@@ -1109,7 +1109,9 @@ OpenLayers.Map = OpenLayers.Class({
// changing. This is used by tiles to check if they should
// draw themselves.
this.viewRequestID++;
this.baseLayer.visibility = true;
if(!this.allOverlays) {
this.baseLayer.visibility = true;
}
//redraw all layers
var center = this.getCenter();