diff --git a/lib/OpenLayers/Layer/WMS.js b/lib/OpenLayers/Layer/WMS.js index 9a34533148..c4b3dd571d 100644 --- a/lib/OpenLayers/Layer/WMS.js +++ b/lib/OpenLayers/Layer/WMS.js @@ -45,9 +45,12 @@ OpenLayers.Layer.WMS.prototype = ); } - // if the layer is transparent, it will be an overlay - this.isBaseLayer = ((this.params.TRANSPARENT != "true") && - (this.params.TRANSPARENT != true)); + // unless explicitly set in options, if the layer is transparent, + // it will be an overlay + if ((options == null) || (options.isBaseLayer == null)) { + this.isBaseLayer = ((this.params.TRANSPARENT != "true") && + (this.params.TRANSPARENT != true)); + } }, /** diff --git a/lib/OpenLayers/Layer/WMS/Untiled.js b/lib/OpenLayers/Layer/WMS/Untiled.js index afb875d546..bb0f211f7d 100644 --- a/lib/OpenLayers/Layer/WMS/Untiled.js +++ b/lib/OpenLayers/Layer/WMS/Untiled.js @@ -50,10 +50,12 @@ OpenLayers.Layer.WMS.Untiled.prototype = ); } - // if the layer is transparent, it will be an overlay - this.isBaseLayer = ((this.params.TRANSPARENT != "true") && - (this.params.TRANSPARENT != true)); - + // unless explicitly set in options, if the layer is transparent, + // it will be an overlay + if ((options == null) ||(options.isBaseLayer == null)) { + this.isBaseLayer = ((this.params.TRANSPARENT != "true") && + (this.params.TRANSPARENT != true)); + } }, /**