Add some useful filters

This commit is contained in:
Pieter Vander Vennet 2023-03-05 23:44:28 +01:00
parent 21216127c5
commit 92c5e5dea2
3 changed files with 92 additions and 2 deletions

View file

@ -10,6 +10,28 @@ export default interface FilterConfigJson {
* If there are multiple options these will be a list of radio buttons
* If there is only one option this will be a checkbox
* Filtering is done based on the given osmTags that are compared to the objects in that layer.
*
* An example which searches by name:
*
* ```
* {
* "id": "shop-name",
* "options": [
* {
* "fields": [
* {
* "name": "search",
* "type": "string"
* }
* ],
* "osmTags": "name~i~.*{search}.*",
* "question": {
* "en": "Only show shops with name {search}",
* }
* }
* ]
* }
* ```
*/
options: {
question: string | any