Add 'labels' to tagRenderings, allow to hide tagRenderings with a certain label

This commit is contained in:
Pieter Vander Vennet 2022-02-08 02:23:38 +01:00
parent 18bd4c3dfe
commit 018908b39b
4 changed files with 68 additions and 14 deletions

View file

@ -202,7 +202,14 @@ export interface LayoutConfigJson {
* }
*```
*/
layers: (LayerConfigJson | string | { builtin: string | string[], override: any })[],
layers: (LayerConfigJson | string |
{ builtin: string | string[],
override: any,
/**
* TagRenderings with any of these labels will be removed from the layer.
* Note that the 'id' and 'group' are considered labels too
*/
hideTagRenderingsWithLabels?: string[]})[],
/**
* If defined, data will be clustered.

View file

@ -20,6 +20,11 @@ export interface TagRenderingConfigJson {
*/
group?: string
/**
* A list of labels. These are strings that are used for various purposes, e.g. to filter them away
*/
labels?: string[]
/**
* Renders this value. Note that "{key}"-parts are substituted by the corresponding values of the element.
* If neither 'textFieldQuestion' nor 'mappings' are defined, this text is simply shown as default value.
@ -27,7 +32,7 @@ export interface TagRenderingConfigJson {
* Note that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`
*/
render?: string | any,
/**
* If it turns out that this tagRendering doesn't match _any_ value, then we show this question.
* If undefined, the question is never asked and this tagrendering is read-only