Use dequeue rather than remove, thanks @elemoine

This commit is contained in:
Tom Payne
2013-01-13 22:28:37 +01:00
parent 8b39e8f7f0
commit be3849d1b8

View File

@@ -93,7 +93,7 @@ ol.TileQueue.prototype.handleTileChange = function() {
ol.TileQueue.prototype.loadMoreTiles = function() {
var tile, tileKey;
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();
delete this.queuedTileKeys_[tileKey];
goog.events.listen(tile, goog.events.EventType.CHANGE,