Use TileSource.getClosestLevel to set TileCache release cutoff

This commit is contained in:
Sean Nichols 2017-06-06 15:30:09 -04:00
parent 265625df75
commit e4393cc4dc

View File

@ -1468,8 +1468,7 @@ function onTileLoad( tiledImage, tile, time, image, errorMsg, tileRequest ) {
}
var finish = function() {
var cutoff = Math.ceil( Math.log(
tiledImage.source.getTileWidth(tile.level) ) / Math.log( 2 ) );
var cutoff = tiledImage.source.getClosestLevel();
setTileLoaded(tiledImage, tile, image, cutoff, tileRequest);
};