Use dequeue rather than remove, thanks @elemoine
This commit is contained in:
@@ -93,7 +93,7 @@ ol.TileQueue.prototype.handleTileChange = function() {
|
|||||||
ol.TileQueue.prototype.loadMoreTiles = function() {
|
ol.TileQueue.prototype.loadMoreTiles = function() {
|
||||||
var tile, tileKey;
|
var tile, tileKey;
|
||||||
while (!this.queue_.isEmpty() && this.tilesLoading_ < this.maxTilesLoading_) {
|
while (!this.queue_.isEmpty() && this.tilesLoading_ < this.maxTilesLoading_) {
|
||||||
tile = (/** @type {Array} */ (this.queue_.remove()))[0];
|
tile = (/** @type {Array} */ (this.queue_.dequeue()))[0];
|
||||||
tileKey = tile.getKey();
|
tileKey = tile.getKey();
|
||||||
delete this.queuedTileKeys_[tileKey];
|
delete this.queuedTileKeys_[tileKey];
|
||||||
goog.events.listen(tile, goog.events.EventType.CHANGE,
|
goog.events.listen(tile, goog.events.EventType.CHANGE,
|
||||||
|
|||||||
Reference in New Issue
Block a user