Assert that ol.layer.Tile#getPreload is always set

This commit is contained in:
Frederic Junod
2015-01-07 16:48:15 +01:00
parent 06fe8288ce
commit df51e55781
3 changed files with 40 additions and 8 deletions

View File

@@ -246,8 +246,7 @@ ol.renderer.Layer.prototype.snapCenterToPixel =
* @param {ol.proj.Projection} projection Projection.
* @param {ol.Extent} extent Extent.
* @param {number} currentZ Current Z.
* @param {number|undefined} preload Load low resolution tiles up to 'preload'
* levels.
* @param {number} preload Load low resolution tiles up to 'preload' levels.
* @param {function(this: T, ol.Tile)=} opt_tileCallback Tile callback.
* @param {T=} opt_this Object to use as `this` in `opt_tileCallback`.
* @protected
@@ -264,9 +263,6 @@ ol.renderer.Layer.prototype.manageTilePyramid = function(
var tileQueue = frameState.tileQueue;
var minZoom = tileGrid.getMinZoom();
var tile, tileRange, tileResolution, x, y, z;
if (!goog.isDef(preload)) {
preload = 0;
}
for (z = currentZ; z >= minZoom; --z) {
tileRange = tileGrid.getTileRangeForExtentAndZ(extent, z, tileRange);
tileResolution = tileGrid.getResolution(z);