Only draw transparent images if the tiles are transparent.

git-svn-id: http://svn.openlayers.org/trunk/openlayers@681 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
crschmidt
2006-06-22 19:02:33 +00:00
parent 7584d12ae5
commit 8e0793b191
2 changed files with 15 additions and 7 deletions

View File

@@ -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;

View File

@@ -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);
},