Tiles should not load data outside maxExtent unless the
'displayOutsideMaxExtent' option on the layer is set to true. Add tests, docs, and code. git-svn-id: http://svn.openlayers.org/trunk/openlayers@1531 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -78,6 +78,9 @@ OpenLayers.Layer.prototype = {
|
||||
|
||||
/** @type float */
|
||||
maxScale: null,
|
||||
|
||||
/** @type Boolean */
|
||||
displayOutsideMaxExtent: false,
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -49,13 +49,17 @@ OpenLayers.Tile.Image.prototype =
|
||||
}
|
||||
|
||||
this.imgDiv.style.display = "none";
|
||||
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 (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) ;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@@ -63,7 +63,10 @@ OpenLayers.Tile.WFS.prototype =
|
||||
this.clear();
|
||||
}
|
||||
OpenLayers.Tile.prototype.draw.apply(this, arguments);
|
||||
this.loadFeaturesForRegion(this.requestSuccess);
|
||||
if (this.layer.displayOutsideMaxExtent || (this.layer.maxExtent &&
|
||||
this.layer.maxExtent.intersectsBounds(this.bounds, false))) {
|
||||
this.loadFeaturesForRegion(this.requestSuccess);
|
||||
}
|
||||
},
|
||||
|
||||
/** get the full request string from the ds and the tile params
|
||||
|
||||
Reference in New Issue
Block a user