diff --git a/src/ol/reproj/tile.js b/src/ol/reproj/tile.js index c657c08649..a698dbb8c5 100644 --- a/src/ol/reproj/tile.js +++ b/src/ol/reproj/tile.js @@ -322,7 +322,7 @@ ol.reproj.Tile.prototype.load = function() { }); if (leftToLoad === 0) { - this.reproject_(); + goog.global.setTimeout(goog.bind(this.reproject_, this), 0); } } }; 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(); } } };