Merge pull request #4594 from klokantech/tilequeue-reproj-jam

Fix for TileQueue gradually choking up when using raster reprojection
This commit is contained in:
Petr Sloup
2015-12-28 13:17:39 +01:00
2 changed files with 2 additions and 2 deletions

View File

@@ -322,7 +322,7 @@ ol.reproj.Tile.prototype.load = function() {
});
if (leftToLoad === 0) {
this.reproject_();
goog.global.setTimeout(goog.bind(this.reproject_, this), 0);
}
}
};

View File

@@ -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();
}
}
};