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:
@@ -146,7 +146,7 @@ OpenLayers.Layer.Grid.prototype = Object.extend( new OpenLayers.Layer(), {
|
|||||||
new OpenLayers.Pixel(tileoffsetx - parseInt(this.map.layerContainerDiv.style.left),
|
new OpenLayers.Pixel(tileoffsetx - parseInt(this.map.layerContainerDiv.style.left),
|
||||||
tileoffsety - parseInt(this.map.layerContainerDiv.style.top))
|
tileoffsety - parseInt(this.map.layerContainerDiv.style.top))
|
||||||
);
|
);
|
||||||
tile.draw();
|
tile.draw((this.params.TRANSPARENT == true));
|
||||||
row.append(tile);
|
row.append(tile);
|
||||||
|
|
||||||
tileoffsetlon += tilelon;
|
tileoffsetlon += tilelon;
|
||||||
|
|||||||
@@ -35,12 +35,20 @@ OpenLayers.Tile.Image.prototype =
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
draw:function() {
|
draw:function(transparent) {
|
||||||
this.imgDiv = OpenLayers.Util.createAlphaImageDiv(null,
|
if (transparent) {
|
||||||
this.position,
|
this.imgDiv = OpenLayers.Util.createAlphaImageDiv(null,
|
||||||
this.size,
|
this.position,
|
||||||
this.url,
|
this.size,
|
||||||
"absolute");
|
this.url,
|
||||||
|
"absolute");
|
||||||
|
} else {
|
||||||
|
this.imgDiv = OpenLayers.Util.createImage(null,
|
||||||
|
this.position,
|
||||||
|
this.size,
|
||||||
|
this.url,
|
||||||
|
"absolute");
|
||||||
|
}
|
||||||
this.layer.div.appendChild(this.imgDiv);
|
this.layer.div.appendChild(this.imgDiv);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user