Fix Bug when adding/removing layer with no cache
This commit is contained in:
committed by
Andreas Hocevar
parent
71b334d49c
commit
db63cc1b23
@@ -152,8 +152,10 @@ ol.renderer.Layer.prototype.scheduleExpireCache = function(frameState, tileSourc
|
||||
*/
|
||||
var postRenderFunction = function(tileSource, map, frameState) {
|
||||
var tileSourceKey = ol.getUid(tileSource).toString();
|
||||
tileSource.expireCache(frameState.viewState.projection,
|
||||
frameState.usedTiles[tileSourceKey]);
|
||||
if (tileSourceKey in frameState.usedTiles) {
|
||||
tileSource.expireCache(frameState.viewState.projection,
|
||||
frameState.usedTiles[tileSourceKey]);
|
||||
}
|
||||
}.bind(null, tileSource);
|
||||
|
||||
frameState.postRenderFunctions.push(
|
||||
|
||||
Reference in New Issue
Block a user