forked from MapComplete/MapComplete
Usertests: add 'centermessage' again which indicates if data is loading or is present, see #1457
This commit is contained in:
parent
a55b84dba1
commit
1e56eb5503
8 changed files with 544 additions and 375 deletions
|
@ -70,6 +70,8 @@ export default class LayoutConfig implements LayoutInformation {
|
|||
public readonly definedAtUrl?: string
|
||||
public readonly definitionRaw?: string
|
||||
|
||||
private readonly layersDict: Map<string, LayerConfig>
|
||||
|
||||
constructor(
|
||||
json: LayoutConfigJson,
|
||||
official = true,
|
||||
|
@ -209,6 +211,11 @@ export default class LayoutConfig implements LayoutInformation {
|
|||
this.overpassTimeout = json.overpassTimeout ?? 30
|
||||
this.overpassMaxZoom = json.overpassMaxZoom ?? 16
|
||||
this.osmApiTileSize = json.osmApiTileSize ?? this.overpassMaxZoom + 1
|
||||
|
||||
this.layersDict = new Map<string, LayerConfig>()
|
||||
for (const layer of this.layers) {
|
||||
this.layersDict.set(layer.id, layer)
|
||||
}
|
||||
}
|
||||
|
||||
public CustomCodeSnippets(): string[] {
|
||||
|
@ -228,6 +235,10 @@ export default class LayoutConfig implements LayoutInformation {
|
|||
return custom
|
||||
}
|
||||
|
||||
public getLayer(id: string) {
|
||||
return this.layersDict.get(id)
|
||||
}
|
||||
|
||||
public isLeftRightSensitive() {
|
||||
return this.layers.some((l) => l.isLeftRightSensitive())
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue