Themes: validate that a background layer actually exists, fix current-view button (GRB)

This commit is contained in:
Pieter Vander Vennet 2024-01-03 18:24:00 +01:00
parent eb6194bf8f
commit fc483ed547
9 changed files with 62 additions and 29 deletions

View file

@ -83,6 +83,15 @@ export class AvailableRasterLayers {
})
)
}
public static allIds(): Set<string> {
const all: string[] = []
all.push(...AvailableRasterLayers.globalLayers.map((l) => l.properties.id))
all.push(...AvailableRasterLayers.EditorLayerIndex.map((l) => l.properties.id))
all.push(this.osmCarto.properties.id)
all.push(this.maptilerDefaultLayer.properties.id)
return new Set<string>(all)
}
}
export class RasterLayerUtils {