Add cache timeout option on layerSource

This commit is contained in:
Pieter Vander Vennet 2021-10-25 20:38:57 +02:00
parent 1bc7978f7c
commit c99e15eed9
7 changed files with 67 additions and 51 deletions

View file

@ -49,10 +49,7 @@ export default class LayoutConfig {
public readonly enableIframePopout: boolean;
public readonly customCss?: string;
/*
How long is the cache valid, in seconds?
*/
public readonly cacheTimeout?: number;
public readonly overpassUrl: string[];
public readonly overpassTimeout: number;
public readonly overpassMaxZoom: number
@ -170,7 +167,6 @@ export default class LayoutConfig {
this.enablePdfDownload = json.enablePdfDownload ?? false;
this.enableIframePopout = json.enableIframePopout ?? true
this.customCss = json.customCss;
this.cacheTimeout = json.cacheTimout ?? (60 * 24 * 60 * 60)
this.overpassUrl = Constants.defaultOverpassUrls
if(json.overpassUrl !== undefined){
if(typeof json.overpassUrl === "string"){