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 postRenderFunction = function(tileSource, map, frameState) {
|
||||||
var tileSourceKey = ol.getUid(tileSource).toString();
|
var tileSourceKey = ol.getUid(tileSource).toString();
|
||||||
|
if (tileSourceKey in frameState.usedTiles) {
|
||||||
tileSource.expireCache(frameState.viewState.projection,
|
tileSource.expireCache(frameState.viewState.projection,
|
||||||
frameState.usedTiles[tileSourceKey]);
|
frameState.usedTiles[tileSourceKey]);
|
||||||
|
}
|
||||||
}.bind(null, tileSource);
|
}.bind(null, tileSource);
|
||||||
|
|
||||||
frameState.postRenderFunctions.push(
|
frameState.postRenderFunctions.push(
|
||||||
|
|||||||
Reference in New Issue
Block a user