Improved reprioritization
This commit is contained in:
@@ -105,11 +105,12 @@ ol.TileQueue.prototype.loadMoreTiles = function() {
|
|||||||
*/
|
*/
|
||||||
ol.TileQueue.prototype.reprioritize = function() {
|
ol.TileQueue.prototype.reprioritize = function() {
|
||||||
if (!this.queue_.isEmpty()) {
|
if (!this.queue_.isEmpty()) {
|
||||||
var queue = this.queue_;
|
var values = /** @type {Array.<Array>} */ this.queue_.getValues();
|
||||||
this.queue_ = new goog.structs.PriorityQueue();
|
this.queue_.clear();
|
||||||
this.queuedTileKeys_ = {};
|
this.queuedTileKeys_ = {};
|
||||||
while (!queue.isEmpty()) {
|
var i;
|
||||||
this.enqueue.apply(this, /** @type {Array} */ (queue.remove()));
|
for (i = 0; i < values.length; ++i) {
|
||||||
|
this.enqueue.apply(this, values[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user