Only reprioritize tile queue when more tiles will be loaded
This commit is contained in:
@@ -586,8 +586,10 @@ ol.Map.prototype.handlePostRender = function() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.tileQueue_.reprioritize(); // FIXME only call if needed
|
if (this.tileQueue_.getTilesLoading() < maxTotalLoading) {
|
||||||
this.tileQueue_.loadMoreTiles(maxTotalLoading, maxNewLoads);
|
this.tileQueue_.reprioritize(); // FIXME only call if view has changed
|
||||||
|
this.tileQueue_.loadMoreTiles(maxTotalLoading, maxNewLoads);
|
||||||
|
}
|
||||||
|
|
||||||
var postRenderFunctions = this.postRenderFunctions_;
|
var postRenderFunctions = this.postRenderFunctions_;
|
||||||
var i;
|
var i;
|
||||||
|
|||||||
@@ -58,6 +58,14 @@ ol.TileQueue = function(tilePriorityFunction, tileChangeCallback) {
|
|||||||
goog.inherits(ol.TileQueue, ol.structs.PriorityQueue);
|
goog.inherits(ol.TileQueue, ol.structs.PriorityQueue);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return {number} Number of tiles loading.
|
||||||
|
*/
|
||||||
|
ol.TileQueue.prototype.getTilesLoading = function() {
|
||||||
|
return this.tilesLoading_;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @protected
|
* @protected
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user