diff --git a/lib/OpenLayers/Layer/Grid.js b/lib/OpenLayers/Layer/Grid.js index f8b288f20e..7ec3508794 100644 --- a/lib/OpenLayers/Layer/Grid.js +++ b/lib/OpenLayers/Layer/Grid.js @@ -19,6 +19,10 @@ OpenLayers.Layer.Grid.prototype = Object.extend( new OpenLayers.Layer(), { // this is an array of rows, each row is an array of tiles grid: null, + // alpha: boolean + // asserts whether or not the layer's images have an alpha channel + alpha: false, + /** * @param {str} name * @param {str} url @@ -161,7 +165,7 @@ OpenLayers.Layer.Grid.prototype = Object.extend( new OpenLayers.Layer(), { new OpenLayers.Pixel(tileoffsetx - parseInt(this.map.layerContainerDiv.style.left), tileoffsety - parseInt(this.map.layerContainerDiv.style.top)) ); - tile.draw((this.params.TRANSPARENT == 'true')); + tile.draw(this.alpha); row.append(tile); tileoffsetlon += tilelon; diff --git a/lib/OpenLayers/Layer/WMS.js b/lib/OpenLayers/Layer/WMS.js index 962fa72e7e..b964ab3576 100644 --- a/lib/OpenLayers/Layer/WMS.js +++ b/lib/OpenLayers/Layer/WMS.js @@ -71,7 +71,7 @@ OpenLayers.Layer.WMS.prototype = }, /** - * addTile creates a tile, initializes it (via 'draw' in this case), and + * addTile creates a tile, initializes it, and * adds it to the layer div. * * @param {OpenLayers.Bounds} bounds diff --git a/lib/OpenLayers/Tile/Image.js b/lib/OpenLayers/Tile/Image.js index 6a386f8c25..fa201ed675 100644 --- a/lib/OpenLayers/Tile/Image.js +++ b/lib/OpenLayers/Tile/Image.js @@ -36,9 +36,7 @@ OpenLayers.Tile.Image.prototype = /** */ draw:function(transparent) { - if (false) { // don't actually use the alpha PNG hack right now - // it has a fiercely bad effect on IE6's performance - // if (transparent) { + if (transparent) { this.imgDiv = OpenLayers.Util.createAlphaImageDiv(null, this.position, this.size,