Merge pull request #655 from twpayne/scale-tile-queue

Scale tile queue according to number of sources
This commit is contained in:
Tom Payne committed 2013-04-25 05:44:46 -07:00
commit e7eb07197e
1 file changed
+3
+3
View File
@@ -638,6 +638,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);