Scale tile queue according to number of sources

This commit is contained in:
Tom Payne
2013-04-23 22:18:51 +02:00
parent db1ab50938
commit 43f313cb18

View File

@@ -656,6 +656,9 @@ ol.Map.prototype.handlePostRender = function() {
maxNewLoads = 2;
}
}
var tileSourceCount = goog.object.getCount(frameState.wantedTiles);
maxTotalLoading *= tileSourceCount;
maxNewLoads *= tileSourceCount;
if (tileQueue.getTilesLoading() < maxTotalLoading) {
tileQueue.reprioritize(); // FIXME only call if view has changed
tileQueue.loadMoreTiles(maxTotalLoading, maxNewLoads);