Only reprioritize tile queue when more tiles will be loaded

This commit is contained in:
Tom Payne
2013-04-07 18:31:56 +02:00
parent b93283e8f3
commit 5b133d40d9
2 changed files with 12 additions and 2 deletions

View File

@@ -586,8 +586,10 @@ ol.Map.prototype.handlePostRender = function() {
}
}
this.tileQueue_.reprioritize(); // FIXME only call if needed
this.tileQueue_.loadMoreTiles(maxTotalLoading, maxNewLoads);
if (this.tileQueue_.getTilesLoading() < maxTotalLoading) {
this.tileQueue_.reprioritize(); // FIXME only call if view has changed
this.tileQueue_.loadMoreTiles(maxTotalLoading, maxNewLoads);
}
var postRenderFunctions = this.postRenderFunctions_;
var i;