Allow a layer to be hidden by default; add some validation and behaviour tweaks

This commit is contained in:
Pieter Vander Vennet 2021-12-03 02:29:25 +01:00
parent 5f3c8dd1b4
commit ea5bc7cbf4
7 changed files with 17 additions and 2 deletions

View file

@ -109,6 +109,13 @@ export interface LayerConfigJson {
*/
minzoom?: number;
/**
* Indicates if this layer is shown by default;
* can be used to hide a layer from start, or to load the layer but only to show it where appropriate (e.g. for snapping to it)
*/
shownByDefault?: true | boolean;
/**
* The zoom level at which point the data is hidden again
* Default: 100 (thus: always visible