layer control progress

This commit is contained in:
vcoppe
2024-04-12 13:43:51 +02:00
parent 1eeaddc1bd
commit 02bfc3b07b
8 changed files with 136 additions and 98 deletions

View File

@@ -371,7 +371,9 @@ export const opacities: { [key: string]: number; } = {
swisstopoSlope: 0.4,
};
export const basemapTree = {
export type LayerTreeType = string[] | { [key: string]: LayerTreeType; };
export const basemapTree: LayerTreeType = {
world: ['mapboxOutdoors', 'mapboxSatellite', 'openStreetMap', 'openTopoMap', 'openHikingMap', 'cyclOSM'],
countries: {
bulgaria: ['bgMountains'],
@@ -387,7 +389,7 @@ export const basemapTree = {
},
}
export const overlayTree = {
export const overlayTree: LayerTreeType = {
world: {
cyclOSM: ['cyclOSMlite'],
waymarkedTrails: ['waymarkedTrailsHiking', 'waymarkedTrailsCycling', 'waymarkedTrailsMTB', 'waymarkedTrailsSkating', 'waymarkedTrailsHorseRiding', 'waymarkedTrailsWinter']