move the draw() call out of the addTile() function and into the grid code.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@515 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -133,6 +133,7 @@ OpenLayers.Layer.Grid.prototype = Object.extend( new OpenLayers.Layer(), {
|
|||||||
new OpenLayers.Pixel(tileoffsetx,
|
new OpenLayers.Pixel(tileoffsetx,
|
||||||
tileoffsety)
|
tileoffsety)
|
||||||
);
|
);
|
||||||
|
tile.draw();
|
||||||
row.append(tile);
|
row.append(tile);
|
||||||
|
|
||||||
tileoffsetlon += tilelon;
|
tileoffsetlon += tilelon;
|
||||||
@@ -167,6 +168,7 @@ OpenLayers.Layer.Grid.prototype = Object.extend( new OpenLayers.Layer(), {
|
|||||||
bounds.top = bounds.top + deltaLat;
|
bounds.top = bounds.top + deltaLat;
|
||||||
position.y = position.y + deltaY;
|
position.y = position.y + deltaY;
|
||||||
var newTile = this.addTile(bounds, position);
|
var newTile = this.addTile(bounds, position);
|
||||||
|
newTile.draw();
|
||||||
newRow.append(newTile);
|
newRow.append(newTile);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -200,6 +202,7 @@ OpenLayers.Layer.Grid.prototype = Object.extend( new OpenLayers.Layer(), {
|
|||||||
bounds.right = bounds.right + deltaLon;
|
bounds.right = bounds.right + deltaLon;
|
||||||
position.x = position.x + deltaX;
|
position.x = position.x + deltaX;
|
||||||
var newTile = this.addTile(bounds, position);
|
var newTile = this.addTile(bounds, position);
|
||||||
|
newTile.draw();
|
||||||
|
|
||||||
if (prepend) {
|
if (prepend) {
|
||||||
row = row.prepend(newTile);
|
row = row.prepend(newTile);
|
||||||
|
|||||||
@@ -84,12 +84,12 @@ OpenLayers.Layer.WFS.prototype =
|
|||||||
addTile:function(bounds, position) {
|
addTile:function(bounds, position) {
|
||||||
url = this.getFullRequestString(
|
url = this.getFullRequestString(
|
||||||
{ BBOX:bounds.toBBOX() });
|
{ BBOX:bounds.toBBOX() });
|
||||||
var tile = new OpenLayers.Tile.WFS(this, position, bounds,
|
|
||||||
|
return new OpenLayers.Tile.WFS(this, position, bounds,
|
||||||
url, this.tileSize);
|
url, this.tileSize);
|
||||||
tile.draw();
|
|
||||||
return tile;
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
/** @final @type String */
|
/** @final @type String */
|
||||||
CLASS_NAME: "OpenLayers.Layer.WFS"
|
CLASS_NAME: "OpenLayers.Layer.WFS"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -70,11 +70,9 @@ OpenLayers.Layer.WMS.prototype =
|
|||||||
{BBOX:bounds.toBBOX(),
|
{BBOX:bounds.toBBOX(),
|
||||||
WIDTH:this.tileSize.w,
|
WIDTH:this.tileSize.w,
|
||||||
HEIGHT:this.tileSize.h});
|
HEIGHT:this.tileSize.h});
|
||||||
var tile = new OpenLayers.Tile.Image(this, position, bounds,
|
|
||||||
|
return new OpenLayers.Tile.Image(this, position, bounds,
|
||||||
url, this.tileSize);
|
url, this.tileSize);
|
||||||
tile.draw();
|
|
||||||
this.div.appendChild(tile.img);
|
|
||||||
return tile;
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/** @final @type String */
|
/** @final @type String */
|
||||||
|
|||||||
Reference in New Issue
Block a user