Move configuration of maximum tiles loading into map.js

This commit is contained in:
Tom Payne
2013-04-04 23:49:21 +02:00
parent 71d1207201
commit 0e12d16c37
2 changed files with 14 additions and 3 deletions

View File

@@ -77,6 +77,12 @@ ol.ENABLE_DOM = true;
ol.ENABLE_WEBGL = true;
/**
* @define {number} Maximum number of simultaneously loading tiles.
*/
ol.MAXIMUM_TILES_LOADING = 8;
/**
* @define {number} Maximum new tile loads per frame.
*/
@@ -279,7 +285,9 @@ ol.Map = function(mapOptions) {
* @private
* @type {ol.TileQueue}
*/
this.tileQueue_ = new ol.TileQueue(goog.bind(this.getTilePriority, this),
this.tileQueue_ = new ol.TileQueue(
ol.MAXIMUM_TILES_LOADING,
goog.bind(this.getTilePriority, this),
goog.bind(this.handleTileChange_, this));
goog.events.listen(this, ol.Object.getChangedEventType(ol.MapProperty.VIEW),