From e1712eb44a3f56797ca3f5d091305b60b6b9ac0b Mon Sep 17 00:00:00 2001 From: Petr Sloup Date: Sat, 26 Dec 2015 10:49:21 +0100 Subject: [PATCH] Initiate tile load only after registering it as loading --- src/ol/tilequeue.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ol/tilequeue.js b/src/ol/tilequeue.js index 02e9221116..20a27fab57 100644 --- a/src/ol/tilequeue.js +++ b/src/ol/tilequeue.js @@ -119,10 +119,10 @@ ol.TileQueue.prototype.loadMoreTiles = function(maxTotalLoading, maxNewLoads) { this.getCount() > 0) { tile = /** @type {ol.Tile} */ (this.dequeue()[0]); if (tile.getState() === ol.TileState.IDLE) { - tile.load(); this.tilesLoadingKeys_[tile.getKey()] = true; ++this.tilesLoading_; ++newLoads; + tile.load(); } } };