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:
@@ -604,8 +604,9 @@ OpenLayers.Layer = OpenLayers.Class({
|
|||||||
* display - {Boolean}
|
* display - {Boolean}
|
||||||
*/
|
*/
|
||||||
display: function(display) {
|
display: function(display) {
|
||||||
|
var inRange = this.calculateInRange();
|
||||||
if (display != (this.div.style.display != "none")) {
|
if (display != (this.div.style.display != "none")) {
|
||||||
this.div.style.display = (display) ? "block" : "none";
|
this.div.style.display = (display && inRange) ? "block" : "none";
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user