Improve type checking in ol.renderer.Layer
This commit is contained in:
@@ -129,10 +129,16 @@ ol.renderer.Layer.prototype.scheduleExpireCache =
|
|||||||
function(frameState, tileSource) {
|
function(frameState, tileSource) {
|
||||||
if (tileSource.canExpireCache()) {
|
if (tileSource.canExpireCache()) {
|
||||||
frameState.postRenderFunctions.push(
|
frameState.postRenderFunctions.push(
|
||||||
goog.partial(function(tileSource, map, frameState) {
|
goog.partial(
|
||||||
var tileSourceKey = goog.getUid(tileSource).toString();
|
/**
|
||||||
tileSource.expireCache(frameState.usedTiles[tileSourceKey]);
|
* @param {ol.source.Tile} tileSource Tile source.
|
||||||
}, tileSource));
|
* @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));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user