If you call setVisibility(true) on a layer which is out of range, the layer's

visibility won't change, but the tiles will be displayed anyway, in the 
wrong position. Instead, prevent tiles from being displayed at all. r=ahocevar,
(Closes #1429)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@6540 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
crschmidt
2008-03-17 15:53:13 +00:00
parent ec3c55606c
commit ac7172bec7

View File

@@ -604,8 +604,9 @@ OpenLayers.Layer = OpenLayers.Class({
* display - {Boolean}
*/
display: function(display) {
var inRange = this.calculateInRange();
if (display != (this.div.style.display != "none")) {
this.div.style.display = (display) ? "block" : "none";
this.div.style.display = (display && inRange) ? "block" : "none";
}
},