From e90698244391363cb32d4bb76d9c0005a421bb2b Mon Sep 17 00:00:00 2001 From: euzuro Date: Thu, 7 Sep 2006 18:32:07 +0000 Subject: [PATCH] only set baselayer status based on transparency if *not* set in options. fix for #237 -- thanks tschaub git-svn-id: http://svn.openlayers.org/trunk/openlayers@1414 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf --- lib/OpenLayers/Layer/WMS.js | 9 ++++++--- lib/OpenLayers/Layer/WMS/Untiled.js | 10 ++++++---- 2 files changed, 12 insertions(+), 7 deletions(-) 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)); + } }, /**