From 43f313cb18dd810189c7099e3d91fae98f3a593a Mon Sep 17 00:00:00 2001 From: Tom Payne Date: Tue, 23 Apr 2013 22:18:51 +0200 Subject: [PATCH] Scale tile queue according to number of sources --- src/ol/map.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/ol/map.js b/src/ol/map.js index cfa2e6d613..ebe0ade07d 100644 --- a/src/ol/map.js +++ b/src/ol/map.js @@ -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);