mirror of
https://github.com/gpxstudio/gpx.studio.git
synced 2026-11-01 12:17:18 +00:00
fix layer typings
This commit is contained in:
1 parent
b3fe640575
commit
fbd8775528
4 files changed
+40
-24
No files matched your search
@@ -794,6 +794,14 @@ export const defaultOpacities: { [key: string]: number } = {
|
||||
|
||||
export type LayerTreeType = { [key: string]: LayerTreeType | boolean };
|
||||
|
||||
/** A node of a layer tree that is a group of layers, not a layer (which is selected or not). */
|
||||
export function layerGroup(node: LayerTreeType | boolean | undefined): LayerTreeType {
|
||||
if (typeof node !== 'object') {
|
||||
throw new Error('Not a group of layers');
|
||||
}
|
||||
return node;
|
||||
}
|
||||
|
||||
// Hierarchy containing all basemaps
|
||||
export const basemapTree: LayerTreeType = {
|
||||
basemaps: {
|
||||
|
||||
Reference in new issue
Block a user