Commit a number of improvements to grid handling from #449. This adds

support for buffer:0 on grids, and includes changes to Remove extra 
rows and columns from the grid in _initTiles when reusing an existing 
grid, which is a fix to #357 and #436. 


git-svn-id: http://svn.openlayers.org/trunk/openlayers@2091 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
crschmidt
2006-12-22 18:35:04 +00:00
parent b46a513077
commit 7e9eef8d07
5 changed files with 80 additions and 41 deletions

View File

@@ -43,29 +43,28 @@ OpenLayers.Tile.Image.prototype =
*
*/
draw:function() {
OpenLayers.Tile.prototype.draw.apply(this, arguments);
if (this.imgDiv == null) {
this.initImgDiv();
}
if (this.layer != this.layer.map.baseLayer && this.layer.reproject) {
this.bounds = this.getBoundsFromBaseLayer(this.position);
}
this.url = this.layer.getURL(this.bounds);
this.imgDiv.style.display = "none";
if (this.layer.displayOutsideMaxExtent || (this.layer.maxExtent &&
(this.bounds.intersectsBounds(this.layer.maxExtent,false))
)) {
if (this.layer.alpha) {
OpenLayers.Util.modifyAlphaImageDiv(this.imgDiv,
null, this.position, this.size, this.url);
} else {
this.imgDiv.src = this.url;
OpenLayers.Util.modifyDOMElement(this.imgDiv,
null, this.position, this.size) ;
}
if (!OpenLayers.Tile.prototype.draw.apply(this, arguments)) {
return false;
}
if (this.imgDiv == null) {
this.initImgDiv();
}
this.url = this.layer.getURL(this.bounds);
if (this.layer.alpha) {
OpenLayers.Util.modifyAlphaImageDiv(this.imgDiv,
null, this.position, this.size, this.url);
} else {
this.imgDiv.src = this.url;
OpenLayers.Util.modifyDOMElement(this.imgDiv,
null, this.position, this.size) ;
}
this.drawn = true;
return true;
},
/** Clear the tile of any bounds/position-related data so that it can