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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user