Remove 'drawn' property from Tiles. (Closes #1018)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@4557 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -548,18 +548,6 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
if (this.buffer == 0) {
|
|
||||||
for (var r=0, rl=this.grid.length; r<rl; r++) {
|
|
||||||
var row = this.grid[r];
|
|
||||||
for (var c=0, cl=row.length; c<cl; c++) {
|
|
||||||
var tile = row[c];
|
|
||||||
if (!tile.drawn &&
|
|
||||||
tile.bounds.intersectsBounds(bounds, false)) {
|
|
||||||
tile.draw();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
+3
-21
@@ -72,12 +72,6 @@ OpenLayers.Tile = OpenLayers.Class({
|
|||||||
*/
|
*/
|
||||||
position: null,
|
position: null,
|
||||||
|
|
||||||
/**
|
|
||||||
* Property: drawn
|
|
||||||
* {Boolean} false
|
|
||||||
*/
|
|
||||||
drawn: false,
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Property: isLoading
|
* Property: isLoading
|
||||||
* {Boolean} Is the tile loading?
|
* {Boolean} Is the tile loading?
|
||||||
@@ -144,20 +138,9 @@ OpenLayers.Tile = OpenLayers.Class({
|
|||||||
var withinMaxExtent = (maxExtent &&
|
var withinMaxExtent = (maxExtent &&
|
||||||
this.bounds.intersectsBounds(maxExtent, false));
|
this.bounds.intersectsBounds(maxExtent, false));
|
||||||
|
|
||||||
var mapExtent = this.layer.map.getExtent();
|
// The only case where we *wouldn't* want to draw the tile is if the
|
||||||
var withinMapExtent = (mapExtent &&
|
// tile is outside its layer's maxExtent.
|
||||||
this.bounds.intersectsBounds(mapExtent, false));
|
return (withinMaxExtent || this.layer.displayOutsideMaxExtent);
|
||||||
|
|
||||||
// There are two cases where we *wouldn't* want to draw the tile:
|
|
||||||
//
|
|
||||||
// 1) If the tile is outside its layer's maxExtent
|
|
||||||
// 2) When the layer's buffer is 0, if the tile is outside the map's
|
|
||||||
// extent (out of view)
|
|
||||||
//
|
|
||||||
// ...what we return is the opposite of the above conditions :-)
|
|
||||||
//
|
|
||||||
return ( (withinMaxExtent || this.layer.displayOutsideMaxExtent) &&
|
|
||||||
(withinMapExtent || (this.layer.buffer != 0)) );
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -175,7 +158,6 @@ OpenLayers.Tile = OpenLayers.Class({
|
|||||||
redraw = true;
|
redraw = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.drawn = false;
|
|
||||||
this.bounds = bounds.clone();
|
this.bounds = bounds.clone();
|
||||||
this.position = position.clone();
|
this.position = position.clone();
|
||||||
if (redraw) {
|
if (redraw) {
|
||||||
|
|||||||
@@ -123,7 +123,6 @@ OpenLayers.Tile.Image = OpenLayers.Class(OpenLayers.Tile, {
|
|||||||
OpenLayers.Util.modifyDOMElement(this.imgDiv,
|
OpenLayers.Util.modifyDOMElement(this.imgDiv,
|
||||||
null, null, imageSize) ;
|
null, null, imageSize) ;
|
||||||
}
|
}
|
||||||
this.drawn = true;
|
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user