Don't enqueue tiles which are not idle

This commit is contained in:
Tom Payne
2013-01-12 16:55:36 +01:00
parent 3d5c76c346
commit b803aad5a8

View File

@@ -63,7 +63,9 @@ ol.TileQueue = function(tilePriorityFunction) {
*/
ol.TileQueue.prototype.enqueue =
function(tile, tileCenter, tileResolution) {
goog.asserts.assert(tile.getState() == ol.TileState.IDLE);
if (tile.getState() != ol.TileState.IDLE) {
return;
}
var tileKey = tile.getKey();
if (!(tileKey in this.queuedTileKeys_)) {
var priority = this.tilePriorityFunction_(tile, tileCenter, tileResolution);