Improve type checking in ol.renderer.Layer

This commit is contained in:
Tom Payne
2013-11-20 11:03:13 +01:00
parent 0221f74e5c
commit a613b19360

View File

@@ -129,10 +129,16 @@ ol.renderer.Layer.prototype.scheduleExpireCache =
function(frameState, tileSource) {
if (tileSource.canExpireCache()) {
frameState.postRenderFunctions.push(
goog.partial(function(tileSource, map, frameState) {
var tileSourceKey = goog.getUid(tileSource).toString();
tileSource.expireCache(frameState.usedTiles[tileSourceKey]);
}, tileSource));
goog.partial(
/**
* @param {ol.source.Tile} tileSource Tile source.
* @param {ol.Map} map Map.
* @param {ol.FrameState} frameState Frame state.
*/
function(tileSource, map, frameState) {
var tileSourceKey = goog.getUid(tileSource).toString();
tileSource.expireCache(frameState.usedTiles[tileSourceKey]);
}, tileSource));
}
};