diff --git a/lib/OpenLayers/Layer/Grid.js b/lib/OpenLayers/Layer/Grid.js index 34b088f40d..33addaae3b 100644 --- a/lib/OpenLayers/Layer/Grid.js +++ b/lib/OpenLayers/Layer/Grid.js @@ -133,6 +133,7 @@ OpenLayers.Layer.Grid.prototype = Object.extend( new OpenLayers.Layer(), { new OpenLayers.Pixel(tileoffsetx, tileoffsety) ); + tile.draw(); row.append(tile); tileoffsetlon += tilelon; @@ -167,6 +168,7 @@ OpenLayers.Layer.Grid.prototype = Object.extend( new OpenLayers.Layer(), { bounds.top = bounds.top + deltaLat; position.y = position.y + deltaY; var newTile = this.addTile(bounds, position); + newTile.draw(); newRow.append(newTile); } @@ -200,6 +202,7 @@ OpenLayers.Layer.Grid.prototype = Object.extend( new OpenLayers.Layer(), { bounds.right = bounds.right + deltaLon; position.x = position.x + deltaX; var newTile = this.addTile(bounds, position); + newTile.draw(); if (prepend) { row = row.prepend(newTile); diff --git a/lib/OpenLayers/Layer/WFS.js b/lib/OpenLayers/Layer/WFS.js index 1d63fc5ac3..156d2be6dd 100644 --- a/lib/OpenLayers/Layer/WFS.js +++ b/lib/OpenLayers/Layer/WFS.js @@ -84,12 +84,12 @@ OpenLayers.Layer.WFS.prototype = addTile:function(bounds, position) { url = this.getFullRequestString( { BBOX:bounds.toBBOX() }); - var tile = new OpenLayers.Tile.WFS(this, position, bounds, + + return new OpenLayers.Tile.WFS(this, position, bounds, url, this.tileSize); - tile.draw(); - return tile; }, + /** @final @type String */ CLASS_NAME: "OpenLayers.Layer.WFS" } diff --git a/lib/OpenLayers/Layer/WMS.js b/lib/OpenLayers/Layer/WMS.js index db29b1c426..17e3d12cae 100644 --- a/lib/OpenLayers/Layer/WMS.js +++ b/lib/OpenLayers/Layer/WMS.js @@ -70,11 +70,9 @@ OpenLayers.Layer.WMS.prototype = {BBOX:bounds.toBBOX(), WIDTH:this.tileSize.w, HEIGHT:this.tileSize.h}); - var tile = new OpenLayers.Tile.Image(this, position, bounds, + + return new OpenLayers.Tile.Image(this, position, bounds, url, this.tileSize); - tile.draw(); - this.div.appendChild(tile.img); - return tile; }, /** @final @type String */