Accept custom isLoaded method in findLoadedTiles method

This commit is contained in:
Tim Schaub
2013-02-19 12:13:58 -07:00
parent 1b984ac06c
commit 80dc7b5bf7
5 changed files with 33 additions and 19 deletions

View File

@@ -365,8 +365,12 @@ ol.renderer.webgl.TileLayer.prototype.renderFrame =
var tilesToDrawByZ = {};
tilesToDrawByZ[z] = {};
function isLoaded(tile) {
return !goog.isNull(tile) && tile.getState() == ol.TileState.LOADED &&
mapRenderer.isTileTextureLoaded(tile);
}
var findLoadedTiles = goog.bind(tileSource.findLoadedTiles, tileSource,
tilesToDrawByZ);
tilesToDrawByZ, isLoaded);
var tilesToLoad = new goog.structs.PriorityQueue();