Add overlay layer possibility, fix #515

This commit is contained in:
Pieter Vander Vennet 2021-10-14 21:43:14 +02:00
parent 7e053b3ada
commit 891c449058
12 changed files with 263 additions and 56 deletions

View file

@ -1,5 +1,7 @@
import {TagRenderingConfigJson} from "./TagRenderingConfigJson";
import {LayerConfigJson} from "./LayerConfigJson";
import TilesourceConfig from "../TilesourceConfig";
import TilesourceConfigJson from "./TilesourceConfigJson";
/**
* Defines the entire theme.
@ -155,6 +157,11 @@ export interface LayoutConfigJson {
*/
defaultBackgroundId?: string;
/**
* Define some (overlay) slippy map tilesources
*/
tileLayerSources?: TilesourceConfigJson[]
/**
* The number of seconds that a feature is allowed to stay in the cache.
* The caching flow is as following:

View file

@ -0,0 +1,36 @@
/**
* Configuration for a tilesource config
*/
export default interface TilesourceConfigJson {
/**
* The path, where {x}, {y} and {z} will be substituted
*/
source: string,
isOverlay?: boolean,
/**
* How this will be shown in the selection menu.
* Make undefined if this may not be toggled
*/
name?: any | string
/**
* Only visible at this or a higher zoom level
*/
minZoom?: number
/**
* Only visible at this or a lower zoom level
*/
maxZoom?: number
/**
* The default state, set to false to hide by default
*/
defaultState: boolean;
}