forked from MapComplete/MapComplete
Add option to force loading of a layer, even if it is hidden + automatically set this flag is another layer depends on this layer
This commit is contained in:
parent
ad2f7b2bd6
commit
0f95891a47
6 changed files with 28 additions and 7 deletions
|
@ -60,6 +60,7 @@ export default class LayerConfig extends WithContextLoader {
|
|||
public readonly tagRenderings: TagRenderingConfig[];
|
||||
public readonly filters: FilterConfig[];
|
||||
public readonly filterIsSameAs: string;
|
||||
public readonly forceLoad: boolean;
|
||||
|
||||
constructor(
|
||||
json: LayerConfigJson,
|
||||
|
@ -166,6 +167,7 @@ export default class LayerConfig extends WithContextLoader {
|
|||
this.minzoom = json.minzoom ?? 0;
|
||||
this.minzoomVisible = json.minzoomVisible ?? this.minzoom;
|
||||
this.shownByDefault = json.shownByDefault ?? true;
|
||||
this.forceLoad = json.forceLoad ?? false;
|
||||
if (json.presets !== undefined && json.presets?.map === undefined) {
|
||||
throw "Presets should be a list of items (at " + context + ")"
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue