diff --git a/lib/OpenLayers/Layer/Grid.js b/lib/OpenLayers/Layer/Grid.js index 5bc9785bca..e93b634e29 100644 --- a/lib/OpenLayers/Layer/Grid.js +++ b/lib/OpenLayers/Layer/Grid.js @@ -146,7 +146,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(); + tile.draw((this.params.TRANSPARENT == true)); row.append(tile); tileoffsetlon += tilelon; diff --git a/lib/OpenLayers/Tile/Image.js b/lib/OpenLayers/Tile/Image.js index e4b113cdc4..fa201ed675 100644 --- a/lib/OpenLayers/Tile/Image.js +++ b/lib/OpenLayers/Tile/Image.js @@ -35,12 +35,20 @@ OpenLayers.Tile.Image.prototype = /** */ - draw:function() { - this.imgDiv = OpenLayers.Util.createAlphaImageDiv(null, - this.position, - this.size, - this.url, - "absolute"); + draw:function(transparent) { + if (transparent) { + this.imgDiv = OpenLayers.Util.createAlphaImageDiv(null, + this.position, + this.size, + this.url, + "absolute"); + } else { + this.imgDiv = OpenLayers.Util.createImage(null, + this.position, + this.size, + this.url, + "absolute"); + } this.layer.div.appendChild(this.imgDiv); },