Studio: more work on the base properties

This commit is contained in:
Pieter Vander Vennet 2023-06-21 17:13:09 +02:00
parent c229b92221
commit 84dee10201
46 changed files with 11462 additions and 37927 deletions

View file

@ -45,12 +45,10 @@
"description": "In some cases, the contributor is not allowed to delete the current feature (e.g. because it isn't a point, the point is referenced by a relation or the user isn't experienced enough).\nTo still offer the user a 'delete'-option, the feature is retagged with these tags. This is a soft deletion, as the point isn't actually removed from OSM but rather marked as 'disused'\nIt is important that the feature will be retagged in such a way that it won't be picked up by the layer anymore!\n\nExample (note that \"amenity=\" erases the 'amenity'-key alltogether):\n```\n{\n \"and\": [\"disussed:amenity=public_bookcase\", \"amenity=\"]\n}\n```\n\nor (notice the use of the ':='-tag to copy the old value of 'shop=*' into 'disused:shop='):\n```\n{\n \"and\": [\"disused:shop:={shop}\", \"shop=\"]\n}\n```",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson",
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"$ref": "#/definitions/OrTagConfigJson",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{or:TagConfigJson[];}"
},
{
"type": "string"
@ -68,13 +66,12 @@
},
"definitions": {
"TagConfigJson": {
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation",
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation\n\ntype: tag",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
"type": "object",
"properties": {
"or": {
@ -93,8 +90,7 @@
}
]
},
"AndTagConfigJson": {
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
"{and:TagConfigJson[];}": {
"type": "object",
"properties": {
"and": {
@ -109,8 +105,7 @@
],
"additionalProperties": false
},
"OrTagConfigJson": {
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
"{or:TagConfigJson[];}": {
"type": "object",
"properties": {
"or": {

View file

@ -45,12 +45,10 @@ export default {
"description": "In some cases, the contributor is not allowed to delete the current feature (e.g. because it isn't a point, the point is referenced by a relation or the user isn't experienced enough).\nTo still offer the user a 'delete'-option, the feature is retagged with these tags. This is a soft deletion, as the point isn't actually removed from OSM but rather marked as 'disused'\nIt is important that the feature will be retagged in such a way that it won't be picked up by the layer anymore!\n\nExample (note that \"amenity=\" erases the 'amenity'-key alltogether):\n```\n{\n \"and\": [\"disussed:amenity=public_bookcase\", \"amenity=\"]\n}\n```\n\nor (notice the use of the ':='-tag to copy the old value of 'shop=*' into 'disused:shop='):\n```\n{\n \"and\": [\"disused:shop:={shop}\", \"shop=\"]\n}\n```",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson",
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"$ref": "#/definitions/OrTagConfigJson",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{or:TagConfigJson[];}"
},
{
"type": "string"
@ -68,13 +66,12 @@ export default {
},
"definitions": {
"TagConfigJson": {
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation",
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation\n\ntype: tag",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
"type": "object",
"properties": {
"or": {
@ -93,8 +90,7 @@ export default {
}
]
},
"AndTagConfigJson": {
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
"{and:TagConfigJson[];}": {
"type": "object",
"properties": {
"and": {
@ -108,8 +104,7 @@ export default {
"and"
]
},
"OrTagConfigJson": {
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
"{or:TagConfigJson[];}": {
"type": "object",
"properties": {
"or": {

View file

@ -2,13 +2,12 @@
"$ref": "#/definitions/DenominationConfigJson",
"definitions": {
"TagConfigJson": {
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation",
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation\n\ntype: tag",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
"type": "object",
"properties": {
"or": {
@ -27,8 +26,7 @@
}
]
},
"AndTagConfigJson": {
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
"{and:TagConfigJson[];}": {
"type": "object",
"properties": {
"and": {
@ -43,8 +41,7 @@
],
"additionalProperties": false
},
"OrTagConfigJson": {
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
"{or:TagConfigJson[];}": {
"type": "object",
"properties": {
"or": {

View file

@ -2,13 +2,12 @@ export default {
"$ref": "#/definitions/DenominationConfigJson",
"definitions": {
"TagConfigJson": {
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation",
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation\n\ntype: tag",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
"type": "object",
"properties": {
"or": {
@ -27,8 +26,7 @@ export default {
}
]
},
"AndTagConfigJson": {
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
"{and:TagConfigJson[];}": {
"type": "object",
"properties": {
"and": {
@ -42,8 +40,7 @@ export default {
"and"
]
},
"OrTagConfigJson": {
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
"{or:TagConfigJson[];}": {
"type": "object",
"properties": {
"or": {

View file

@ -29,13 +29,12 @@
],
"definitions": {
"TagConfigJson": {
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation",
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation\n\ntype: tag",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
"type": "object",
"properties": {
"or": {
@ -54,8 +53,7 @@
}
]
},
"AndTagConfigJson": {
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
"{and:TagConfigJson[];}": {
"type": "object",
"properties": {
"and": {
@ -70,8 +68,7 @@
],
"additionalProperties": false
},
"OrTagConfigJson": {
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
"{or:TagConfigJson[];}": {
"type": "object",
"properties": {
"or": {

View file

@ -29,13 +29,12 @@ export default {
],
"definitions": {
"TagConfigJson": {
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation",
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation\n\ntype: tag",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
"type": "object",
"properties": {
"or": {
@ -54,8 +53,7 @@ export default {
}
]
},
"AndTagConfigJson": {
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
"{and:TagConfigJson[];}": {
"type": "object",
"properties": {
"and": {
@ -69,8 +67,7 @@ export default {
"and"
]
},
"OrTagConfigJson": {
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
"{or:TagConfigJson[];}": {
"type": "object",
"properties": {
"or": {

View file

@ -13,15 +13,13 @@
"properties": {
"question": {},
"osmTags": {
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation",
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation\n\ntype: tag",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson",
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"$ref": "#/definitions/OrTagConfigJson",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{or:TagConfigJson[];}"
},
{
"type": "string"
@ -66,13 +64,12 @@
],
"definitions": {
"TagConfigJson": {
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation",
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation\n\ntype: tag",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
"type": "object",
"properties": {
"or": {
@ -91,8 +88,7 @@
}
]
},
"AndTagConfigJson": {
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
"{and:TagConfigJson[];}": {
"type": "object",
"properties": {
"and": {
@ -107,8 +103,7 @@
],
"additionalProperties": false
},
"OrTagConfigJson": {
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
"{or:TagConfigJson[];}": {
"type": "object",
"properties": {
"or": {

View file

@ -13,15 +13,13 @@ export default {
"properties": {
"question": {},
"osmTags": {
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation",
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation\n\ntype: tag",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson",
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"$ref": "#/definitions/OrTagConfigJson",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{or:TagConfigJson[];}"
},
{
"type": "string"
@ -66,13 +64,12 @@ export default {
],
"definitions": {
"TagConfigJson": {
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation",
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation\n\ntype: tag",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
"type": "object",
"properties": {
"or": {
@ -91,8 +88,7 @@ export default {
}
]
},
"AndTagConfigJson": {
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
"{and:TagConfigJson[];}": {
"type": "object",
"properties": {
"and": {
@ -106,8 +102,7 @@ export default {
"and"
]
},
"OrTagConfigJson": {
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
"{or:TagConfigJson[];}": {
"type": "object",
"properties": {
"or": {

View file

@ -29,17 +29,17 @@
]
},
"source": {
"description": "This determines where the data for the layer is fetched: from OSM or from an external geojson dataset.\n\nIf no 'geojson' is defined, data will be fetched from overpass and the OSM-API.\n\nEvery source _must_ define which tags _must_ be present in order to be picked up.\n\nNote: a source must always be defined. 'special' is only allowed if this is a builtin-layer",
"description": "Question: Where should the data be fetched from?\n\nThis determines where the data for the layer is fetched: from OSM or from an external geojson dataset.\n\nIf no 'geojson' is defined, data will be fetched from overpass and the OSM-API.\n\nEvery source _must_ define which tags _must_ be present in order to be picked up.\n\nNote: a source must always be defined. 'special' is only allowed if this is a builtin-layer\n\ntypes: Load data with specific tags from OpenStreetMap ; Load data from an external geojson source ;\ngroup: basic",
"anyOf": [
{
"type": "object",
"properties": {
"osmTags": {
"$ref": "#/definitions/TagConfigJson",
"description": "Every source must set which tags have to be present in order to load the given layer."
"description": "question: Which tags must be present on the feature to show it in this layer?\nEvery source must set which tags have to be present in order to load the given layer."
},
"maxCacheAge": {
"description": "The maximum amount of seconds that a tile is allowed to linger in the cache",
"description": "question: How long (in seconds) is the data allowed to remain cached until it must be refreshed?\nThe maximum amount of seconds that a tile is allowed to linger in the cache\n\ntype: nat",
"type": "number"
}
},
@ -99,12 +99,10 @@
"description": "If set, only features matching this extra tag will be shown.\nThis is useful to hide certain features from view.\n\nThe default value is 'yes'\n\ngroup: advanced",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson",
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"$ref": "#/definitions/OrTagConfigJson",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{or:TagConfigJson[];}"
},
{
"type": "string"
@ -116,7 +114,7 @@
"type": "boolean"
},
"minzoom": {
"description": "The minimum needed zoomlevel required to start loading and displaying the data.\nThis can be used to only show common features (e.g. a bicycle parking) only when the map is zoomed in very much (17).\nThis prevents cluttering the map with thousands of parkings if one is looking to an entire city.\n\nDefault: 0\n\ngroup: basic\nquestion: At what zoom level should features of the layer be shown?\nifunset: Always load this layer, even if the entire world is in view.",
"description": "The minimum needed zoomlevel required to start loading and displaying the data.\nThis can be used to only show common features (e.g. a bicycle parking) only when the map is zoomed in very much (17).\nThis prevents cluttering the map with thousands of parkings if one is looking to an entire city.\n\nDefault: 0\ngroup: basic\ntype: nat\nquestion: At what zoom level should features of the layer be shown?\nifunset: Always load this layer, even if the entire world is in view.",
"type": "number"
},
"shownByDefault": {
@ -239,53 +237,23 @@
"type": "string"
}
},
"preciseInput": {
"description": "If set, the user will prompted to confirm the location before actually adding the data.\nThis will be with a 'drag crosshair'-method.\n\nIf 'preferredBackgroundCategory' is set, the element will attempt to pick a background layer of that category.",
"snapToLayer": {
"description": "If specified, these layers will be shown to and the new point will be snapped towards it",
"anyOf": [
{
"type": "object",
"properties": {
"preferredBackground": {
"description": "The type of background picture",
"anyOf": [
{
"type": "array",
"items": {
"type": "string"
}
},
{
"type": "string"
}
]
},
"snapToLayer": {
"description": "If specified, these layers will be shown to and the new point will be snapped towards it",
"anyOf": [
{
"type": "array",
"items": {
"type": "string"
}
},
{
"type": "string"
}
]
},
"maxSnapDistance": {
"description": "If specified, a new point will only be snapped if it is within this range.\nDistance in meter\n\nDefault: 10",
"type": "number"
}
"type": "array",
"items": {
"type": "string"
}
},
{
"enum": [
true
],
"type": "boolean"
"type": "string"
}
]
},
"maxSnapDistance": {
"description": "If specified, a new point will only be snapped if it is within this range.\nDistance in meter\n\nDefault: 10",
"type": "number"
}
},
"required": [
@ -445,13 +413,12 @@
],
"definitions": {
"TagConfigJson": {
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation",
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation\n\ntype: tag",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
"type": "object",
"properties": {
"or": {
@ -470,8 +437,7 @@
}
]
},
"AndTagConfigJson": {
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
"{and:TagConfigJson[];}": {
"type": "object",
"properties": {
"and": {
@ -486,8 +452,7 @@
],
"additionalProperties": false
},
"OrTagConfigJson": {
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
"{or:TagConfigJson[];}": {
"type": "object",
"properties": {
"or": {
@ -655,12 +620,10 @@
"description": "Only show this tagrendering (or ask the question) if the selected object also matches the tags specified as `condition`.\n\nThis is useful to ask a follow-up question.\nFor example, within toilets, asking _where_ the diaper changing table is is only useful _if_ there is one.\nThis can be done by adding `\"condition\": \"changing_table=yes\"`\n\nA full example would be:\n```json\n {\n \"question\": \"Where is the changing table located?\",\n \"render\": \"The changing table is located at {changing_table:location}\",\n \"condition\": \"changing_table=yes\",\n \"freeform\": {\n \"key\": \"changing_table:location\",\n \"inline\": true\n },\n \"mappings\": [\n {\n \"then\": \"The changing table is in the toilet for women.\",\n \"if\": \"changing_table:location=female_toilet\"\n },\n {\n \"then\": \"The changing table is in the toilet for men.\",\n \"if\": \"changing_table:location=male_toilet\"\n },\n {\n \"if\": \"changing_table:location=wheelchair_toilet\",\n \"then\": \"The changing table is in the toilet for wheelchair users.\",\n },\n {\n \"if\": \"changing_table:location=dedicated_room\",\n \"then\": \"The changing table is in a dedicated room. \",\n }\n ],\n \"id\": \"toilet-changing_table:location\"\n },\n```",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson",
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"$ref": "#/definitions/OrTagConfigJson",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{or:TagConfigJson[];}"
},
{
"type": "string"
@ -671,12 +634,10 @@
"description": "If set, this tag will be evaluated agains the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options.\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson",
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"$ref": "#/definitions/OrTagConfigJson",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{or:TagConfigJson[];}"
},
{
"type": "string"
@ -760,7 +721,7 @@
"properties": {
"if": {
"$ref": "#/definitions/TagConfigJson",
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation"
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation\n\ntype: tag"
},
"then": {
"description": "Shown if the 'if is fulfilled\nType: rendered",
@ -801,12 +762,10 @@
"description": "In some cases, multiple taggings exist (e.g. a default assumption, or a commonly mapped abbreviation and a fully written variation).\n\nIn the latter case, a correct text should be shown, but only a single, canonical tagging should be selectable by the user.\nIn this case, one of the mappings can be hiden by setting this flag.\n\nTo demonstrate an example making a default assumption:\n\nmappings: [\n {\n if: \"access=\", -- no access tag present, we assume accessible\n then: \"Accessible to the general public\",\n hideInAnswer: true\n },\n {\n if: \"access=yes\",\n then: \"Accessible to the general public\", -- the user selected this, we add that to OSM\n },\n {\n if: \"access=no\",\n then: \"Not accessible to the public\"\n }\n]\n\n\nFor example, for an operator, we have `operator=Agentschap Natuur en Bos`, which is often abbreviated to `operator=ANB`.\nThen, we would add two mappings:\n{\n if: \"operator=Agentschap Natuur en Bos\" -- the non-abbreviated version which should be uploaded\n then: \"Maintained by Agentschap Natuur en Bos\"\n},\n{\n if: \"operator=ANB\", -- we don't want to upload abbreviations\n then: \"Maintained by Agentschap Natuur en Bos\"\n hideInAnswer: true\n}\n\nHide in answer can also be a tagsfilter, e.g. to make sure an option is only shown when appropriate.\nKeep in mind that this is reverse logic: it will be hidden in the answer if the condition is true, it will thus only show in the case of a mismatch\n\ne.g., for toilets: if \"wheelchair=no\", we know there is no wheelchair dedicated room.\nFor the location of the changing table, the option \"in the wheelchair accessible toilet is weird\", so we write:\n\n{\n \"question\": \"Where is the changing table located?\"\n \"mappings\": [\n {\"if\":\"changing_table:location=female\",\"then\":\"In the female restroom\"},\n {\"if\":\"changing_table:location=male\",\"then\":\"In the male restroom\"},\n {\"if\":\"changing_table:location=wheelchair\",\"then\":\"In the wheelchair accessible restroom\", \"hideInAnswer\": \"wheelchair=no\"},\n\n ]\n}\n\nAlso have a look for the meta-tags\n{\n if: \"operator=Agentschap Natuur en Bos\",\n then: \"Maintained by Agentschap Natuur en Bos\",\n hideInAnswer: \"_country!=be\"\n}",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson",
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"$ref": "#/definitions/OrTagConfigJson",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{or:TagConfigJson[];}"
},
{
"type": [
@ -820,12 +779,10 @@
"description": "Only applicable if 'multiAnswer' is set.\nThis is for situations such as:\n`accepts:coins=no` where one can select all the possible payment methods. However, we want to make explicit that some options _were not_ selected.\nThis can be done with `ifnot`\nNote that we can not explicitly render this negative case to the user, we cannot show `does _not_ accept coins`.\nIf this is important to your usecase, consider using multiple radiobutton-fields without `multiAnswer`",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson",
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"$ref": "#/definitions/OrTagConfigJson",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{or:TagConfigJson[];}"
},
{
"type": "string"
@ -847,12 +804,10 @@
"description": "If the searchable selector is picked, mappings with this item will have priority and show up even if the others are hidden\nUse this sparingly",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson",
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"$ref": "#/definitions/OrTagConfigJson",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{or:TagConfigJson[];}"
},
{
"type": "string"
@ -904,7 +859,7 @@
"properties": {
"if": {
"$ref": "#/definitions/TagConfigJson",
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation"
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation\n\ntype: tag"
},
"then": {
"description": "Badge to show\nType: icon",
@ -935,6 +890,17 @@
}
]
},
"anchor": {
"description": "question: What is the anchorpoint of the icon?\n\nThis matches the geographical point with a location on the icon.\nFor example, a feature attached to the ground can use 'bottom' as zooming in will give the appearance of being anchored to a fixed location.",
"anyOf": [
{
"$ref": "#/definitions/TagRenderingConfigJson"
},
{
"type": "string"
}
]
},
"rotation": {
"description": "The rotation of an icon, useful for e.g. directions.\nUsage: as if it were a css property for 'rotate', thus has to end with 'deg', e.g. `90deg`, `{direction}deg`, `calc(90deg - {camera:direction}deg)``",
"anyOf": [
@ -1321,12 +1287,10 @@
"description": "Only show this tagrendering (or ask the question) if the selected object also matches the tags specified as `condition`.\n\nThis is useful to ask a follow-up question.\nFor example, within toilets, asking _where_ the diaper changing table is is only useful _if_ there is one.\nThis can be done by adding `\"condition\": \"changing_table=yes\"`\n\nA full example would be:\n```json\n {\n \"question\": \"Where is the changing table located?\",\n \"render\": \"The changing table is located at {changing_table:location}\",\n \"condition\": \"changing_table=yes\",\n \"freeform\": {\n \"key\": \"changing_table:location\",\n \"inline\": true\n },\n \"mappings\": [\n {\n \"then\": \"The changing table is in the toilet for women.\",\n \"if\": \"changing_table:location=female_toilet\"\n },\n {\n \"then\": \"The changing table is in the toilet for men.\",\n \"if\": \"changing_table:location=male_toilet\"\n },\n {\n \"if\": \"changing_table:location=wheelchair_toilet\",\n \"then\": \"The changing table is in the toilet for wheelchair users.\",\n },\n {\n \"if\": \"changing_table:location=dedicated_room\",\n \"then\": \"The changing table is in a dedicated room. \",\n }\n ],\n \"id\": \"toilet-changing_table:location\"\n },\n```",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson",
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"$ref": "#/definitions/OrTagConfigJson",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{or:TagConfigJson[];}"
},
{
"type": "string"
@ -1337,12 +1301,10 @@
"description": "If set, this tag will be evaluated agains the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options.\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson",
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"$ref": "#/definitions/OrTagConfigJson",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{or:TagConfigJson[];}"
},
{
"type": "string"
@ -1504,12 +1466,10 @@
"description": "Only show this tagrendering (or ask the question) if the selected object also matches the tags specified as `condition`.\n\nThis is useful to ask a follow-up question.\nFor example, within toilets, asking _where_ the diaper changing table is is only useful _if_ there is one.\nThis can be done by adding `\"condition\": \"changing_table=yes\"`\n\nA full example would be:\n```json\n {\n \"question\": \"Where is the changing table located?\",\n \"render\": \"The changing table is located at {changing_table:location}\",\n \"condition\": \"changing_table=yes\",\n \"freeform\": {\n \"key\": \"changing_table:location\",\n \"inline\": true\n },\n \"mappings\": [\n {\n \"then\": \"The changing table is in the toilet for women.\",\n \"if\": \"changing_table:location=female_toilet\"\n },\n {\n \"then\": \"The changing table is in the toilet for men.\",\n \"if\": \"changing_table:location=male_toilet\"\n },\n {\n \"if\": \"changing_table:location=wheelchair_toilet\",\n \"then\": \"The changing table is in the toilet for wheelchair users.\",\n },\n {\n \"if\": \"changing_table:location=dedicated_room\",\n \"then\": \"The changing table is in a dedicated room. \",\n }\n ],\n \"id\": \"toilet-changing_table:location\"\n },\n```",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson",
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"$ref": "#/definitions/OrTagConfigJson",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{or:TagConfigJson[];}"
},
{
"type": "string"
@ -1520,12 +1480,10 @@
"description": "If set, this tag will be evaluated agains the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options.\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson",
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"$ref": "#/definitions/OrTagConfigJson",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{or:TagConfigJson[];}"
},
{
"type": "string"
@ -1611,15 +1569,13 @@
"properties": {
"question": {},
"osmTags": {
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation",
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation\n\ntype: tag",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson",
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"$ref": "#/definitions/OrTagConfigJson",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{or:TagConfigJson[];}"
},
{
"type": "string"
@ -1711,12 +1667,10 @@
"description": "In some cases, the contributor is not allowed to delete the current feature (e.g. because it isn't a point, the point is referenced by a relation or the user isn't experienced enough).\nTo still offer the user a 'delete'-option, the feature is retagged with these tags. This is a soft deletion, as the point isn't actually removed from OSM but rather marked as 'disused'\nIt is important that the feature will be retagged in such a way that it won't be picked up by the layer anymore!\n\nExample (note that \"amenity=\" erases the 'amenity'-key alltogether):\n```\n{\n \"and\": [\"disussed:amenity=public_bookcase\", \"amenity=\"]\n}\n```\n\nor (notice the use of the ':='-tag to copy the old value of 'shop=*' into 'disused:shop='):\n```\n{\n \"and\": [\"disused:shop:={shop}\", \"shop=\"]\n}\n```",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson",
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"$ref": "#/definitions/OrTagConfigJson",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{or:TagConfigJson[];}"
},
{
"type": "string"

View file

@ -29,17 +29,17 @@ export default {
]
},
"source": {
"description": "This determines where the data for the layer is fetched: from OSM or from an external geojson dataset.\n\nIf no 'geojson' is defined, data will be fetched from overpass and the OSM-API.\n\nEvery source _must_ define which tags _must_ be present in order to be picked up.\n\nNote: a source must always be defined. 'special' is only allowed if this is a builtin-layer",
"description": "Question: Where should the data be fetched from?\n\nThis determines where the data for the layer is fetched: from OSM or from an external geojson dataset.\n\nIf no 'geojson' is defined, data will be fetched from overpass and the OSM-API.\n\nEvery source _must_ define which tags _must_ be present in order to be picked up.\n\nNote: a source must always be defined. 'special' is only allowed if this is a builtin-layer\n\ntypes: Load data with specific tags from OpenStreetMap ; Load data from an external geojson source ;\ngroup: basic",
"anyOf": [
{
"type": "object",
"properties": {
"osmTags": {
"$ref": "#/definitions/TagConfigJson",
"description": "Every source must set which tags have to be present in order to load the given layer."
"description": "question: Which tags must be present on the feature to show it in this layer?\nEvery source must set which tags have to be present in order to load the given layer."
},
"maxCacheAge": {
"description": "The maximum amount of seconds that a tile is allowed to linger in the cache",
"description": "question: How long (in seconds) is the data allowed to remain cached until it must be refreshed?\nThe maximum amount of seconds that a tile is allowed to linger in the cache\n\ntype: nat",
"type": "number"
}
},
@ -99,12 +99,10 @@ export default {
"description": "If set, only features matching this extra tag will be shown.\nThis is useful to hide certain features from view.\n\nThe default value is 'yes'\n\ngroup: advanced",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson",
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"$ref": "#/definitions/OrTagConfigJson",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{or:TagConfigJson[];}"
},
{
"type": "string"
@ -116,7 +114,7 @@ export default {
"type": "boolean"
},
"minzoom": {
"description": "The minimum needed zoomlevel required to start loading and displaying the data.\nThis can be used to only show common features (e.g. a bicycle parking) only when the map is zoomed in very much (17).\nThis prevents cluttering the map with thousands of parkings if one is looking to an entire city.\n\nDefault: 0\n\ngroup: basic\nquestion: At what zoom level should features of the layer be shown?\nifunset: Always load this layer, even if the entire world is in view.",
"description": "The minimum needed zoomlevel required to start loading and displaying the data.\nThis can be used to only show common features (e.g. a bicycle parking) only when the map is zoomed in very much (17).\nThis prevents cluttering the map with thousands of parkings if one is looking to an entire city.\n\nDefault: 0\ngroup: basic\ntype: nat\nquestion: At what zoom level should features of the layer be shown?\nifunset: Always load this layer, even if the entire world is in view.",
"type": "number"
},
"shownByDefault": {
@ -239,53 +237,23 @@ export default {
"type": "string"
}
},
"preciseInput": {
"description": "If set, the user will prompted to confirm the location before actually adding the data.\nThis will be with a 'drag crosshair'-method.\n\nIf 'preferredBackgroundCategory' is set, the element will attempt to pick a background layer of that category.",
"snapToLayer": {
"description": "If specified, these layers will be shown to and the new point will be snapped towards it",
"anyOf": [
{
"type": "object",
"properties": {
"preferredBackground": {
"description": "The type of background picture",
"anyOf": [
{
"type": "array",
"items": {
"type": "string"
}
},
{
"type": "string"
}
]
},
"snapToLayer": {
"description": "If specified, these layers will be shown to and the new point will be snapped towards it",
"anyOf": [
{
"type": "array",
"items": {
"type": "string"
}
},
{
"type": "string"
}
]
},
"maxSnapDistance": {
"description": "If specified, a new point will only be snapped if it is within this range.\nDistance in meter\n\nDefault: 10",
"type": "number"
}
"type": "array",
"items": {
"type": "string"
}
},
{
"enum": [
true
],
"type": "boolean"
"type": "string"
}
]
},
"maxSnapDistance": {
"description": "If specified, a new point will only be snapped if it is within this range.\nDistance in meter\n\nDefault: 10",
"type": "number"
}
},
"required": [
@ -445,13 +413,12 @@ export default {
],
"definitions": {
"TagConfigJson": {
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation",
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation\n\ntype: tag",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
"type": "object",
"properties": {
"or": {
@ -470,8 +437,7 @@ export default {
}
]
},
"AndTagConfigJson": {
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
"{and:TagConfigJson[];}": {
"type": "object",
"properties": {
"and": {
@ -485,8 +451,7 @@ export default {
"and"
]
},
"OrTagConfigJson": {
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
"{or:TagConfigJson[];}": {
"type": "object",
"properties": {
"or": {
@ -650,12 +615,10 @@ export default {
"description": "Only show this tagrendering (or ask the question) if the selected object also matches the tags specified as `condition`.\n\nThis is useful to ask a follow-up question.\nFor example, within toilets, asking _where_ the diaper changing table is is only useful _if_ there is one.\nThis can be done by adding `\"condition\": \"changing_table=yes\"`\n\nA full example would be:\n```json\n {\n \"question\": \"Where is the changing table located?\",\n \"render\": \"The changing table is located at {changing_table:location}\",\n \"condition\": \"changing_table=yes\",\n \"freeform\": {\n \"key\": \"changing_table:location\",\n \"inline\": true\n },\n \"mappings\": [\n {\n \"then\": \"The changing table is in the toilet for women.\",\n \"if\": \"changing_table:location=female_toilet\"\n },\n {\n \"then\": \"The changing table is in the toilet for men.\",\n \"if\": \"changing_table:location=male_toilet\"\n },\n {\n \"if\": \"changing_table:location=wheelchair_toilet\",\n \"then\": \"The changing table is in the toilet for wheelchair users.\",\n },\n {\n \"if\": \"changing_table:location=dedicated_room\",\n \"then\": \"The changing table is in a dedicated room. \",\n }\n ],\n \"id\": \"toilet-changing_table:location\"\n },\n```",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson",
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"$ref": "#/definitions/OrTagConfigJson",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{or:TagConfigJson[];}"
},
{
"type": "string"
@ -666,12 +629,10 @@ export default {
"description": "If set, this tag will be evaluated agains the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options.\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson",
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"$ref": "#/definitions/OrTagConfigJson",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{or:TagConfigJson[];}"
},
{
"type": "string"
@ -753,7 +714,7 @@ export default {
"properties": {
"if": {
"$ref": "#/definitions/TagConfigJson",
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation"
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation\n\ntype: tag"
},
"then": {
"description": "Shown if the 'if is fulfilled\nType: rendered",
@ -794,12 +755,10 @@ export default {
"description": "In some cases, multiple taggings exist (e.g. a default assumption, or a commonly mapped abbreviation and a fully written variation).\n\nIn the latter case, a correct text should be shown, but only a single, canonical tagging should be selectable by the user.\nIn this case, one of the mappings can be hiden by setting this flag.\n\nTo demonstrate an example making a default assumption:\n\nmappings: [\n {\n if: \"access=\", -- no access tag present, we assume accessible\n then: \"Accessible to the general public\",\n hideInAnswer: true\n },\n {\n if: \"access=yes\",\n then: \"Accessible to the general public\", -- the user selected this, we add that to OSM\n },\n {\n if: \"access=no\",\n then: \"Not accessible to the public\"\n }\n]\n\n\nFor example, for an operator, we have `operator=Agentschap Natuur en Bos`, which is often abbreviated to `operator=ANB`.\nThen, we would add two mappings:\n{\n if: \"operator=Agentschap Natuur en Bos\" -- the non-abbreviated version which should be uploaded\n then: \"Maintained by Agentschap Natuur en Bos\"\n},\n{\n if: \"operator=ANB\", -- we don't want to upload abbreviations\n then: \"Maintained by Agentschap Natuur en Bos\"\n hideInAnswer: true\n}\n\nHide in answer can also be a tagsfilter, e.g. to make sure an option is only shown when appropriate.\nKeep in mind that this is reverse logic: it will be hidden in the answer if the condition is true, it will thus only show in the case of a mismatch\n\ne.g., for toilets: if \"wheelchair=no\", we know there is no wheelchair dedicated room.\nFor the location of the changing table, the option \"in the wheelchair accessible toilet is weird\", so we write:\n\n{\n \"question\": \"Where is the changing table located?\"\n \"mappings\": [\n {\"if\":\"changing_table:location=female\",\"then\":\"In the female restroom\"},\n {\"if\":\"changing_table:location=male\",\"then\":\"In the male restroom\"},\n {\"if\":\"changing_table:location=wheelchair\",\"then\":\"In the wheelchair accessible restroom\", \"hideInAnswer\": \"wheelchair=no\"},\n\n ]\n}\n\nAlso have a look for the meta-tags\n{\n if: \"operator=Agentschap Natuur en Bos\",\n then: \"Maintained by Agentschap Natuur en Bos\",\n hideInAnswer: \"_country!=be\"\n}",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson",
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"$ref": "#/definitions/OrTagConfigJson",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{or:TagConfigJson[];}"
},
{
"type": [
@ -813,12 +772,10 @@ export default {
"description": "Only applicable if 'multiAnswer' is set.\nThis is for situations such as:\n`accepts:coins=no` where one can select all the possible payment methods. However, we want to make explicit that some options _were not_ selected.\nThis can be done with `ifnot`\nNote that we can not explicitly render this negative case to the user, we cannot show `does _not_ accept coins`.\nIf this is important to your usecase, consider using multiple radiobutton-fields without `multiAnswer`",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson",
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"$ref": "#/definitions/OrTagConfigJson",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{or:TagConfigJson[];}"
},
{
"type": "string"
@ -840,12 +797,10 @@ export default {
"description": "If the searchable selector is picked, mappings with this item will have priority and show up even if the others are hidden\nUse this sparingly",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson",
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"$ref": "#/definitions/OrTagConfigJson",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{or:TagConfigJson[];}"
},
{
"type": "string"
@ -895,7 +850,7 @@ export default {
"properties": {
"if": {
"$ref": "#/definitions/TagConfigJson",
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation"
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation\n\ntype: tag"
},
"then": {
"description": "Badge to show\nType: icon",
@ -926,6 +881,17 @@ export default {
}
]
},
"anchor": {
"description": "question: What is the anchorpoint of the icon?\n\nThis matches the geographical point with a location on the icon.\nFor example, a feature attached to the ground can use 'bottom' as zooming in will give the appearance of being anchored to a fixed location.",
"anyOf": [
{
"$ref": "#/definitions/TagRenderingConfigJson"
},
{
"type": "string"
}
]
},
"rotation": {
"description": "The rotation of an icon, useful for e.g. directions.\nUsage: as if it were a css property for 'rotate', thus has to end with 'deg', e.g. `90deg`, `{direction}deg`, `calc(90deg - {camera:direction}deg)``",
"anyOf": [
@ -1309,12 +1275,10 @@ export default {
"description": "Only show this tagrendering (or ask the question) if the selected object also matches the tags specified as `condition`.\n\nThis is useful to ask a follow-up question.\nFor example, within toilets, asking _where_ the diaper changing table is is only useful _if_ there is one.\nThis can be done by adding `\"condition\": \"changing_table=yes\"`\n\nA full example would be:\n```json\n {\n \"question\": \"Where is the changing table located?\",\n \"render\": \"The changing table is located at {changing_table:location}\",\n \"condition\": \"changing_table=yes\",\n \"freeform\": {\n \"key\": \"changing_table:location\",\n \"inline\": true\n },\n \"mappings\": [\n {\n \"then\": \"The changing table is in the toilet for women.\",\n \"if\": \"changing_table:location=female_toilet\"\n },\n {\n \"then\": \"The changing table is in the toilet for men.\",\n \"if\": \"changing_table:location=male_toilet\"\n },\n {\n \"if\": \"changing_table:location=wheelchair_toilet\",\n \"then\": \"The changing table is in the toilet for wheelchair users.\",\n },\n {\n \"if\": \"changing_table:location=dedicated_room\",\n \"then\": \"The changing table is in a dedicated room. \",\n }\n ],\n \"id\": \"toilet-changing_table:location\"\n },\n```",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson",
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"$ref": "#/definitions/OrTagConfigJson",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{or:TagConfigJson[];}"
},
{
"type": "string"
@ -1325,12 +1289,10 @@ export default {
"description": "If set, this tag will be evaluated agains the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options.\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson",
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"$ref": "#/definitions/OrTagConfigJson",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{or:TagConfigJson[];}"
},
{
"type": "string"
@ -1491,12 +1453,10 @@ export default {
"description": "Only show this tagrendering (or ask the question) if the selected object also matches the tags specified as `condition`.\n\nThis is useful to ask a follow-up question.\nFor example, within toilets, asking _where_ the diaper changing table is is only useful _if_ there is one.\nThis can be done by adding `\"condition\": \"changing_table=yes\"`\n\nA full example would be:\n```json\n {\n \"question\": \"Where is the changing table located?\",\n \"render\": \"The changing table is located at {changing_table:location}\",\n \"condition\": \"changing_table=yes\",\n \"freeform\": {\n \"key\": \"changing_table:location\",\n \"inline\": true\n },\n \"mappings\": [\n {\n \"then\": \"The changing table is in the toilet for women.\",\n \"if\": \"changing_table:location=female_toilet\"\n },\n {\n \"then\": \"The changing table is in the toilet for men.\",\n \"if\": \"changing_table:location=male_toilet\"\n },\n {\n \"if\": \"changing_table:location=wheelchair_toilet\",\n \"then\": \"The changing table is in the toilet for wheelchair users.\",\n },\n {\n \"if\": \"changing_table:location=dedicated_room\",\n \"then\": \"The changing table is in a dedicated room. \",\n }\n ],\n \"id\": \"toilet-changing_table:location\"\n },\n```",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson",
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"$ref": "#/definitions/OrTagConfigJson",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{or:TagConfigJson[];}"
},
{
"type": "string"
@ -1507,12 +1467,10 @@ export default {
"description": "If set, this tag will be evaluated agains the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options.\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson",
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"$ref": "#/definitions/OrTagConfigJson",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{or:TagConfigJson[];}"
},
{
"type": "string"
@ -1596,15 +1554,13 @@ export default {
"properties": {
"question": {},
"osmTags": {
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation",
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation\n\ntype: tag",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson",
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"$ref": "#/definitions/OrTagConfigJson",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{or:TagConfigJson[];}"
},
{
"type": "string"
@ -1695,12 +1651,10 @@ export default {
"description": "In some cases, the contributor is not allowed to delete the current feature (e.g. because it isn't a point, the point is referenced by a relation or the user isn't experienced enough).\nTo still offer the user a 'delete'-option, the feature is retagged with these tags. This is a soft deletion, as the point isn't actually removed from OSM but rather marked as 'disused'\nIt is important that the feature will be retagged in such a way that it won't be picked up by the layer anymore!\n\nExample (note that \"amenity=\" erases the 'amenity'-key alltogether):\n```\n{\n \"and\": [\"disussed:amenity=public_bookcase\", \"amenity=\"]\n}\n```\n\nor (notice the use of the ':='-tag to copy the old value of 'shop=*' into 'disused:shop='):\n```\n{\n \"and\": [\"disused:shop:={shop}\", \"shop=\"]\n}\n```",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson",
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"$ref": "#/definitions/OrTagConfigJson",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{or:TagConfigJson[];}"
},
{
"type": "string"

View file

@ -306,13 +306,12 @@
],
"definitions": {
"TagConfigJson": {
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation",
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation\n\ntype: tag",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
"type": "object",
"properties": {
"or": {
@ -331,8 +330,7 @@
}
]
},
"AndTagConfigJson": {
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
"{and:TagConfigJson[];}": {
"type": "object",
"properties": {
"and": {
@ -347,8 +345,7 @@
],
"additionalProperties": false
},
"OrTagConfigJson": {
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
"{or:TagConfigJson[];}": {
"type": "object",
"properties": {
"or": {
@ -516,12 +513,10 @@
"description": "Only show this tagrendering (or ask the question) if the selected object also matches the tags specified as `condition`.\n\nThis is useful to ask a follow-up question.\nFor example, within toilets, asking _where_ the diaper changing table is is only useful _if_ there is one.\nThis can be done by adding `\"condition\": \"changing_table=yes\"`\n\nA full example would be:\n```json\n {\n \"question\": \"Where is the changing table located?\",\n \"render\": \"The changing table is located at {changing_table:location}\",\n \"condition\": \"changing_table=yes\",\n \"freeform\": {\n \"key\": \"changing_table:location\",\n \"inline\": true\n },\n \"mappings\": [\n {\n \"then\": \"The changing table is in the toilet for women.\",\n \"if\": \"changing_table:location=female_toilet\"\n },\n {\n \"then\": \"The changing table is in the toilet for men.\",\n \"if\": \"changing_table:location=male_toilet\"\n },\n {\n \"if\": \"changing_table:location=wheelchair_toilet\",\n \"then\": \"The changing table is in the toilet for wheelchair users.\",\n },\n {\n \"if\": \"changing_table:location=dedicated_room\",\n \"then\": \"The changing table is in a dedicated room. \",\n }\n ],\n \"id\": \"toilet-changing_table:location\"\n },\n```",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson",
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"$ref": "#/definitions/OrTagConfigJson",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{or:TagConfigJson[];}"
},
{
"type": "string"
@ -532,12 +527,10 @@
"description": "If set, this tag will be evaluated agains the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options.\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson",
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"$ref": "#/definitions/OrTagConfigJson",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{or:TagConfigJson[];}"
},
{
"type": "string"
@ -621,7 +614,7 @@
"properties": {
"if": {
"$ref": "#/definitions/TagConfigJson",
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation"
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation\n\ntype: tag"
},
"then": {
"description": "Shown if the 'if is fulfilled\nType: rendered",
@ -662,12 +655,10 @@
"description": "In some cases, multiple taggings exist (e.g. a default assumption, or a commonly mapped abbreviation and a fully written variation).\n\nIn the latter case, a correct text should be shown, but only a single, canonical tagging should be selectable by the user.\nIn this case, one of the mappings can be hiden by setting this flag.\n\nTo demonstrate an example making a default assumption:\n\nmappings: [\n {\n if: \"access=\", -- no access tag present, we assume accessible\n then: \"Accessible to the general public\",\n hideInAnswer: true\n },\n {\n if: \"access=yes\",\n then: \"Accessible to the general public\", -- the user selected this, we add that to OSM\n },\n {\n if: \"access=no\",\n then: \"Not accessible to the public\"\n }\n]\n\n\nFor example, for an operator, we have `operator=Agentschap Natuur en Bos`, which is often abbreviated to `operator=ANB`.\nThen, we would add two mappings:\n{\n if: \"operator=Agentschap Natuur en Bos\" -- the non-abbreviated version which should be uploaded\n then: \"Maintained by Agentschap Natuur en Bos\"\n},\n{\n if: \"operator=ANB\", -- we don't want to upload abbreviations\n then: \"Maintained by Agentschap Natuur en Bos\"\n hideInAnswer: true\n}\n\nHide in answer can also be a tagsfilter, e.g. to make sure an option is only shown when appropriate.\nKeep in mind that this is reverse logic: it will be hidden in the answer if the condition is true, it will thus only show in the case of a mismatch\n\ne.g., for toilets: if \"wheelchair=no\", we know there is no wheelchair dedicated room.\nFor the location of the changing table, the option \"in the wheelchair accessible toilet is weird\", so we write:\n\n{\n \"question\": \"Where is the changing table located?\"\n \"mappings\": [\n {\"if\":\"changing_table:location=female\",\"then\":\"In the female restroom\"},\n {\"if\":\"changing_table:location=male\",\"then\":\"In the male restroom\"},\n {\"if\":\"changing_table:location=wheelchair\",\"then\":\"In the wheelchair accessible restroom\", \"hideInAnswer\": \"wheelchair=no\"},\n\n ]\n}\n\nAlso have a look for the meta-tags\n{\n if: \"operator=Agentschap Natuur en Bos\",\n then: \"Maintained by Agentschap Natuur en Bos\",\n hideInAnswer: \"_country!=be\"\n}",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson",
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"$ref": "#/definitions/OrTagConfigJson",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{or:TagConfigJson[];}"
},
{
"type": [
@ -681,12 +672,10 @@
"description": "Only applicable if 'multiAnswer' is set.\nThis is for situations such as:\n`accepts:coins=no` where one can select all the possible payment methods. However, we want to make explicit that some options _were not_ selected.\nThis can be done with `ifnot`\nNote that we can not explicitly render this negative case to the user, we cannot show `does _not_ accept coins`.\nIf this is important to your usecase, consider using multiple radiobutton-fields without `multiAnswer`",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson",
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"$ref": "#/definitions/OrTagConfigJson",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{or:TagConfigJson[];}"
},
{
"type": "string"
@ -708,12 +697,10 @@
"description": "If the searchable selector is picked, mappings with this item will have priority and show up even if the others are hidden\nUse this sparingly",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson",
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"$ref": "#/definitions/OrTagConfigJson",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{or:TagConfigJson[];}"
},
{
"type": "string"
@ -765,7 +752,7 @@
"properties": {
"if": {
"$ref": "#/definitions/TagConfigJson",
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation"
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation\n\ntype: tag"
},
"then": {
"description": "Badge to show\nType: icon",
@ -796,6 +783,17 @@
}
]
},
"anchor": {
"description": "question: What is the anchorpoint of the icon?\n\nThis matches the geographical point with a location on the icon.\nFor example, a feature attached to the ground can use 'bottom' as zooming in will give the appearance of being anchored to a fixed location.",
"anyOf": [
{
"$ref": "#/definitions/TagRenderingConfigJson"
},
{
"type": "string"
}
]
},
"rotation": {
"description": "The rotation of an icon, useful for e.g. directions.\nUsage: as if it were a css property for 'rotate', thus has to end with 'deg', e.g. `90deg`, `{direction}deg`, `calc(90deg - {camera:direction}deg)``",
"anyOf": [
@ -1182,12 +1180,10 @@
"description": "Only show this tagrendering (or ask the question) if the selected object also matches the tags specified as `condition`.\n\nThis is useful to ask a follow-up question.\nFor example, within toilets, asking _where_ the diaper changing table is is only useful _if_ there is one.\nThis can be done by adding `\"condition\": \"changing_table=yes\"`\n\nA full example would be:\n```json\n {\n \"question\": \"Where is the changing table located?\",\n \"render\": \"The changing table is located at {changing_table:location}\",\n \"condition\": \"changing_table=yes\",\n \"freeform\": {\n \"key\": \"changing_table:location\",\n \"inline\": true\n },\n \"mappings\": [\n {\n \"then\": \"The changing table is in the toilet for women.\",\n \"if\": \"changing_table:location=female_toilet\"\n },\n {\n \"then\": \"The changing table is in the toilet for men.\",\n \"if\": \"changing_table:location=male_toilet\"\n },\n {\n \"if\": \"changing_table:location=wheelchair_toilet\",\n \"then\": \"The changing table is in the toilet for wheelchair users.\",\n },\n {\n \"if\": \"changing_table:location=dedicated_room\",\n \"then\": \"The changing table is in a dedicated room. \",\n }\n ],\n \"id\": \"toilet-changing_table:location\"\n },\n```",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson",
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"$ref": "#/definitions/OrTagConfigJson",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{or:TagConfigJson[];}"
},
{
"type": "string"
@ -1198,12 +1194,10 @@
"description": "If set, this tag will be evaluated agains the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options.\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson",
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"$ref": "#/definitions/OrTagConfigJson",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{or:TagConfigJson[];}"
},
{
"type": "string"
@ -1365,12 +1359,10 @@
"description": "Only show this tagrendering (or ask the question) if the selected object also matches the tags specified as `condition`.\n\nThis is useful to ask a follow-up question.\nFor example, within toilets, asking _where_ the diaper changing table is is only useful _if_ there is one.\nThis can be done by adding `\"condition\": \"changing_table=yes\"`\n\nA full example would be:\n```json\n {\n \"question\": \"Where is the changing table located?\",\n \"render\": \"The changing table is located at {changing_table:location}\",\n \"condition\": \"changing_table=yes\",\n \"freeform\": {\n \"key\": \"changing_table:location\",\n \"inline\": true\n },\n \"mappings\": [\n {\n \"then\": \"The changing table is in the toilet for women.\",\n \"if\": \"changing_table:location=female_toilet\"\n },\n {\n \"then\": \"The changing table is in the toilet for men.\",\n \"if\": \"changing_table:location=male_toilet\"\n },\n {\n \"if\": \"changing_table:location=wheelchair_toilet\",\n \"then\": \"The changing table is in the toilet for wheelchair users.\",\n },\n {\n \"if\": \"changing_table:location=dedicated_room\",\n \"then\": \"The changing table is in a dedicated room. \",\n }\n ],\n \"id\": \"toilet-changing_table:location\"\n },\n```",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson",
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"$ref": "#/definitions/OrTagConfigJson",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{or:TagConfigJson[];}"
},
{
"type": "string"
@ -1381,12 +1373,10 @@
"description": "If set, this tag will be evaluated agains the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options.\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson",
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"$ref": "#/definitions/OrTagConfigJson",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{or:TagConfigJson[];}"
},
{
"type": "string"
@ -1472,15 +1462,13 @@
"properties": {
"question": {},
"osmTags": {
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation",
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation\n\ntype: tag",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson",
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"$ref": "#/definitions/OrTagConfigJson",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{or:TagConfigJson[];}"
},
{
"type": "string"
@ -1572,12 +1560,10 @@
"description": "In some cases, the contributor is not allowed to delete the current feature (e.g. because it isn't a point, the point is referenced by a relation or the user isn't experienced enough).\nTo still offer the user a 'delete'-option, the feature is retagged with these tags. This is a soft deletion, as the point isn't actually removed from OSM but rather marked as 'disused'\nIt is important that the feature will be retagged in such a way that it won't be picked up by the layer anymore!\n\nExample (note that \"amenity=\" erases the 'amenity'-key alltogether):\n```\n{\n \"and\": [\"disussed:amenity=public_bookcase\", \"amenity=\"]\n}\n```\n\nor (notice the use of the ':='-tag to copy the old value of 'shop=*' into 'disused:shop='):\n```\n{\n \"and\": [\"disused:shop:={shop}\", \"shop=\"]\n}\n```",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson",
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"$ref": "#/definitions/OrTagConfigJson",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{or:TagConfigJson[];}"
},
{
"type": "string"
@ -1740,17 +1726,17 @@
]
},
"source": {
"description": "This determines where the data for the layer is fetched: from OSM or from an external geojson dataset.\n\nIf no 'geojson' is defined, data will be fetched from overpass and the OSM-API.\n\nEvery source _must_ define which tags _must_ be present in order to be picked up.\n\nNote: a source must always be defined. 'special' is only allowed if this is a builtin-layer",
"description": "Question: Where should the data be fetched from?\n\nThis determines where the data for the layer is fetched: from OSM or from an external geojson dataset.\n\nIf no 'geojson' is defined, data will be fetched from overpass and the OSM-API.\n\nEvery source _must_ define which tags _must_ be present in order to be picked up.\n\nNote: a source must always be defined. 'special' is only allowed if this is a builtin-layer\n\ntypes: Load data with specific tags from OpenStreetMap ; Load data from an external geojson source ;\ngroup: basic",
"anyOf": [
{
"type": "object",
"properties": {
"osmTags": {
"$ref": "#/definitions/TagConfigJson",
"description": "Every source must set which tags have to be present in order to load the given layer."
"description": "question: Which tags must be present on the feature to show it in this layer?\nEvery source must set which tags have to be present in order to load the given layer."
},
"maxCacheAge": {
"description": "The maximum amount of seconds that a tile is allowed to linger in the cache",
"description": "question: How long (in seconds) is the data allowed to remain cached until it must be refreshed?\nThe maximum amount of seconds that a tile is allowed to linger in the cache\n\ntype: nat",
"type": "number"
}
},
@ -1810,12 +1796,10 @@
"description": "If set, only features matching this extra tag will be shown.\nThis is useful to hide certain features from view.\n\nThe default value is 'yes'\n\ngroup: advanced",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson",
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"$ref": "#/definitions/OrTagConfigJson",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{or:TagConfigJson[];}"
},
{
"type": "string"
@ -1827,7 +1811,7 @@
"type": "boolean"
},
"minzoom": {
"description": "The minimum needed zoomlevel required to start loading and displaying the data.\nThis can be used to only show common features (e.g. a bicycle parking) only when the map is zoomed in very much (17).\nThis prevents cluttering the map with thousands of parkings if one is looking to an entire city.\n\nDefault: 0\n\ngroup: basic\nquestion: At what zoom level should features of the layer be shown?\nifunset: Always load this layer, even if the entire world is in view.",
"description": "The minimum needed zoomlevel required to start loading and displaying the data.\nThis can be used to only show common features (e.g. a bicycle parking) only when the map is zoomed in very much (17).\nThis prevents cluttering the map with thousands of parkings if one is looking to an entire city.\n\nDefault: 0\ngroup: basic\ntype: nat\nquestion: At what zoom level should features of the layer be shown?\nifunset: Always load this layer, even if the entire world is in view.",
"type": "number"
},
"shownByDefault": {
@ -1950,53 +1934,23 @@
"type": "string"
}
},
"preciseInput": {
"description": "If set, the user will prompted to confirm the location before actually adding the data.\nThis will be with a 'drag crosshair'-method.\n\nIf 'preferredBackgroundCategory' is set, the element will attempt to pick a background layer of that category.",
"snapToLayer": {
"description": "If specified, these layers will be shown to and the new point will be snapped towards it",
"anyOf": [
{
"type": "object",
"properties": {
"preferredBackground": {
"description": "The type of background picture",
"anyOf": [
{
"type": "array",
"items": {
"type": "string"
}
},
{
"type": "string"
}
]
},
"snapToLayer": {
"description": "If specified, these layers will be shown to and the new point will be snapped towards it",
"anyOf": [
{
"type": "array",
"items": {
"type": "string"
}
},
{
"type": "string"
}
]
},
"maxSnapDistance": {
"description": "If specified, a new point will only be snapped if it is within this range.\nDistance in meter\n\nDefault: 10",
"type": "number"
}
"type": "array",
"items": {
"type": "string"
}
},
{
"enum": [
true
],
"type": "boolean"
"type": "string"
}
]
},
"maxSnapDistance": {
"description": "If specified, a new point will only be snapped if it is within this range.\nDistance in meter\n\nDefault: 10",
"type": "number"
}
},
"required": [
@ -2186,17 +2140,17 @@
]
},
"source": {
"description": "This determines where the data for the layer is fetched: from OSM or from an external geojson dataset.\n\nIf no 'geojson' is defined, data will be fetched from overpass and the OSM-API.\n\nEvery source _must_ define which tags _must_ be present in order to be picked up.\n\nNote: a source must always be defined. 'special' is only allowed if this is a builtin-layer",
"description": "Question: Where should the data be fetched from?\n\nThis determines where the data for the layer is fetched: from OSM or from an external geojson dataset.\n\nIf no 'geojson' is defined, data will be fetched from overpass and the OSM-API.\n\nEvery source _must_ define which tags _must_ be present in order to be picked up.\n\nNote: a source must always be defined. 'special' is only allowed if this is a builtin-layer\n\ntypes: Load data with specific tags from OpenStreetMap ; Load data from an external geojson source ;\ngroup: basic",
"anyOf": [
{
"type": "object",
"properties": {
"osmTags": {
"$ref": "#/definitions/TagConfigJson",
"description": "Every source must set which tags have to be present in order to load the given layer."
"description": "question: Which tags must be present on the feature to show it in this layer?\nEvery source must set which tags have to be present in order to load the given layer."
},
"maxCacheAge": {
"description": "The maximum amount of seconds that a tile is allowed to linger in the cache",
"description": "question: How long (in seconds) is the data allowed to remain cached until it must be refreshed?\nThe maximum amount of seconds that a tile is allowed to linger in the cache\n\ntype: nat",
"type": "number"
}
},
@ -2256,12 +2210,10 @@
"description": "If set, only features matching this extra tag will be shown.\nThis is useful to hide certain features from view.\n\nThe default value is 'yes'\n\ngroup: advanced",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson",
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"$ref": "#/definitions/OrTagConfigJson",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{or:TagConfigJson[];}"
},
{
"type": "string"
@ -2273,7 +2225,7 @@
"type": "boolean"
},
"minzoom": {
"description": "The minimum needed zoomlevel required to start loading and displaying the data.\nThis can be used to only show common features (e.g. a bicycle parking) only when the map is zoomed in very much (17).\nThis prevents cluttering the map with thousands of parkings if one is looking to an entire city.\n\nDefault: 0\n\ngroup: basic\nquestion: At what zoom level should features of the layer be shown?\nifunset: Always load this layer, even if the entire world is in view.",
"description": "The minimum needed zoomlevel required to start loading and displaying the data.\nThis can be used to only show common features (e.g. a bicycle parking) only when the map is zoomed in very much (17).\nThis prevents cluttering the map with thousands of parkings if one is looking to an entire city.\n\nDefault: 0\ngroup: basic\ntype: nat\nquestion: At what zoom level should features of the layer be shown?\nifunset: Always load this layer, even if the entire world is in view.",
"type": "number"
},
"shownByDefault": {
@ -2396,53 +2348,23 @@
"type": "string"
}
},
"preciseInput": {
"description": "If set, the user will prompted to confirm the location before actually adding the data.\nThis will be with a 'drag crosshair'-method.\n\nIf 'preferredBackgroundCategory' is set, the element will attempt to pick a background layer of that category.",
"snapToLayer": {
"description": "If specified, these layers will be shown to and the new point will be snapped towards it",
"anyOf": [
{
"type": "object",
"properties": {
"preferredBackground": {
"description": "The type of background picture",
"anyOf": [
{
"type": "array",
"items": {
"type": "string"
}
},
{
"type": "string"
}
]
},
"snapToLayer": {
"description": "If specified, these layers will be shown to and the new point will be snapped towards it",
"anyOf": [
{
"type": "array",
"items": {
"type": "string"
}
},
{
"type": "string"
}
]
},
"maxSnapDistance": {
"description": "If specified, a new point will only be snapped if it is within this range.\nDistance in meter\n\nDefault: 10",
"type": "number"
}
"type": "array",
"items": {
"type": "string"
}
},
{
"enum": [
true
],
"type": "boolean"
"type": "string"
}
]
},
"maxSnapDistance": {
"description": "If specified, a new point will only be snapped if it is within this range.\nDistance in meter\n\nDefault: 10",
"type": "number"
}
},
"required": [

View file

@ -306,13 +306,12 @@ export default {
],
"definitions": {
"TagConfigJson": {
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation",
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation\n\ntype: tag",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
"type": "object",
"properties": {
"or": {
@ -331,8 +330,7 @@ export default {
}
]
},
"AndTagConfigJson": {
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
"{and:TagConfigJson[];}": {
"type": "object",
"properties": {
"and": {
@ -346,8 +344,7 @@ export default {
"and"
]
},
"OrTagConfigJson": {
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
"{or:TagConfigJson[];}": {
"type": "object",
"properties": {
"or": {
@ -511,12 +508,10 @@ export default {
"description": "Only show this tagrendering (or ask the question) if the selected object also matches the tags specified as `condition`.\n\nThis is useful to ask a follow-up question.\nFor example, within toilets, asking _where_ the diaper changing table is is only useful _if_ there is one.\nThis can be done by adding `\"condition\": \"changing_table=yes\"`\n\nA full example would be:\n```json\n {\n \"question\": \"Where is the changing table located?\",\n \"render\": \"The changing table is located at {changing_table:location}\",\n \"condition\": \"changing_table=yes\",\n \"freeform\": {\n \"key\": \"changing_table:location\",\n \"inline\": true\n },\n \"mappings\": [\n {\n \"then\": \"The changing table is in the toilet for women.\",\n \"if\": \"changing_table:location=female_toilet\"\n },\n {\n \"then\": \"The changing table is in the toilet for men.\",\n \"if\": \"changing_table:location=male_toilet\"\n },\n {\n \"if\": \"changing_table:location=wheelchair_toilet\",\n \"then\": \"The changing table is in the toilet for wheelchair users.\",\n },\n {\n \"if\": \"changing_table:location=dedicated_room\",\n \"then\": \"The changing table is in a dedicated room. \",\n }\n ],\n \"id\": \"toilet-changing_table:location\"\n },\n```",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson",
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"$ref": "#/definitions/OrTagConfigJson",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{or:TagConfigJson[];}"
},
{
"type": "string"
@ -527,12 +522,10 @@ export default {
"description": "If set, this tag will be evaluated agains the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options.\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson",
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"$ref": "#/definitions/OrTagConfigJson",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{or:TagConfigJson[];}"
},
{
"type": "string"
@ -614,7 +607,7 @@ export default {
"properties": {
"if": {
"$ref": "#/definitions/TagConfigJson",
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation"
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation\n\ntype: tag"
},
"then": {
"description": "Shown if the 'if is fulfilled\nType: rendered",
@ -655,12 +648,10 @@ export default {
"description": "In some cases, multiple taggings exist (e.g. a default assumption, or a commonly mapped abbreviation and a fully written variation).\n\nIn the latter case, a correct text should be shown, but only a single, canonical tagging should be selectable by the user.\nIn this case, one of the mappings can be hiden by setting this flag.\n\nTo demonstrate an example making a default assumption:\n\nmappings: [\n {\n if: \"access=\", -- no access tag present, we assume accessible\n then: \"Accessible to the general public\",\n hideInAnswer: true\n },\n {\n if: \"access=yes\",\n then: \"Accessible to the general public\", -- the user selected this, we add that to OSM\n },\n {\n if: \"access=no\",\n then: \"Not accessible to the public\"\n }\n]\n\n\nFor example, for an operator, we have `operator=Agentschap Natuur en Bos`, which is often abbreviated to `operator=ANB`.\nThen, we would add two mappings:\n{\n if: \"operator=Agentschap Natuur en Bos\" -- the non-abbreviated version which should be uploaded\n then: \"Maintained by Agentschap Natuur en Bos\"\n},\n{\n if: \"operator=ANB\", -- we don't want to upload abbreviations\n then: \"Maintained by Agentschap Natuur en Bos\"\n hideInAnswer: true\n}\n\nHide in answer can also be a tagsfilter, e.g. to make sure an option is only shown when appropriate.\nKeep in mind that this is reverse logic: it will be hidden in the answer if the condition is true, it will thus only show in the case of a mismatch\n\ne.g., for toilets: if \"wheelchair=no\", we know there is no wheelchair dedicated room.\nFor the location of the changing table, the option \"in the wheelchair accessible toilet is weird\", so we write:\n\n{\n \"question\": \"Where is the changing table located?\"\n \"mappings\": [\n {\"if\":\"changing_table:location=female\",\"then\":\"In the female restroom\"},\n {\"if\":\"changing_table:location=male\",\"then\":\"In the male restroom\"},\n {\"if\":\"changing_table:location=wheelchair\",\"then\":\"In the wheelchair accessible restroom\", \"hideInAnswer\": \"wheelchair=no\"},\n\n ]\n}\n\nAlso have a look for the meta-tags\n{\n if: \"operator=Agentschap Natuur en Bos\",\n then: \"Maintained by Agentschap Natuur en Bos\",\n hideInAnswer: \"_country!=be\"\n}",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson",
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"$ref": "#/definitions/OrTagConfigJson",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{or:TagConfigJson[];}"
},
{
"type": [
@ -674,12 +665,10 @@ export default {
"description": "Only applicable if 'multiAnswer' is set.\nThis is for situations such as:\n`accepts:coins=no` where one can select all the possible payment methods. However, we want to make explicit that some options _were not_ selected.\nThis can be done with `ifnot`\nNote that we can not explicitly render this negative case to the user, we cannot show `does _not_ accept coins`.\nIf this is important to your usecase, consider using multiple radiobutton-fields without `multiAnswer`",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson",
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"$ref": "#/definitions/OrTagConfigJson",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{or:TagConfigJson[];}"
},
{
"type": "string"
@ -701,12 +690,10 @@ export default {
"description": "If the searchable selector is picked, mappings with this item will have priority and show up even if the others are hidden\nUse this sparingly",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson",
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"$ref": "#/definitions/OrTagConfigJson",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{or:TagConfigJson[];}"
},
{
"type": "string"
@ -756,7 +743,7 @@ export default {
"properties": {
"if": {
"$ref": "#/definitions/TagConfigJson",
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation"
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation\n\ntype: tag"
},
"then": {
"description": "Badge to show\nType: icon",
@ -787,6 +774,17 @@ export default {
}
]
},
"anchor": {
"description": "question: What is the anchorpoint of the icon?\n\nThis matches the geographical point with a location on the icon.\nFor example, a feature attached to the ground can use 'bottom' as zooming in will give the appearance of being anchored to a fixed location.",
"anyOf": [
{
"$ref": "#/definitions/TagRenderingConfigJson"
},
{
"type": "string"
}
]
},
"rotation": {
"description": "The rotation of an icon, useful for e.g. directions.\nUsage: as if it were a css property for 'rotate', thus has to end with 'deg', e.g. `90deg`, `{direction}deg`, `calc(90deg - {camera:direction}deg)``",
"anyOf": [
@ -1170,12 +1168,10 @@ export default {
"description": "Only show this tagrendering (or ask the question) if the selected object also matches the tags specified as `condition`.\n\nThis is useful to ask a follow-up question.\nFor example, within toilets, asking _where_ the diaper changing table is is only useful _if_ there is one.\nThis can be done by adding `\"condition\": \"changing_table=yes\"`\n\nA full example would be:\n```json\n {\n \"question\": \"Where is the changing table located?\",\n \"render\": \"The changing table is located at {changing_table:location}\",\n \"condition\": \"changing_table=yes\",\n \"freeform\": {\n \"key\": \"changing_table:location\",\n \"inline\": true\n },\n \"mappings\": [\n {\n \"then\": \"The changing table is in the toilet for women.\",\n \"if\": \"changing_table:location=female_toilet\"\n },\n {\n \"then\": \"The changing table is in the toilet for men.\",\n \"if\": \"changing_table:location=male_toilet\"\n },\n {\n \"if\": \"changing_table:location=wheelchair_toilet\",\n \"then\": \"The changing table is in the toilet for wheelchair users.\",\n },\n {\n \"if\": \"changing_table:location=dedicated_room\",\n \"then\": \"The changing table is in a dedicated room. \",\n }\n ],\n \"id\": \"toilet-changing_table:location\"\n },\n```",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson",
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"$ref": "#/definitions/OrTagConfigJson",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{or:TagConfigJson[];}"
},
{
"type": "string"
@ -1186,12 +1182,10 @@ export default {
"description": "If set, this tag will be evaluated agains the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options.\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson",
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"$ref": "#/definitions/OrTagConfigJson",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{or:TagConfigJson[];}"
},
{
"type": "string"
@ -1352,12 +1346,10 @@ export default {
"description": "Only show this tagrendering (or ask the question) if the selected object also matches the tags specified as `condition`.\n\nThis is useful to ask a follow-up question.\nFor example, within toilets, asking _where_ the diaper changing table is is only useful _if_ there is one.\nThis can be done by adding `\"condition\": \"changing_table=yes\"`\n\nA full example would be:\n```json\n {\n \"question\": \"Where is the changing table located?\",\n \"render\": \"The changing table is located at {changing_table:location}\",\n \"condition\": \"changing_table=yes\",\n \"freeform\": {\n \"key\": \"changing_table:location\",\n \"inline\": true\n },\n \"mappings\": [\n {\n \"then\": \"The changing table is in the toilet for women.\",\n \"if\": \"changing_table:location=female_toilet\"\n },\n {\n \"then\": \"The changing table is in the toilet for men.\",\n \"if\": \"changing_table:location=male_toilet\"\n },\n {\n \"if\": \"changing_table:location=wheelchair_toilet\",\n \"then\": \"The changing table is in the toilet for wheelchair users.\",\n },\n {\n \"if\": \"changing_table:location=dedicated_room\",\n \"then\": \"The changing table is in a dedicated room. \",\n }\n ],\n \"id\": \"toilet-changing_table:location\"\n },\n```",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson",
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"$ref": "#/definitions/OrTagConfigJson",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{or:TagConfigJson[];}"
},
{
"type": "string"
@ -1368,12 +1360,10 @@ export default {
"description": "If set, this tag will be evaluated agains the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options.\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson",
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"$ref": "#/definitions/OrTagConfigJson",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{or:TagConfigJson[];}"
},
{
"type": "string"
@ -1457,15 +1447,13 @@ export default {
"properties": {
"question": {},
"osmTags": {
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation",
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation\n\ntype: tag",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson",
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"$ref": "#/definitions/OrTagConfigJson",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{or:TagConfigJson[];}"
},
{
"type": "string"
@ -1556,12 +1544,10 @@ export default {
"description": "In some cases, the contributor is not allowed to delete the current feature (e.g. because it isn't a point, the point is referenced by a relation or the user isn't experienced enough).\nTo still offer the user a 'delete'-option, the feature is retagged with these tags. This is a soft deletion, as the point isn't actually removed from OSM but rather marked as 'disused'\nIt is important that the feature will be retagged in such a way that it won't be picked up by the layer anymore!\n\nExample (note that \"amenity=\" erases the 'amenity'-key alltogether):\n```\n{\n \"and\": [\"disussed:amenity=public_bookcase\", \"amenity=\"]\n}\n```\n\nor (notice the use of the ':='-tag to copy the old value of 'shop=*' into 'disused:shop='):\n```\n{\n \"and\": [\"disused:shop:={shop}\", \"shop=\"]\n}\n```",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson",
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"$ref": "#/definitions/OrTagConfigJson",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{or:TagConfigJson[];}"
},
{
"type": "string"
@ -1719,17 +1705,17 @@ export default {
]
},
"source": {
"description": "This determines where the data for the layer is fetched: from OSM or from an external geojson dataset.\n\nIf no 'geojson' is defined, data will be fetched from overpass and the OSM-API.\n\nEvery source _must_ define which tags _must_ be present in order to be picked up.\n\nNote: a source must always be defined. 'special' is only allowed if this is a builtin-layer",
"description": "Question: Where should the data be fetched from?\n\nThis determines where the data for the layer is fetched: from OSM or from an external geojson dataset.\n\nIf no 'geojson' is defined, data will be fetched from overpass and the OSM-API.\n\nEvery source _must_ define which tags _must_ be present in order to be picked up.\n\nNote: a source must always be defined. 'special' is only allowed if this is a builtin-layer\n\ntypes: Load data with specific tags from OpenStreetMap ; Load data from an external geojson source ;\ngroup: basic",
"anyOf": [
{
"type": "object",
"properties": {
"osmTags": {
"$ref": "#/definitions/TagConfigJson",
"description": "Every source must set which tags have to be present in order to load the given layer."
"description": "question: Which tags must be present on the feature to show it in this layer?\nEvery source must set which tags have to be present in order to load the given layer."
},
"maxCacheAge": {
"description": "The maximum amount of seconds that a tile is allowed to linger in the cache",
"description": "question: How long (in seconds) is the data allowed to remain cached until it must be refreshed?\nThe maximum amount of seconds that a tile is allowed to linger in the cache\n\ntype: nat",
"type": "number"
}
},
@ -1789,12 +1775,10 @@ export default {
"description": "If set, only features matching this extra tag will be shown.\nThis is useful to hide certain features from view.\n\nThe default value is 'yes'\n\ngroup: advanced",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson",
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"$ref": "#/definitions/OrTagConfigJson",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{or:TagConfigJson[];}"
},
{
"type": "string"
@ -1806,7 +1790,7 @@ export default {
"type": "boolean"
},
"minzoom": {
"description": "The minimum needed zoomlevel required to start loading and displaying the data.\nThis can be used to only show common features (e.g. a bicycle parking) only when the map is zoomed in very much (17).\nThis prevents cluttering the map with thousands of parkings if one is looking to an entire city.\n\nDefault: 0\n\ngroup: basic\nquestion: At what zoom level should features of the layer be shown?\nifunset: Always load this layer, even if the entire world is in view.",
"description": "The minimum needed zoomlevel required to start loading and displaying the data.\nThis can be used to only show common features (e.g. a bicycle parking) only when the map is zoomed in very much (17).\nThis prevents cluttering the map with thousands of parkings if one is looking to an entire city.\n\nDefault: 0\ngroup: basic\ntype: nat\nquestion: At what zoom level should features of the layer be shown?\nifunset: Always load this layer, even if the entire world is in view.",
"type": "number"
},
"shownByDefault": {
@ -1929,53 +1913,23 @@ export default {
"type": "string"
}
},
"preciseInput": {
"description": "If set, the user will prompted to confirm the location before actually adding the data.\nThis will be with a 'drag crosshair'-method.\n\nIf 'preferredBackgroundCategory' is set, the element will attempt to pick a background layer of that category.",
"snapToLayer": {
"description": "If specified, these layers will be shown to and the new point will be snapped towards it",
"anyOf": [
{
"type": "object",
"properties": {
"preferredBackground": {
"description": "The type of background picture",
"anyOf": [
{
"type": "array",
"items": {
"type": "string"
}
},
{
"type": "string"
}
]
},
"snapToLayer": {
"description": "If specified, these layers will be shown to and the new point will be snapped towards it",
"anyOf": [
{
"type": "array",
"items": {
"type": "string"
}
},
{
"type": "string"
}
]
},
"maxSnapDistance": {
"description": "If specified, a new point will only be snapped if it is within this range.\nDistance in meter\n\nDefault: 10",
"type": "number"
}
"type": "array",
"items": {
"type": "string"
}
},
{
"enum": [
true
],
"type": "boolean"
"type": "string"
}
]
},
"maxSnapDistance": {
"description": "If specified, a new point will only be snapped if it is within this range.\nDistance in meter\n\nDefault: 10",
"type": "number"
}
},
"required": [
@ -2164,17 +2118,17 @@ export default {
]
},
"source": {
"description": "This determines where the data for the layer is fetched: from OSM or from an external geojson dataset.\n\nIf no 'geojson' is defined, data will be fetched from overpass and the OSM-API.\n\nEvery source _must_ define which tags _must_ be present in order to be picked up.\n\nNote: a source must always be defined. 'special' is only allowed if this is a builtin-layer",
"description": "Question: Where should the data be fetched from?\n\nThis determines where the data for the layer is fetched: from OSM or from an external geojson dataset.\n\nIf no 'geojson' is defined, data will be fetched from overpass and the OSM-API.\n\nEvery source _must_ define which tags _must_ be present in order to be picked up.\n\nNote: a source must always be defined. 'special' is only allowed if this is a builtin-layer\n\ntypes: Load data with specific tags from OpenStreetMap ; Load data from an external geojson source ;\ngroup: basic",
"anyOf": [
{
"type": "object",
"properties": {
"osmTags": {
"$ref": "#/definitions/TagConfigJson",
"description": "Every source must set which tags have to be present in order to load the given layer."
"description": "question: Which tags must be present on the feature to show it in this layer?\nEvery source must set which tags have to be present in order to load the given layer."
},
"maxCacheAge": {
"description": "The maximum amount of seconds that a tile is allowed to linger in the cache",
"description": "question: How long (in seconds) is the data allowed to remain cached until it must be refreshed?\nThe maximum amount of seconds that a tile is allowed to linger in the cache\n\ntype: nat",
"type": "number"
}
},
@ -2234,12 +2188,10 @@ export default {
"description": "If set, only features matching this extra tag will be shown.\nThis is useful to hide certain features from view.\n\nThe default value is 'yes'\n\ngroup: advanced",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson",
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"$ref": "#/definitions/OrTagConfigJson",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{or:TagConfigJson[];}"
},
{
"type": "string"
@ -2251,7 +2203,7 @@ export default {
"type": "boolean"
},
"minzoom": {
"description": "The minimum needed zoomlevel required to start loading and displaying the data.\nThis can be used to only show common features (e.g. a bicycle parking) only when the map is zoomed in very much (17).\nThis prevents cluttering the map with thousands of parkings if one is looking to an entire city.\n\nDefault: 0\n\ngroup: basic\nquestion: At what zoom level should features of the layer be shown?\nifunset: Always load this layer, even if the entire world is in view.",
"description": "The minimum needed zoomlevel required to start loading and displaying the data.\nThis can be used to only show common features (e.g. a bicycle parking) only when the map is zoomed in very much (17).\nThis prevents cluttering the map with thousands of parkings if one is looking to an entire city.\n\nDefault: 0\ngroup: basic\ntype: nat\nquestion: At what zoom level should features of the layer be shown?\nifunset: Always load this layer, even if the entire world is in view.",
"type": "number"
},
"shownByDefault": {
@ -2374,53 +2326,23 @@ export default {
"type": "string"
}
},
"preciseInput": {
"description": "If set, the user will prompted to confirm the location before actually adding the data.\nThis will be with a 'drag crosshair'-method.\n\nIf 'preferredBackgroundCategory' is set, the element will attempt to pick a background layer of that category.",
"snapToLayer": {
"description": "If specified, these layers will be shown to and the new point will be snapped towards it",
"anyOf": [
{
"type": "object",
"properties": {
"preferredBackground": {
"description": "The type of background picture",
"anyOf": [
{
"type": "array",
"items": {
"type": "string"
}
},
{
"type": "string"
}
]
},
"snapToLayer": {
"description": "If specified, these layers will be shown to and the new point will be snapped towards it",
"anyOf": [
{
"type": "array",
"items": {
"type": "string"
}
},
{
"type": "string"
}
]
},
"maxSnapDistance": {
"description": "If specified, a new point will only be snapped if it is within this range.\nDistance in meter\n\nDefault: 10",
"type": "number"
}
"type": "array",
"items": {
"type": "string"
}
},
{
"enum": [
true
],
"type": "boolean"
"type": "string"
}
]
},
"maxSnapDistance": {
"description": "If specified, a new point will only be snapped if it is within this range.\nDistance in meter\n\nDefault: 10",
"type": "number"
}
},
"required": [

View file

@ -74,13 +74,12 @@
},
"definitions": {
"TagConfigJson": {
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation",
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation\n\ntype: tag",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
"type": "object",
"properties": {
"or": {
@ -99,8 +98,7 @@
}
]
},
"AndTagConfigJson": {
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
"{and:TagConfigJson[];}": {
"type": "object",
"properties": {
"and": {
@ -115,8 +113,7 @@
],
"additionalProperties": false
},
"OrTagConfigJson": {
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
"{or:TagConfigJson[];}": {
"type": "object",
"properties": {
"or": {
@ -284,12 +281,10 @@
"description": "Only show this tagrendering (or ask the question) if the selected object also matches the tags specified as `condition`.\n\nThis is useful to ask a follow-up question.\nFor example, within toilets, asking _where_ the diaper changing table is is only useful _if_ there is one.\nThis can be done by adding `\"condition\": \"changing_table=yes\"`\n\nA full example would be:\n```json\n {\n \"question\": \"Where is the changing table located?\",\n \"render\": \"The changing table is located at {changing_table:location}\",\n \"condition\": \"changing_table=yes\",\n \"freeform\": {\n \"key\": \"changing_table:location\",\n \"inline\": true\n },\n \"mappings\": [\n {\n \"then\": \"The changing table is in the toilet for women.\",\n \"if\": \"changing_table:location=female_toilet\"\n },\n {\n \"then\": \"The changing table is in the toilet for men.\",\n \"if\": \"changing_table:location=male_toilet\"\n },\n {\n \"if\": \"changing_table:location=wheelchair_toilet\",\n \"then\": \"The changing table is in the toilet for wheelchair users.\",\n },\n {\n \"if\": \"changing_table:location=dedicated_room\",\n \"then\": \"The changing table is in a dedicated room. \",\n }\n ],\n \"id\": \"toilet-changing_table:location\"\n },\n```",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson",
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"$ref": "#/definitions/OrTagConfigJson",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{or:TagConfigJson[];}"
},
{
"type": "string"
@ -300,12 +295,10 @@
"description": "If set, this tag will be evaluated agains the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options.\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson",
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"$ref": "#/definitions/OrTagConfigJson",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{or:TagConfigJson[];}"
},
{
"type": "string"

View file

@ -74,13 +74,12 @@ export default {
},
"definitions": {
"TagConfigJson": {
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation",
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation\n\ntype: tag",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
"type": "object",
"properties": {
"or": {
@ -99,8 +98,7 @@ export default {
}
]
},
"AndTagConfigJson": {
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
"{and:TagConfigJson[];}": {
"type": "object",
"properties": {
"and": {
@ -114,8 +112,7 @@ export default {
"and"
]
},
"OrTagConfigJson": {
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
"{or:TagConfigJson[];}": {
"type": "object",
"properties": {
"or": {
@ -279,12 +276,10 @@ export default {
"description": "Only show this tagrendering (or ask the question) if the selected object also matches the tags specified as `condition`.\n\nThis is useful to ask a follow-up question.\nFor example, within toilets, asking _where_ the diaper changing table is is only useful _if_ there is one.\nThis can be done by adding `\"condition\": \"changing_table=yes\"`\n\nA full example would be:\n```json\n {\n \"question\": \"Where is the changing table located?\",\n \"render\": \"The changing table is located at {changing_table:location}\",\n \"condition\": \"changing_table=yes\",\n \"freeform\": {\n \"key\": \"changing_table:location\",\n \"inline\": true\n },\n \"mappings\": [\n {\n \"then\": \"The changing table is in the toilet for women.\",\n \"if\": \"changing_table:location=female_toilet\"\n },\n {\n \"then\": \"The changing table is in the toilet for men.\",\n \"if\": \"changing_table:location=male_toilet\"\n },\n {\n \"if\": \"changing_table:location=wheelchair_toilet\",\n \"then\": \"The changing table is in the toilet for wheelchair users.\",\n },\n {\n \"if\": \"changing_table:location=dedicated_room\",\n \"then\": \"The changing table is in a dedicated room. \",\n }\n ],\n \"id\": \"toilet-changing_table:location\"\n },\n```",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson",
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"$ref": "#/definitions/OrTagConfigJson",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{or:TagConfigJson[];}"
},
{
"type": "string"
@ -295,12 +290,10 @@ export default {
"description": "If set, this tag will be evaluated agains the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options.\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson",
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"$ref": "#/definitions/OrTagConfigJson",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{or:TagConfigJson[];}"
},
{
"type": "string"

View file

@ -3,7 +3,7 @@
"properties": {
"if": {
"$ref": "#/definitions/TagConfigJson",
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation"
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation\n\ntype: tag"
},
"then": {
"description": "Shown if the 'if is fulfilled\nType: rendered",
@ -44,12 +44,10 @@
"description": "In some cases, multiple taggings exist (e.g. a default assumption, or a commonly mapped abbreviation and a fully written variation).\n\nIn the latter case, a correct text should be shown, but only a single, canonical tagging should be selectable by the user.\nIn this case, one of the mappings can be hiden by setting this flag.\n\nTo demonstrate an example making a default assumption:\n\nmappings: [\n {\n if: \"access=\", -- no access tag present, we assume accessible\n then: \"Accessible to the general public\",\n hideInAnswer: true\n },\n {\n if: \"access=yes\",\n then: \"Accessible to the general public\", -- the user selected this, we add that to OSM\n },\n {\n if: \"access=no\",\n then: \"Not accessible to the public\"\n }\n]\n\n\nFor example, for an operator, we have `operator=Agentschap Natuur en Bos`, which is often abbreviated to `operator=ANB`.\nThen, we would add two mappings:\n{\n if: \"operator=Agentschap Natuur en Bos\" -- the non-abbreviated version which should be uploaded\n then: \"Maintained by Agentschap Natuur en Bos\"\n},\n{\n if: \"operator=ANB\", -- we don't want to upload abbreviations\n then: \"Maintained by Agentschap Natuur en Bos\"\n hideInAnswer: true\n}\n\nHide in answer can also be a tagsfilter, e.g. to make sure an option is only shown when appropriate.\nKeep in mind that this is reverse logic: it will be hidden in the answer if the condition is true, it will thus only show in the case of a mismatch\n\ne.g., for toilets: if \"wheelchair=no\", we know there is no wheelchair dedicated room.\nFor the location of the changing table, the option \"in the wheelchair accessible toilet is weird\", so we write:\n\n{\n \"question\": \"Where is the changing table located?\"\n \"mappings\": [\n {\"if\":\"changing_table:location=female\",\"then\":\"In the female restroom\"},\n {\"if\":\"changing_table:location=male\",\"then\":\"In the male restroom\"},\n {\"if\":\"changing_table:location=wheelchair\",\"then\":\"In the wheelchair accessible restroom\", \"hideInAnswer\": \"wheelchair=no\"},\n\n ]\n}\n\nAlso have a look for the meta-tags\n{\n if: \"operator=Agentschap Natuur en Bos\",\n then: \"Maintained by Agentschap Natuur en Bos\",\n hideInAnswer: \"_country!=be\"\n}",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson",
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"$ref": "#/definitions/OrTagConfigJson",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{or:TagConfigJson[];}"
},
{
"type": [
@ -63,12 +61,10 @@
"description": "Only applicable if 'multiAnswer' is set.\nThis is for situations such as:\n`accepts:coins=no` where one can select all the possible payment methods. However, we want to make explicit that some options _were not_ selected.\nThis can be done with `ifnot`\nNote that we can not explicitly render this negative case to the user, we cannot show `does _not_ accept coins`.\nIf this is important to your usecase, consider using multiple radiobutton-fields without `multiAnswer`",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson",
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"$ref": "#/definitions/OrTagConfigJson",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{or:TagConfigJson[];}"
},
{
"type": "string"
@ -90,12 +86,10 @@
"description": "If the searchable selector is picked, mappings with this item will have priority and show up even if the others are hidden\nUse this sparingly",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson",
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"$ref": "#/definitions/OrTagConfigJson",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{or:TagConfigJson[];}"
},
{
"type": "string"
@ -113,13 +107,12 @@
],
"definitions": {
"TagConfigJson": {
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation",
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation\n\ntype: tag",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
"type": "object",
"properties": {
"or": {
@ -138,8 +131,7 @@
}
]
},
"AndTagConfigJson": {
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
"{and:TagConfigJson[];}": {
"type": "object",
"properties": {
"and": {
@ -154,8 +146,7 @@
],
"additionalProperties": false
},
"OrTagConfigJson": {
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
"{or:TagConfigJson[];}": {
"type": "object",
"properties": {
"or": {
@ -323,12 +314,10 @@
"description": "Only show this tagrendering (or ask the question) if the selected object also matches the tags specified as `condition`.\n\nThis is useful to ask a follow-up question.\nFor example, within toilets, asking _where_ the diaper changing table is is only useful _if_ there is one.\nThis can be done by adding `\"condition\": \"changing_table=yes\"`\n\nA full example would be:\n```json\n {\n \"question\": \"Where is the changing table located?\",\n \"render\": \"The changing table is located at {changing_table:location}\",\n \"condition\": \"changing_table=yes\",\n \"freeform\": {\n \"key\": \"changing_table:location\",\n \"inline\": true\n },\n \"mappings\": [\n {\n \"then\": \"The changing table is in the toilet for women.\",\n \"if\": \"changing_table:location=female_toilet\"\n },\n {\n \"then\": \"The changing table is in the toilet for men.\",\n \"if\": \"changing_table:location=male_toilet\"\n },\n {\n \"if\": \"changing_table:location=wheelchair_toilet\",\n \"then\": \"The changing table is in the toilet for wheelchair users.\",\n },\n {\n \"if\": \"changing_table:location=dedicated_room\",\n \"then\": \"The changing table is in a dedicated room. \",\n }\n ],\n \"id\": \"toilet-changing_table:location\"\n },\n```",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson",
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"$ref": "#/definitions/OrTagConfigJson",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{or:TagConfigJson[];}"
},
{
"type": "string"
@ -339,12 +328,10 @@
"description": "If set, this tag will be evaluated agains the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options.\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson",
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"$ref": "#/definitions/OrTagConfigJson",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{or:TagConfigJson[];}"
},
{
"type": "string"

View file

@ -3,7 +3,7 @@ export default {
"properties": {
"if": {
"$ref": "#/definitions/TagConfigJson",
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation"
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation\n\ntype: tag"
},
"then": {
"description": "Shown if the 'if is fulfilled\nType: rendered",
@ -44,12 +44,10 @@ export default {
"description": "In some cases, multiple taggings exist (e.g. a default assumption, or a commonly mapped abbreviation and a fully written variation).\n\nIn the latter case, a correct text should be shown, but only a single, canonical tagging should be selectable by the user.\nIn this case, one of the mappings can be hiden by setting this flag.\n\nTo demonstrate an example making a default assumption:\n\nmappings: [\n {\n if: \"access=\", -- no access tag present, we assume accessible\n then: \"Accessible to the general public\",\n hideInAnswer: true\n },\n {\n if: \"access=yes\",\n then: \"Accessible to the general public\", -- the user selected this, we add that to OSM\n },\n {\n if: \"access=no\",\n then: \"Not accessible to the public\"\n }\n]\n\n\nFor example, for an operator, we have `operator=Agentschap Natuur en Bos`, which is often abbreviated to `operator=ANB`.\nThen, we would add two mappings:\n{\n if: \"operator=Agentschap Natuur en Bos\" -- the non-abbreviated version which should be uploaded\n then: \"Maintained by Agentschap Natuur en Bos\"\n},\n{\n if: \"operator=ANB\", -- we don't want to upload abbreviations\n then: \"Maintained by Agentschap Natuur en Bos\"\n hideInAnswer: true\n}\n\nHide in answer can also be a tagsfilter, e.g. to make sure an option is only shown when appropriate.\nKeep in mind that this is reverse logic: it will be hidden in the answer if the condition is true, it will thus only show in the case of a mismatch\n\ne.g., for toilets: if \"wheelchair=no\", we know there is no wheelchair dedicated room.\nFor the location of the changing table, the option \"in the wheelchair accessible toilet is weird\", so we write:\n\n{\n \"question\": \"Where is the changing table located?\"\n \"mappings\": [\n {\"if\":\"changing_table:location=female\",\"then\":\"In the female restroom\"},\n {\"if\":\"changing_table:location=male\",\"then\":\"In the male restroom\"},\n {\"if\":\"changing_table:location=wheelchair\",\"then\":\"In the wheelchair accessible restroom\", \"hideInAnswer\": \"wheelchair=no\"},\n\n ]\n}\n\nAlso have a look for the meta-tags\n{\n if: \"operator=Agentschap Natuur en Bos\",\n then: \"Maintained by Agentschap Natuur en Bos\",\n hideInAnswer: \"_country!=be\"\n}",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson",
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"$ref": "#/definitions/OrTagConfigJson",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{or:TagConfigJson[];}"
},
{
"type": [
@ -63,12 +61,10 @@ export default {
"description": "Only applicable if 'multiAnswer' is set.\nThis is for situations such as:\n`accepts:coins=no` where one can select all the possible payment methods. However, we want to make explicit that some options _were not_ selected.\nThis can be done with `ifnot`\nNote that we can not explicitly render this negative case to the user, we cannot show `does _not_ accept coins`.\nIf this is important to your usecase, consider using multiple radiobutton-fields without `multiAnswer`",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson",
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"$ref": "#/definitions/OrTagConfigJson",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{or:TagConfigJson[];}"
},
{
"type": "string"
@ -90,12 +86,10 @@ export default {
"description": "If the searchable selector is picked, mappings with this item will have priority and show up even if the others are hidden\nUse this sparingly",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson",
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"$ref": "#/definitions/OrTagConfigJson",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{or:TagConfigJson[];}"
},
{
"type": "string"
@ -113,13 +107,12 @@ export default {
],
"definitions": {
"TagConfigJson": {
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation",
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation\n\ntype: tag",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
"type": "object",
"properties": {
"or": {
@ -138,8 +131,7 @@ export default {
}
]
},
"AndTagConfigJson": {
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
"{and:TagConfigJson[];}": {
"type": "object",
"properties": {
"and": {
@ -153,8 +145,7 @@ export default {
"and"
]
},
"OrTagConfigJson": {
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
"{or:TagConfigJson[];}": {
"type": "object",
"properties": {
"or": {
@ -318,12 +309,10 @@ export default {
"description": "Only show this tagrendering (or ask the question) if the selected object also matches the tags specified as `condition`.\n\nThis is useful to ask a follow-up question.\nFor example, within toilets, asking _where_ the diaper changing table is is only useful _if_ there is one.\nThis can be done by adding `\"condition\": \"changing_table=yes\"`\n\nA full example would be:\n```json\n {\n \"question\": \"Where is the changing table located?\",\n \"render\": \"The changing table is located at {changing_table:location}\",\n \"condition\": \"changing_table=yes\",\n \"freeform\": {\n \"key\": \"changing_table:location\",\n \"inline\": true\n },\n \"mappings\": [\n {\n \"then\": \"The changing table is in the toilet for women.\",\n \"if\": \"changing_table:location=female_toilet\"\n },\n {\n \"then\": \"The changing table is in the toilet for men.\",\n \"if\": \"changing_table:location=male_toilet\"\n },\n {\n \"if\": \"changing_table:location=wheelchair_toilet\",\n \"then\": \"The changing table is in the toilet for wheelchair users.\",\n },\n {\n \"if\": \"changing_table:location=dedicated_room\",\n \"then\": \"The changing table is in a dedicated room. \",\n }\n ],\n \"id\": \"toilet-changing_table:location\"\n },\n```",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson",
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"$ref": "#/definitions/OrTagConfigJson",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{or:TagConfigJson[];}"
},
{
"type": "string"
@ -334,12 +323,10 @@ export default {
"description": "If set, this tag will be evaluated agains the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options.\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson",
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"$ref": "#/definitions/OrTagConfigJson",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{or:TagConfigJson[];}"
},
{
"type": "string"

View file

@ -12,13 +12,12 @@
},
"definitions": {
"TagConfigJson": {
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation",
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation\n\ntype: tag",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
"type": "object",
"properties": {
"or": {
@ -37,8 +36,7 @@
}
]
},
"AndTagConfigJson": {
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
"{and:TagConfigJson[];}": {
"type": "object",
"properties": {
"and": {
@ -53,8 +51,7 @@
],
"additionalProperties": false
},
"OrTagConfigJson": {
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
"{or:TagConfigJson[];}": {
"type": "object",
"properties": {
"or": {

View file

@ -12,13 +12,12 @@ export default {
},
"definitions": {
"TagConfigJson": {
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation",
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation\n\ntype: tag",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
"type": "object",
"properties": {
"or": {
@ -37,8 +36,7 @@ export default {
}
]
},
"AndTagConfigJson": {
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
"{and:TagConfigJson[];}": {
"type": "object",
"properties": {
"and": {
@ -52,8 +50,7 @@ export default {
"and"
]
},
"OrTagConfigJson": {
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
"{or:TagConfigJson[];}": {
"type": "object",
"properties": {
"or": {

View file

@ -28,7 +28,7 @@
"properties": {
"if": {
"$ref": "#/definitions/TagConfigJson",
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation"
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation\n\ntype: tag"
},
"then": {
"description": "Badge to show\nType: icon",
@ -59,6 +59,17 @@
}
]
},
"anchor": {
"description": "question: What is the anchorpoint of the icon?\n\nThis matches the geographical point with a location on the icon.\nFor example, a feature attached to the ground can use 'bottom' as zooming in will give the appearance of being anchored to a fixed location.",
"anyOf": [
{
"$ref": "#/definitions/TagRenderingConfigJson"
},
{
"type": "string"
}
]
},
"rotation": {
"description": "The rotation of an icon, useful for e.g. directions.\nUsage: as if it were a css property for 'rotate', thus has to end with 'deg', e.g. `90deg`, `{direction}deg`, `calc(90deg - {camera:direction}deg)``",
"anyOf": [
@ -161,13 +172,12 @@
],
"definitions": {
"TagConfigJson": {
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation",
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation\n\ntype: tag",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
"type": "object",
"properties": {
"or": {
@ -186,8 +196,7 @@
}
]
},
"AndTagConfigJson": {
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
"{and:TagConfigJson[];}": {
"type": "object",
"properties": {
"and": {
@ -202,8 +211,7 @@
],
"additionalProperties": false
},
"OrTagConfigJson": {
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
"{or:TagConfigJson[];}": {
"type": "object",
"properties": {
"or": {
@ -371,12 +379,10 @@
"description": "Only show this tagrendering (or ask the question) if the selected object also matches the tags specified as `condition`.\n\nThis is useful to ask a follow-up question.\nFor example, within toilets, asking _where_ the diaper changing table is is only useful _if_ there is one.\nThis can be done by adding `\"condition\": \"changing_table=yes\"`\n\nA full example would be:\n```json\n {\n \"question\": \"Where is the changing table located?\",\n \"render\": \"The changing table is located at {changing_table:location}\",\n \"condition\": \"changing_table=yes\",\n \"freeform\": {\n \"key\": \"changing_table:location\",\n \"inline\": true\n },\n \"mappings\": [\n {\n \"then\": \"The changing table is in the toilet for women.\",\n \"if\": \"changing_table:location=female_toilet\"\n },\n {\n \"then\": \"The changing table is in the toilet for men.\",\n \"if\": \"changing_table:location=male_toilet\"\n },\n {\n \"if\": \"changing_table:location=wheelchair_toilet\",\n \"then\": \"The changing table is in the toilet for wheelchair users.\",\n },\n {\n \"if\": \"changing_table:location=dedicated_room\",\n \"then\": \"The changing table is in a dedicated room. \",\n }\n ],\n \"id\": \"toilet-changing_table:location\"\n },\n```",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson",
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"$ref": "#/definitions/OrTagConfigJson",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{or:TagConfigJson[];}"
},
{
"type": "string"
@ -387,12 +393,10 @@
"description": "If set, this tag will be evaluated agains the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options.\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson",
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"$ref": "#/definitions/OrTagConfigJson",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{or:TagConfigJson[];}"
},
{
"type": "string"

View file

@ -28,7 +28,7 @@ export default {
"properties": {
"if": {
"$ref": "#/definitions/TagConfigJson",
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation"
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation\n\ntype: tag"
},
"then": {
"description": "Badge to show\nType: icon",
@ -59,6 +59,17 @@ export default {
}
]
},
"anchor": {
"description": "question: What is the anchorpoint of the icon?\n\nThis matches the geographical point with a location on the icon.\nFor example, a feature attached to the ground can use 'bottom' as zooming in will give the appearance of being anchored to a fixed location.",
"anyOf": [
{
"$ref": "#/definitions/TagRenderingConfigJson"
},
{
"type": "string"
}
]
},
"rotation": {
"description": "The rotation of an icon, useful for e.g. directions.\nUsage: as if it were a css property for 'rotate', thus has to end with 'deg', e.g. `90deg`, `{direction}deg`, `calc(90deg - {camera:direction}deg)``",
"anyOf": [
@ -161,13 +172,12 @@ export default {
],
"definitions": {
"TagConfigJson": {
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation",
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation\n\ntype: tag",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
"type": "object",
"properties": {
"or": {
@ -186,8 +196,7 @@ export default {
}
]
},
"AndTagConfigJson": {
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
"{and:TagConfigJson[];}": {
"type": "object",
"properties": {
"and": {
@ -201,8 +210,7 @@ export default {
"and"
]
},
"OrTagConfigJson": {
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
"{or:TagConfigJson[];}": {
"type": "object",
"properties": {
"or": {
@ -366,12 +374,10 @@ export default {
"description": "Only show this tagrendering (or ask the question) if the selected object also matches the tags specified as `condition`.\n\nThis is useful to ask a follow-up question.\nFor example, within toilets, asking _where_ the diaper changing table is is only useful _if_ there is one.\nThis can be done by adding `\"condition\": \"changing_table=yes\"`\n\nA full example would be:\n```json\n {\n \"question\": \"Where is the changing table located?\",\n \"render\": \"The changing table is located at {changing_table:location}\",\n \"condition\": \"changing_table=yes\",\n \"freeform\": {\n \"key\": \"changing_table:location\",\n \"inline\": true\n },\n \"mappings\": [\n {\n \"then\": \"The changing table is in the toilet for women.\",\n \"if\": \"changing_table:location=female_toilet\"\n },\n {\n \"then\": \"The changing table is in the toilet for men.\",\n \"if\": \"changing_table:location=male_toilet\"\n },\n {\n \"if\": \"changing_table:location=wheelchair_toilet\",\n \"then\": \"The changing table is in the toilet for wheelchair users.\",\n },\n {\n \"if\": \"changing_table:location=dedicated_room\",\n \"then\": \"The changing table is in a dedicated room. \",\n }\n ],\n \"id\": \"toilet-changing_table:location\"\n },\n```",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson",
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"$ref": "#/definitions/OrTagConfigJson",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{or:TagConfigJson[];}"
},
{
"type": "string"
@ -382,12 +388,10 @@ export default {
"description": "If set, this tag will be evaluated agains the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options.\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson",
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"$ref": "#/definitions/OrTagConfigJson",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{or:TagConfigJson[];}"
},
{
"type": "string"

View file

@ -151,12 +151,10 @@
"description": "Only show this tagrendering (or ask the question) if the selected object also matches the tags specified as `condition`.\n\nThis is useful to ask a follow-up question.\nFor example, within toilets, asking _where_ the diaper changing table is is only useful _if_ there is one.\nThis can be done by adding `\"condition\": \"changing_table=yes\"`\n\nA full example would be:\n```json\n {\n \"question\": \"Where is the changing table located?\",\n \"render\": \"The changing table is located at {changing_table:location}\",\n \"condition\": \"changing_table=yes\",\n \"freeform\": {\n \"key\": \"changing_table:location\",\n \"inline\": true\n },\n \"mappings\": [\n {\n \"then\": \"The changing table is in the toilet for women.\",\n \"if\": \"changing_table:location=female_toilet\"\n },\n {\n \"then\": \"The changing table is in the toilet for men.\",\n \"if\": \"changing_table:location=male_toilet\"\n },\n {\n \"if\": \"changing_table:location=wheelchair_toilet\",\n \"then\": \"The changing table is in the toilet for wheelchair users.\",\n },\n {\n \"if\": \"changing_table:location=dedicated_room\",\n \"then\": \"The changing table is in a dedicated room. \",\n }\n ],\n \"id\": \"toilet-changing_table:location\"\n },\n```",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson",
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"$ref": "#/definitions/OrTagConfigJson",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{or:TagConfigJson[];}"
},
{
"type": "string"
@ -167,12 +165,10 @@
"description": "If set, this tag will be evaluated agains the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options.\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson",
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"$ref": "#/definitions/OrTagConfigJson",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{or:TagConfigJson[];}"
},
{
"type": "string"
@ -182,13 +178,12 @@
},
"definitions": {
"TagConfigJson": {
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation",
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation\n\ntype: tag",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
"type": "object",
"properties": {
"or": {
@ -207,8 +202,7 @@
}
]
},
"AndTagConfigJson": {
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
"{and:TagConfigJson[];}": {
"type": "object",
"properties": {
"and": {
@ -223,8 +217,7 @@
],
"additionalProperties": false
},
"OrTagConfigJson": {
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
"{or:TagConfigJson[];}": {
"type": "object",
"properties": {
"or": {
@ -392,12 +385,10 @@
"description": "Only show this tagrendering (or ask the question) if the selected object also matches the tags specified as `condition`.\n\nThis is useful to ask a follow-up question.\nFor example, within toilets, asking _where_ the diaper changing table is is only useful _if_ there is one.\nThis can be done by adding `\"condition\": \"changing_table=yes\"`\n\nA full example would be:\n```json\n {\n \"question\": \"Where is the changing table located?\",\n \"render\": \"The changing table is located at {changing_table:location}\",\n \"condition\": \"changing_table=yes\",\n \"freeform\": {\n \"key\": \"changing_table:location\",\n \"inline\": true\n },\n \"mappings\": [\n {\n \"then\": \"The changing table is in the toilet for women.\",\n \"if\": \"changing_table:location=female_toilet\"\n },\n {\n \"then\": \"The changing table is in the toilet for men.\",\n \"if\": \"changing_table:location=male_toilet\"\n },\n {\n \"if\": \"changing_table:location=wheelchair_toilet\",\n \"then\": \"The changing table is in the toilet for wheelchair users.\",\n },\n {\n \"if\": \"changing_table:location=dedicated_room\",\n \"then\": \"The changing table is in a dedicated room. \",\n }\n ],\n \"id\": \"toilet-changing_table:location\"\n },\n```",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson",
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"$ref": "#/definitions/OrTagConfigJson",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{or:TagConfigJson[];}"
},
{
"type": "string"
@ -408,12 +399,10 @@
"description": "If set, this tag will be evaluated agains the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options.\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson",
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"$ref": "#/definitions/OrTagConfigJson",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{or:TagConfigJson[];}"
},
{
"type": "string"
@ -497,7 +486,7 @@
"properties": {
"if": {
"$ref": "#/definitions/TagConfigJson",
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation"
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation\n\ntype: tag"
},
"then": {
"description": "Shown if the 'if is fulfilled\nType: rendered",
@ -538,12 +527,10 @@
"description": "In some cases, multiple taggings exist (e.g. a default assumption, or a commonly mapped abbreviation and a fully written variation).\n\nIn the latter case, a correct text should be shown, but only a single, canonical tagging should be selectable by the user.\nIn this case, one of the mappings can be hiden by setting this flag.\n\nTo demonstrate an example making a default assumption:\n\nmappings: [\n {\n if: \"access=\", -- no access tag present, we assume accessible\n then: \"Accessible to the general public\",\n hideInAnswer: true\n },\n {\n if: \"access=yes\",\n then: \"Accessible to the general public\", -- the user selected this, we add that to OSM\n },\n {\n if: \"access=no\",\n then: \"Not accessible to the public\"\n }\n]\n\n\nFor example, for an operator, we have `operator=Agentschap Natuur en Bos`, which is often abbreviated to `operator=ANB`.\nThen, we would add two mappings:\n{\n if: \"operator=Agentschap Natuur en Bos\" -- the non-abbreviated version which should be uploaded\n then: \"Maintained by Agentschap Natuur en Bos\"\n},\n{\n if: \"operator=ANB\", -- we don't want to upload abbreviations\n then: \"Maintained by Agentschap Natuur en Bos\"\n hideInAnswer: true\n}\n\nHide in answer can also be a tagsfilter, e.g. to make sure an option is only shown when appropriate.\nKeep in mind that this is reverse logic: it will be hidden in the answer if the condition is true, it will thus only show in the case of a mismatch\n\ne.g., for toilets: if \"wheelchair=no\", we know there is no wheelchair dedicated room.\nFor the location of the changing table, the option \"in the wheelchair accessible toilet is weird\", so we write:\n\n{\n \"question\": \"Where is the changing table located?\"\n \"mappings\": [\n {\"if\":\"changing_table:location=female\",\"then\":\"In the female restroom\"},\n {\"if\":\"changing_table:location=male\",\"then\":\"In the male restroom\"},\n {\"if\":\"changing_table:location=wheelchair\",\"then\":\"In the wheelchair accessible restroom\", \"hideInAnswer\": \"wheelchair=no\"},\n\n ]\n}\n\nAlso have a look for the meta-tags\n{\n if: \"operator=Agentschap Natuur en Bos\",\n then: \"Maintained by Agentschap Natuur en Bos\",\n hideInAnswer: \"_country!=be\"\n}",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson",
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"$ref": "#/definitions/OrTagConfigJson",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{or:TagConfigJson[];}"
},
{
"type": [
@ -557,12 +544,10 @@
"description": "Only applicable if 'multiAnswer' is set.\nThis is for situations such as:\n`accepts:coins=no` where one can select all the possible payment methods. However, we want to make explicit that some options _were not_ selected.\nThis can be done with `ifnot`\nNote that we can not explicitly render this negative case to the user, we cannot show `does _not_ accept coins`.\nIf this is important to your usecase, consider using multiple radiobutton-fields without `multiAnswer`",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson",
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"$ref": "#/definitions/OrTagConfigJson",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{or:TagConfigJson[];}"
},
{
"type": "string"
@ -584,12 +569,10 @@
"description": "If the searchable selector is picked, mappings with this item will have priority and show up even if the others are hidden\nUse this sparingly",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson",
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"$ref": "#/definitions/OrTagConfigJson",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{or:TagConfigJson[];}"
},
{
"type": "string"

View file

@ -151,12 +151,10 @@ export default {
"description": "Only show this tagrendering (or ask the question) if the selected object also matches the tags specified as `condition`.\n\nThis is useful to ask a follow-up question.\nFor example, within toilets, asking _where_ the diaper changing table is is only useful _if_ there is one.\nThis can be done by adding `\"condition\": \"changing_table=yes\"`\n\nA full example would be:\n```json\n {\n \"question\": \"Where is the changing table located?\",\n \"render\": \"The changing table is located at {changing_table:location}\",\n \"condition\": \"changing_table=yes\",\n \"freeform\": {\n \"key\": \"changing_table:location\",\n \"inline\": true\n },\n \"mappings\": [\n {\n \"then\": \"The changing table is in the toilet for women.\",\n \"if\": \"changing_table:location=female_toilet\"\n },\n {\n \"then\": \"The changing table is in the toilet for men.\",\n \"if\": \"changing_table:location=male_toilet\"\n },\n {\n \"if\": \"changing_table:location=wheelchair_toilet\",\n \"then\": \"The changing table is in the toilet for wheelchair users.\",\n },\n {\n \"if\": \"changing_table:location=dedicated_room\",\n \"then\": \"The changing table is in a dedicated room. \",\n }\n ],\n \"id\": \"toilet-changing_table:location\"\n },\n```",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson",
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"$ref": "#/definitions/OrTagConfigJson",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{or:TagConfigJson[];}"
},
{
"type": "string"
@ -167,12 +165,10 @@ export default {
"description": "If set, this tag will be evaluated agains the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options.\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson",
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"$ref": "#/definitions/OrTagConfigJson",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{or:TagConfigJson[];}"
},
{
"type": "string"
@ -182,13 +178,12 @@ export default {
},
"definitions": {
"TagConfigJson": {
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation",
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation\n\ntype: tag",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
"type": "object",
"properties": {
"or": {
@ -207,8 +202,7 @@ export default {
}
]
},
"AndTagConfigJson": {
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
"{and:TagConfigJson[];}": {
"type": "object",
"properties": {
"and": {
@ -222,8 +216,7 @@ export default {
"and"
]
},
"OrTagConfigJson": {
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
"{or:TagConfigJson[];}": {
"type": "object",
"properties": {
"or": {
@ -387,12 +380,10 @@ export default {
"description": "Only show this tagrendering (or ask the question) if the selected object also matches the tags specified as `condition`.\n\nThis is useful to ask a follow-up question.\nFor example, within toilets, asking _where_ the diaper changing table is is only useful _if_ there is one.\nThis can be done by adding `\"condition\": \"changing_table=yes\"`\n\nA full example would be:\n```json\n {\n \"question\": \"Where is the changing table located?\",\n \"render\": \"The changing table is located at {changing_table:location}\",\n \"condition\": \"changing_table=yes\",\n \"freeform\": {\n \"key\": \"changing_table:location\",\n \"inline\": true\n },\n \"mappings\": [\n {\n \"then\": \"The changing table is in the toilet for women.\",\n \"if\": \"changing_table:location=female_toilet\"\n },\n {\n \"then\": \"The changing table is in the toilet for men.\",\n \"if\": \"changing_table:location=male_toilet\"\n },\n {\n \"if\": \"changing_table:location=wheelchair_toilet\",\n \"then\": \"The changing table is in the toilet for wheelchair users.\",\n },\n {\n \"if\": \"changing_table:location=dedicated_room\",\n \"then\": \"The changing table is in a dedicated room. \",\n }\n ],\n \"id\": \"toilet-changing_table:location\"\n },\n```",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson",
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"$ref": "#/definitions/OrTagConfigJson",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{or:TagConfigJson[];}"
},
{
"type": "string"
@ -403,12 +394,10 @@ export default {
"description": "If set, this tag will be evaluated agains the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options.\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson",
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"$ref": "#/definitions/OrTagConfigJson",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{or:TagConfigJson[];}"
},
{
"type": "string"
@ -490,7 +479,7 @@ export default {
"properties": {
"if": {
"$ref": "#/definitions/TagConfigJson",
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation"
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation\n\ntype: tag"
},
"then": {
"description": "Shown if the 'if is fulfilled\nType: rendered",
@ -531,12 +520,10 @@ export default {
"description": "In some cases, multiple taggings exist (e.g. a default assumption, or a commonly mapped abbreviation and a fully written variation).\n\nIn the latter case, a correct text should be shown, but only a single, canonical tagging should be selectable by the user.\nIn this case, one of the mappings can be hiden by setting this flag.\n\nTo demonstrate an example making a default assumption:\n\nmappings: [\n {\n if: \"access=\", -- no access tag present, we assume accessible\n then: \"Accessible to the general public\",\n hideInAnswer: true\n },\n {\n if: \"access=yes\",\n then: \"Accessible to the general public\", -- the user selected this, we add that to OSM\n },\n {\n if: \"access=no\",\n then: \"Not accessible to the public\"\n }\n]\n\n\nFor example, for an operator, we have `operator=Agentschap Natuur en Bos`, which is often abbreviated to `operator=ANB`.\nThen, we would add two mappings:\n{\n if: \"operator=Agentschap Natuur en Bos\" -- the non-abbreviated version which should be uploaded\n then: \"Maintained by Agentschap Natuur en Bos\"\n},\n{\n if: \"operator=ANB\", -- we don't want to upload abbreviations\n then: \"Maintained by Agentschap Natuur en Bos\"\n hideInAnswer: true\n}\n\nHide in answer can also be a tagsfilter, e.g. to make sure an option is only shown when appropriate.\nKeep in mind that this is reverse logic: it will be hidden in the answer if the condition is true, it will thus only show in the case of a mismatch\n\ne.g., for toilets: if \"wheelchair=no\", we know there is no wheelchair dedicated room.\nFor the location of the changing table, the option \"in the wheelchair accessible toilet is weird\", so we write:\n\n{\n \"question\": \"Where is the changing table located?\"\n \"mappings\": [\n {\"if\":\"changing_table:location=female\",\"then\":\"In the female restroom\"},\n {\"if\":\"changing_table:location=male\",\"then\":\"In the male restroom\"},\n {\"if\":\"changing_table:location=wheelchair\",\"then\":\"In the wheelchair accessible restroom\", \"hideInAnswer\": \"wheelchair=no\"},\n\n ]\n}\n\nAlso have a look for the meta-tags\n{\n if: \"operator=Agentschap Natuur en Bos\",\n then: \"Maintained by Agentschap Natuur en Bos\",\n hideInAnswer: \"_country!=be\"\n}",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson",
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"$ref": "#/definitions/OrTagConfigJson",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{or:TagConfigJson[];}"
},
{
"type": [
@ -550,12 +537,10 @@ export default {
"description": "Only applicable if 'multiAnswer' is set.\nThis is for situations such as:\n`accepts:coins=no` where one can select all the possible payment methods. However, we want to make explicit that some options _were not_ selected.\nThis can be done with `ifnot`\nNote that we can not explicitly render this negative case to the user, we cannot show `does _not_ accept coins`.\nIf this is important to your usecase, consider using multiple radiobutton-fields without `multiAnswer`",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson",
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"$ref": "#/definitions/OrTagConfigJson",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{or:TagConfigJson[];}"
},
{
"type": "string"
@ -577,12 +562,10 @@ export default {
"description": "If the searchable selector is picked, mappings with this item will have priority and show up even if the others are hidden\nUse this sparingly",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson",
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"$ref": "#/definitions/OrTagConfigJson",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{or:TagConfigJson[];}"
},
{
"type": "string"

View file

@ -34,13 +34,12 @@
],
"definitions": {
"TagConfigJson": {
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation",
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation\n\ntype: tag",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
"type": "object",
"properties": {
"or": {
@ -59,8 +58,7 @@
}
]
},
"AndTagConfigJson": {
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
"{and:TagConfigJson[];}": {
"type": "object",
"properties": {
"and": {
@ -75,8 +73,7 @@
],
"additionalProperties": false
},
"OrTagConfigJson": {
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
"{or:TagConfigJson[];}": {
"type": "object",
"properties": {
"or": {
@ -244,12 +241,10 @@
"description": "Only show this tagrendering (or ask the question) if the selected object also matches the tags specified as `condition`.\n\nThis is useful to ask a follow-up question.\nFor example, within toilets, asking _where_ the diaper changing table is is only useful _if_ there is one.\nThis can be done by adding `\"condition\": \"changing_table=yes\"`\n\nA full example would be:\n```json\n {\n \"question\": \"Where is the changing table located?\",\n \"render\": \"The changing table is located at {changing_table:location}\",\n \"condition\": \"changing_table=yes\",\n \"freeform\": {\n \"key\": \"changing_table:location\",\n \"inline\": true\n },\n \"mappings\": [\n {\n \"then\": \"The changing table is in the toilet for women.\",\n \"if\": \"changing_table:location=female_toilet\"\n },\n {\n \"then\": \"The changing table is in the toilet for men.\",\n \"if\": \"changing_table:location=male_toilet\"\n },\n {\n \"if\": \"changing_table:location=wheelchair_toilet\",\n \"then\": \"The changing table is in the toilet for wheelchair users.\",\n },\n {\n \"if\": \"changing_table:location=dedicated_room\",\n \"then\": \"The changing table is in a dedicated room. \",\n }\n ],\n \"id\": \"toilet-changing_table:location\"\n },\n```",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson",
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"$ref": "#/definitions/OrTagConfigJson",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{or:TagConfigJson[];}"
},
{
"type": "string"
@ -260,12 +255,10 @@
"description": "If set, this tag will be evaluated agains the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options.\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson",
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"$ref": "#/definitions/OrTagConfigJson",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{or:TagConfigJson[];}"
},
{
"type": "string"
@ -349,7 +342,7 @@
"properties": {
"if": {
"$ref": "#/definitions/TagConfigJson",
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation"
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation\n\ntype: tag"
},
"then": {
"description": "Shown if the 'if is fulfilled\nType: rendered",
@ -390,12 +383,10 @@
"description": "In some cases, multiple taggings exist (e.g. a default assumption, or a commonly mapped abbreviation and a fully written variation).\n\nIn the latter case, a correct text should be shown, but only a single, canonical tagging should be selectable by the user.\nIn this case, one of the mappings can be hiden by setting this flag.\n\nTo demonstrate an example making a default assumption:\n\nmappings: [\n {\n if: \"access=\", -- no access tag present, we assume accessible\n then: \"Accessible to the general public\",\n hideInAnswer: true\n },\n {\n if: \"access=yes\",\n then: \"Accessible to the general public\", -- the user selected this, we add that to OSM\n },\n {\n if: \"access=no\",\n then: \"Not accessible to the public\"\n }\n]\n\n\nFor example, for an operator, we have `operator=Agentschap Natuur en Bos`, which is often abbreviated to `operator=ANB`.\nThen, we would add two mappings:\n{\n if: \"operator=Agentschap Natuur en Bos\" -- the non-abbreviated version which should be uploaded\n then: \"Maintained by Agentschap Natuur en Bos\"\n},\n{\n if: \"operator=ANB\", -- we don't want to upload abbreviations\n then: \"Maintained by Agentschap Natuur en Bos\"\n hideInAnswer: true\n}\n\nHide in answer can also be a tagsfilter, e.g. to make sure an option is only shown when appropriate.\nKeep in mind that this is reverse logic: it will be hidden in the answer if the condition is true, it will thus only show in the case of a mismatch\n\ne.g., for toilets: if \"wheelchair=no\", we know there is no wheelchair dedicated room.\nFor the location of the changing table, the option \"in the wheelchair accessible toilet is weird\", so we write:\n\n{\n \"question\": \"Where is the changing table located?\"\n \"mappings\": [\n {\"if\":\"changing_table:location=female\",\"then\":\"In the female restroom\"},\n {\"if\":\"changing_table:location=male\",\"then\":\"In the male restroom\"},\n {\"if\":\"changing_table:location=wheelchair\",\"then\":\"In the wheelchair accessible restroom\", \"hideInAnswer\": \"wheelchair=no\"},\n\n ]\n}\n\nAlso have a look for the meta-tags\n{\n if: \"operator=Agentschap Natuur en Bos\",\n then: \"Maintained by Agentschap Natuur en Bos\",\n hideInAnswer: \"_country!=be\"\n}",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson",
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"$ref": "#/definitions/OrTagConfigJson",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{or:TagConfigJson[];}"
},
{
"type": [
@ -409,12 +400,10 @@
"description": "Only applicable if 'multiAnswer' is set.\nThis is for situations such as:\n`accepts:coins=no` where one can select all the possible payment methods. However, we want to make explicit that some options _were not_ selected.\nThis can be done with `ifnot`\nNote that we can not explicitly render this negative case to the user, we cannot show `does _not_ accept coins`.\nIf this is important to your usecase, consider using multiple radiobutton-fields without `multiAnswer`",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson",
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"$ref": "#/definitions/OrTagConfigJson",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{or:TagConfigJson[];}"
},
{
"type": "string"
@ -436,12 +425,10 @@
"description": "If the searchable selector is picked, mappings with this item will have priority and show up even if the others are hidden\nUse this sparingly",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson",
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"$ref": "#/definitions/OrTagConfigJson",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{or:TagConfigJson[];}"
},
{
"type": "string"

View file

@ -34,13 +34,12 @@ export default {
],
"definitions": {
"TagConfigJson": {
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation",
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation\n\ntype: tag",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
"type": "object",
"properties": {
"or": {
@ -59,8 +58,7 @@ export default {
}
]
},
"AndTagConfigJson": {
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
"{and:TagConfigJson[];}": {
"type": "object",
"properties": {
"and": {
@ -74,8 +72,7 @@ export default {
"and"
]
},
"OrTagConfigJson": {
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
"{or:TagConfigJson[];}": {
"type": "object",
"properties": {
"or": {
@ -239,12 +236,10 @@ export default {
"description": "Only show this tagrendering (or ask the question) if the selected object also matches the tags specified as `condition`.\n\nThis is useful to ask a follow-up question.\nFor example, within toilets, asking _where_ the diaper changing table is is only useful _if_ there is one.\nThis can be done by adding `\"condition\": \"changing_table=yes\"`\n\nA full example would be:\n```json\n {\n \"question\": \"Where is the changing table located?\",\n \"render\": \"The changing table is located at {changing_table:location}\",\n \"condition\": \"changing_table=yes\",\n \"freeform\": {\n \"key\": \"changing_table:location\",\n \"inline\": true\n },\n \"mappings\": [\n {\n \"then\": \"The changing table is in the toilet for women.\",\n \"if\": \"changing_table:location=female_toilet\"\n },\n {\n \"then\": \"The changing table is in the toilet for men.\",\n \"if\": \"changing_table:location=male_toilet\"\n },\n {\n \"if\": \"changing_table:location=wheelchair_toilet\",\n \"then\": \"The changing table is in the toilet for wheelchair users.\",\n },\n {\n \"if\": \"changing_table:location=dedicated_room\",\n \"then\": \"The changing table is in a dedicated room. \",\n }\n ],\n \"id\": \"toilet-changing_table:location\"\n },\n```",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson",
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"$ref": "#/definitions/OrTagConfigJson",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{or:TagConfigJson[];}"
},
{
"type": "string"
@ -255,12 +250,10 @@ export default {
"description": "If set, this tag will be evaluated agains the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options.\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson",
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"$ref": "#/definitions/OrTagConfigJson",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{or:TagConfigJson[];}"
},
{
"type": "string"
@ -342,7 +335,7 @@ export default {
"properties": {
"if": {
"$ref": "#/definitions/TagConfigJson",
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation"
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation\n\ntype: tag"
},
"then": {
"description": "Shown if the 'if is fulfilled\nType: rendered",
@ -383,12 +376,10 @@ export default {
"description": "In some cases, multiple taggings exist (e.g. a default assumption, or a commonly mapped abbreviation and a fully written variation).\n\nIn the latter case, a correct text should be shown, but only a single, canonical tagging should be selectable by the user.\nIn this case, one of the mappings can be hiden by setting this flag.\n\nTo demonstrate an example making a default assumption:\n\nmappings: [\n {\n if: \"access=\", -- no access tag present, we assume accessible\n then: \"Accessible to the general public\",\n hideInAnswer: true\n },\n {\n if: \"access=yes\",\n then: \"Accessible to the general public\", -- the user selected this, we add that to OSM\n },\n {\n if: \"access=no\",\n then: \"Not accessible to the public\"\n }\n]\n\n\nFor example, for an operator, we have `operator=Agentschap Natuur en Bos`, which is often abbreviated to `operator=ANB`.\nThen, we would add two mappings:\n{\n if: \"operator=Agentschap Natuur en Bos\" -- the non-abbreviated version which should be uploaded\n then: \"Maintained by Agentschap Natuur en Bos\"\n},\n{\n if: \"operator=ANB\", -- we don't want to upload abbreviations\n then: \"Maintained by Agentschap Natuur en Bos\"\n hideInAnswer: true\n}\n\nHide in answer can also be a tagsfilter, e.g. to make sure an option is only shown when appropriate.\nKeep in mind that this is reverse logic: it will be hidden in the answer if the condition is true, it will thus only show in the case of a mismatch\n\ne.g., for toilets: if \"wheelchair=no\", we know there is no wheelchair dedicated room.\nFor the location of the changing table, the option \"in the wheelchair accessible toilet is weird\", so we write:\n\n{\n \"question\": \"Where is the changing table located?\"\n \"mappings\": [\n {\"if\":\"changing_table:location=female\",\"then\":\"In the female restroom\"},\n {\"if\":\"changing_table:location=male\",\"then\":\"In the male restroom\"},\n {\"if\":\"changing_table:location=wheelchair\",\"then\":\"In the wheelchair accessible restroom\", \"hideInAnswer\": \"wheelchair=no\"},\n\n ]\n}\n\nAlso have a look for the meta-tags\n{\n if: \"operator=Agentschap Natuur en Bos\",\n then: \"Maintained by Agentschap Natuur en Bos\",\n hideInAnswer: \"_country!=be\"\n}",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson",
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"$ref": "#/definitions/OrTagConfigJson",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{or:TagConfigJson[];}"
},
{
"type": [
@ -402,12 +393,10 @@ export default {
"description": "Only applicable if 'multiAnswer' is set.\nThis is for situations such as:\n`accepts:coins=no` where one can select all the possible payment methods. However, we want to make explicit that some options _were not_ selected.\nThis can be done with `ifnot`\nNote that we can not explicitly render this negative case to the user, we cannot show `does _not_ accept coins`.\nIf this is important to your usecase, consider using multiple radiobutton-fields without `multiAnswer`",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson",
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"$ref": "#/definitions/OrTagConfigJson",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{or:TagConfigJson[];}"
},
{
"type": "string"
@ -429,12 +418,10 @@ export default {
"description": "If the searchable selector is picked, mappings with this item will have priority and show up even if the others are hidden\nUse this sparingly",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson",
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"$ref": "#/definitions/OrTagConfigJson",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{or:TagConfigJson[];}"
},
{
"type": "string"

View file

@ -1,15 +1,14 @@
{
"$ref": "#/definitions/TagConfigJson",
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation",
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation\n\ntype: tag",
"definitions": {
"TagConfigJson": {
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation",
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation\n\ntype: tag",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
"type": "object",
"properties": {
"or": {
@ -28,8 +27,7 @@
}
]
},
"AndTagConfigJson": {
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
"{and:TagConfigJson[];}": {
"type": "object",
"properties": {
"and": {

View file

@ -1,15 +1,14 @@
export default {
"$ref": "#/definitions/TagConfigJson",
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation",
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation\n\ntype: tag",
"definitions": {
"TagConfigJson": {
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation",
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation\n\ntype: tag",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
"type": "object",
"properties": {
"or": {
@ -28,8 +27,7 @@ export default {
}
]
},
"AndTagConfigJson": {
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
"{and:TagConfigJson[];}": {
"type": "object",
"properties": {
"and": {

View file

@ -79,12 +79,10 @@
"description": "Only show this tagrendering (or ask the question) if the selected object also matches the tags specified as `condition`.\n\nThis is useful to ask a follow-up question.\nFor example, within toilets, asking _where_ the diaper changing table is is only useful _if_ there is one.\nThis can be done by adding `\"condition\": \"changing_table=yes\"`\n\nA full example would be:\n```json\n {\n \"question\": \"Where is the changing table located?\",\n \"render\": \"The changing table is located at {changing_table:location}\",\n \"condition\": \"changing_table=yes\",\n \"freeform\": {\n \"key\": \"changing_table:location\",\n \"inline\": true\n },\n \"mappings\": [\n {\n \"then\": \"The changing table is in the toilet for women.\",\n \"if\": \"changing_table:location=female_toilet\"\n },\n {\n \"then\": \"The changing table is in the toilet for men.\",\n \"if\": \"changing_table:location=male_toilet\"\n },\n {\n \"if\": \"changing_table:location=wheelchair_toilet\",\n \"then\": \"The changing table is in the toilet for wheelchair users.\",\n },\n {\n \"if\": \"changing_table:location=dedicated_room\",\n \"then\": \"The changing table is in a dedicated room. \",\n }\n ],\n \"id\": \"toilet-changing_table:location\"\n },\n```",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson",
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"$ref": "#/definitions/OrTagConfigJson",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{or:TagConfigJson[];}"
},
{
"type": "string"
@ -95,12 +93,10 @@
"description": "If set, this tag will be evaluated agains the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options.\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson",
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"$ref": "#/definitions/OrTagConfigJson",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{or:TagConfigJson[];}"
},
{
"type": "string"
@ -175,13 +171,12 @@
},
"definitions": {
"TagConfigJson": {
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation",
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation\n\ntype: tag",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
"type": "object",
"properties": {
"or": {
@ -200,8 +195,7 @@
}
]
},
"AndTagConfigJson": {
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
"{and:TagConfigJson[];}": {
"type": "object",
"properties": {
"and": {
@ -216,8 +210,7 @@
],
"additionalProperties": false
},
"OrTagConfigJson": {
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
"{or:TagConfigJson[];}": {
"type": "object",
"properties": {
"or": {

View file

@ -79,12 +79,10 @@ export default {
"description": "Only show this tagrendering (or ask the question) if the selected object also matches the tags specified as `condition`.\n\nThis is useful to ask a follow-up question.\nFor example, within toilets, asking _where_ the diaper changing table is is only useful _if_ there is one.\nThis can be done by adding `\"condition\": \"changing_table=yes\"`\n\nA full example would be:\n```json\n {\n \"question\": \"Where is the changing table located?\",\n \"render\": \"The changing table is located at {changing_table:location}\",\n \"condition\": \"changing_table=yes\",\n \"freeform\": {\n \"key\": \"changing_table:location\",\n \"inline\": true\n },\n \"mappings\": [\n {\n \"then\": \"The changing table is in the toilet for women.\",\n \"if\": \"changing_table:location=female_toilet\"\n },\n {\n \"then\": \"The changing table is in the toilet for men.\",\n \"if\": \"changing_table:location=male_toilet\"\n },\n {\n \"if\": \"changing_table:location=wheelchair_toilet\",\n \"then\": \"The changing table is in the toilet for wheelchair users.\",\n },\n {\n \"if\": \"changing_table:location=dedicated_room\",\n \"then\": \"The changing table is in a dedicated room. \",\n }\n ],\n \"id\": \"toilet-changing_table:location\"\n },\n```",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson",
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"$ref": "#/definitions/OrTagConfigJson",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{or:TagConfigJson[];}"
},
{
"type": "string"
@ -95,12 +93,10 @@ export default {
"description": "If set, this tag will be evaluated agains the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options.\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson",
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"$ref": "#/definitions/OrTagConfigJson",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{or:TagConfigJson[];}"
},
{
"type": "string"
@ -175,13 +171,12 @@ export default {
},
"definitions": {
"TagConfigJson": {
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation",
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation\n\ntype: tag",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
"type": "object",
"properties": {
"or": {
@ -200,8 +195,7 @@ export default {
}
]
},
"AndTagConfigJson": {
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
"{and:TagConfigJson[];}": {
"type": "object",
"properties": {
"and": {
@ -215,8 +209,7 @@ export default {
"and"
]
},
"OrTagConfigJson": {
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
"{or:TagConfigJson[];}": {
"type": "object",
"properties": {
"or": {

View file

@ -31,13 +31,12 @@
],
"definitions": {
"TagConfigJson": {
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation",
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation\n\ntype: tag",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
"type": "object",
"properties": {
"or": {
@ -56,8 +55,7 @@
}
]
},
"AndTagConfigJson": {
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
"{and:TagConfigJson[];}": {
"type": "object",
"properties": {
"and": {
@ -72,8 +70,7 @@
],
"additionalProperties": false
},
"OrTagConfigJson": {
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
"{or:TagConfigJson[];}": {
"type": "object",
"properties": {
"or": {

View file

@ -31,13 +31,12 @@ export default {
],
"definitions": {
"TagConfigJson": {
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation",
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation\n\ntype: tag",
"anyOf": [
{
"$ref": "#/definitions/AndTagConfigJson"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
"type": "object",
"properties": {
"or": {
@ -56,8 +55,7 @@ export default {
}
]
},
"AndTagConfigJson": {
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
"{and:TagConfigJson[];}": {
"type": "object",
"properties": {
"and": {
@ -71,8 +69,7 @@ export default {
"and"
]
},
"OrTagConfigJson": {
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
"{or:TagConfigJson[];}": {
"type": "object",
"properties": {
"or": {

View file

@ -42,6 +42,9 @@ export interface LayerConfigJson {
description?: string | Record<string, string>
/**
*
* Question: Where should the data be fetched from?
*
* This determines where the data for the layer is fetched: from OSM or from an external geojson dataset.
*
* If no 'geojson' is defined, data will be fetched from overpass and the OSM-API.
@ -50,56 +53,61 @@ export interface LayerConfigJson {
*
* Note: a source must always be defined. 'special' is only allowed if this is a builtin-layer
*
* types: Load data with specific tags from OpenStreetMap ; Load data from an external geojson source ;
* group: basic
*/
source:
| "special"
| "special:library"
| (
| {
/**
* Every source must set which tags have to be present in order to load the given layer.
*/
osmTags: TagConfigJson
/**
* The maximum amount of seconds that a tile is allowed to linger in the cache
*/
maxCacheAge?: number
}
| {
/**
* The actual source of the data to load, if loaded via geojson.
*
* # A single geojson-file
* source: {geoJson: "https://my.source.net/some-geo-data.geojson"}
* fetches a geojson from a third party source
*
* # A tiled geojson source
* source: {geoJson: "https://my.source.net/some-tile-geojson-{layer}-{z}-{x}-{y}.geojson", geoJsonZoomLevel: 14}
* to use a tiled geojson source. The web server must offer multiple geojsons. {z}, {x} and {y} are substituted by the location; {layer} is substituted with the id of the loaded layer
*
* Some API's use a BBOX instead of a tile, this can be used by specifying {y_min}, {y_max}, {x_min} and {x_max}
*/
geoJson: string
/**
* To load a tiled geojson layer, set the zoomlevel of the tiles
*/
geoJsonZoomLevel?: number
/**
* Indicates that the upstream geojson data is OSM-derived.
* Useful for e.g. merging or for scripts generating this cache
*/
isOsmCache?: boolean
/**
* Some API's use a mercator-projection (EPSG:900913) instead of WGS84. Set the flag `mercatorCrs: true` in the source for this
*/
mercatorCrs?: boolean
/**
* Some API's have an id-field, but give it a different name.
* Setting this key will rename this field into 'id'
*/
idKey?: string
}
)
| {
/**
* question: Which tags must be present on the feature to show it in this layer?
*
* Every source must set which tags have to be present in order to load the given layer.
*/
osmTags: TagConfigJson
/**
* question: How long (in seconds) is the data allowed to remain cached until it must be refreshed?
* The maximum amount of seconds that a tile is allowed to linger in the cache
*
* type: nat
*/
maxCacheAge?: number
}
| {
/**
* The actual source of the data to load, if loaded via geojson.
*
* # A single geojson-file
* source: {geoJson: "https://my.source.net/some-geo-data.geojson"}
* fetches a geojson from a third party source
*
* # A tiled geojson source
* source: {geoJson: "https://my.source.net/some-tile-geojson-{layer}-{z}-{x}-{y}.geojson", geoJsonZoomLevel: 14}
* to use a tiled geojson source. The web server must offer multiple geojsons. {z}, {x} and {y} are substituted by the location; {layer} is substituted with the id of the loaded layer
*
* Some API's use a BBOX instead of a tile, this can be used by specifying {y_min}, {y_max}, {x_min} and {x_max}
*/
geoJson: string
/**
* To load a tiled geojson layer, set the zoomlevel of the tiles
*/
geoJsonZoomLevel?: number
/**
* Indicates that the upstream geojson data is OSM-derived.
* Useful for e.g. merging or for scripts generating this cache
*/
isOsmCache?: boolean
/**
* Some API's use a mercator-projection (EPSG:900913) instead of WGS84. Set the flag `mercatorCrs: true` in the source for this
*/
mercatorCrs?: boolean
/**
* Some API's have an id-field, but give it a different name.
* Setting this key will rename this field into 'id'
*/
idKey?: string
}
/**
*
@ -158,8 +166,8 @@ export interface LayerConfigJson {
* This prevents cluttering the map with thousands of parkings if one is looking to an entire city.
*
* Default: 0
*
* group: basic
* type: nat
* question: At what zoom level should features of the layer be shown?
* ifunset: Always load this layer, even if the entire world is in view.
*/

View file

@ -1,20 +1,14 @@
/**
* The main representation of Tags.
* See https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation
*
* type: tag
*/
export type TagConfigJson = string | AndTagConfigJson | OrTagConfigJson
/**
* Chain many tags, to match, all of these should be true
* See https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation
*/
export type OrTagConfigJson = {
or: TagConfigJson[]
}
/**
* Chain many tags, to match, a single of these should be true
* See https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation
*/
export type AndTagConfigJson = {
and: TagConfigJson[]
}
export type TagConfigJson =
| string
| {
and: TagConfigJson[]
}
| {
or: TagConfigJson[]
}

View file

@ -11,7 +11,7 @@
import {Utils} from "../../Utils";
export let type: ValidatorType
export let feedback: UIEventSource<Translation> | undefined = undefined
export let feedback: UIEventSource<Translation> | undefined
export let getCountry: () => string | undefined
export let placeholder: string | Translation | undefined
export let unit: Unit = undefined
@ -53,7 +53,7 @@
validator = Validators.get(type ?? "string")
_placeholder = placeholder ?? validator?.getPlaceholder() ?? type
feedback = feedback?.setData(validator?.getFeedback(_value.data, getCountry))
feedback?.setData(validator?.getFeedback(_value.data, getCountry))
initValueAndDenom()
}
@ -62,8 +62,8 @@
// Update the value stores
const v = _value.data
if (!validator?.isValid(v, getCountry) || v === "") {
value.setData(undefined)
feedback?.setData(validator?.getFeedback(v, getCountry))
value.setData("")
return
}

View file

@ -24,8 +24,7 @@
inline = config.freeform?.inline
}
export let feedback: UIEventSource<Translation> = new UIEventSource<Translation>(undefined)
export let feedback: UIEventSource<Translation>
let dispatch = createEventDispatcher<{ selected, submit }>()
onDestroy(
value.addCallbackD(() => {

View file

@ -47,4 +47,11 @@ export default class EditLayerState {
!path.some((part, i) => !(sch.path.length > path.length && sch.path[i] === part))
)
}
public getSchema(path: string[]) {
return this.schema.filter(
(sch) =>
!path.some((part, i) => !(sch.path.length == path.length && sch.path[i] === part))
)
}
}

View file

@ -0,0 +1,62 @@
<script lang="ts">
import EditLayerState from "./EditLayerState";
import type {ConfigMeta} from "./configMeta";
import {UIEventSource} from "../../Logic/UIEventSource";
import type {
QuestionableTagRenderingConfigJson
} from "../../Models/ThemeConfig/Json/QuestionableTagRenderingConfigJson";
import TagRenderingEditable from "../Popup/TagRendering/TagRenderingEditable.svelte";
import TagRenderingConfig from "../../Models/ThemeConfig/TagRenderingConfig";
import {onDestroy} from "svelte";
import SchemaBasedInput from "./SchemaBasedInput.svelte";
/**
* If 'types' is defined: allow the user to pick one of the types to input.
*/
export let state: EditLayerState
export let path: (string | number)[] = []
export let schema: ConfigMeta
let value = new UIEventSource<string>(undefined)
const configJson: QuestionableTagRenderingConfigJson = {
id: "TYPE_OF:" + path.join("_"),
question: "Which subcategory is needed?",
questionHint: schema.description,
mappings: schema.hints.types.split(";").map(opt => opt.trim()).filter(opt => opt.length > 0).map((opt, i) => ({
if: "value=" + i,
then: opt
}))
}
const config = new TagRenderingConfig(configJson, "config based on " + schema.path.join("."))
let tags = new UIEventSource<Record<string, string>>({})
let chosenOption: number = undefined
let subSchemas: ConfigMeta[] = []
onDestroy(tags.addCallback(tags => {
chosenOption = Number(tags["value"])
const type = schema.type[chosenOption]
const cleanPath = <string[]> path.filter(p => typeof p === "string")
for (const crumble of Object.keys(type.properties)) {
console.log("Searching entries for", [...cleanPath, crumble])
subSchemas.push(...(state.getSchema([...cleanPath, crumble])))
}
}))
</script>
<div>
<TagRenderingEditable {config} showQuestionIfUnknown={true} {state} {tags}/>
</div>
{#if chosenOption !== undefined}
<div class="pl-2 border-2 border-dashed border-gray-300 flex flex-col gap-y-2">
{#each subSchemas as subschema}
{JSON.stringify(subschema)}
<SchemaBasedInput {state} schema={subschema} path={[...path]}></SchemaBasedInput>
{/each}
</div>
{/if}

View file

@ -1,7 +1,6 @@
<script lang="ts">
import {UIEventSource} from "../../Logic/UIEventSource";
import {Translation} from "../i18n/Translation";
import type {ConfigMeta} from "./configMeta";
import TagRenderingEditable from "../Popup/TagRendering/TagRenderingEditable.svelte";
import TagRenderingConfig from "../../Models/ThemeConfig/TagRenderingConfig";
@ -15,7 +14,7 @@
export let path: (string | number)[] = []
export let schema: ConfigMeta
let value = new UIEventSource<string>(undefined)
let feedback = new UIEventSource<Translation>(undefined)
const configJson: QuestionableTagRenderingConfigJson = {
id: path.join("_"),
@ -29,7 +28,12 @@
}
}
if (!schema.required) {
if (schema.hints.default) {
configJson.mappings = [{
if: "value=", // +schema.hints.default,
then: schema.path.at(-1) + " is not set. The default value <b>" + schema.hints.default + "</b> will be used. " + (schema.hints.ifunset ?? ""),
}]
} else if (!schema.required) {
configJson.mappings = [{
if: "value=",
then: schema.path.at(-1) + " is not set. " + (schema.hints.ifunset ?? ""),

View file

@ -3,15 +3,18 @@
import SchemaBasedField from "./SchemaBasedField.svelte";
import EditLayerState from "./EditLayerState";
import SchemaBasedArray from "./SchemaBasedArray.svelte";
import SchemaBaseMultiType from "./SchemaBaseMultiType.svelte";
export let schema: ConfigMeta
export let state: EditLayerState
export let path : (string | number)[] = []
export let path: (string | number)[] = []
</script>
{#if schema.type === "array"}
<SchemaBasedArray {path} {state} {schema}/>
{:else if schema.hints.types}
<SchemaBaseMultiType {path} {state} {schema}></SchemaBaseMultiType>
{:else}
<SchemaBasedField {path} {state} {schema}/>
{/if}

View file

@ -6,9 +6,14 @@ export interface ConfigMeta {
hints: {
group?: string
typehint?: string
/**
* If multiple subcategories can be chosen
*/
types?: string
question?: string
ifunset?: string
inline?: string
default?: string
}
required: boolean
description: string

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -129,14 +129,15 @@
"mappings",
"if"
],
"required": false,
"hints": {},
"required": true,
"hints": {
"typehint": "tag"
},
"type": [
{
"$ref": "#/definitions/AndTagConfigJson"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
"type": "object",
"properties": {
"or": {
@ -154,27 +155,7 @@
"type": "string"
}
],
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation"
},
{
"path": [
"mappings",
"if"
],
"required": false,
"hints": {},
"type": "object",
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
},
{
"path": [
"mappings",
"if"
],
"required": false,
"hints": {},
"type": "object",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation\n"
},
{
"path": [
@ -260,12 +241,10 @@
"hints": {},
"type": [
{
"$ref": "#/definitions/AndTagConfigJson",
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"$ref": "#/definitions/OrTagConfigJson",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{or:TagConfigJson[];}"
},
{
"type": [
@ -276,16 +255,6 @@
],
"description": "In some cases, multiple taggings exist (e.g. a default assumption, or a commonly mapped abbreviation and a fully written variation).\n\nIn the latter case, a correct text should be shown, but only a single, canonical tagging should be selectable by the user.\nIn this case, one of the mappings can be hiden by setting this flag.\n\nTo demonstrate an example making a default assumption:\n\nmappings: [\n {\n if: \"access=\", -- no access tag present, we assume accessible\n then: \"Accessible to the general public\",\n hideInAnswer: true\n },\n {\n if: \"access=yes\",\n then: \"Accessible to the general public\", -- the user selected this, we add that to OSM\n },\n {\n if: \"access=no\",\n then: \"Not accessible to the public\"\n }\n]\n\n\nFor example, for an operator, we have `operator=Agentschap Natuur en Bos`, which is often abbreviated to `operator=ANB`.\nThen, we would add two mappings:\n{\n if: \"operator=Agentschap Natuur en Bos\" -- the non-abbreviated version which should be uploaded\n then: \"Maintained by Agentschap Natuur en Bos\"\n},\n{\n if: \"operator=ANB\", -- we don't want to upload abbreviations\n then: \"Maintained by Agentschap Natuur en Bos\"\n hideInAnswer: true\n}\n\nHide in answer can also be a tagsfilter, e.g. to make sure an option is only shown when appropriate.\nKeep in mind that this is reverse logic: it will be hidden in the answer if the condition is true, it will thus only show in the case of a mismatch\n\ne.g., for toilets: if \"wheelchair=no\", we know there is no wheelchair dedicated room.\nFor the location of the changing table, the option \"in the wheelchair accessible toilet is weird\", so we write:\n\n{\n \"question\": \"Where is the changing table located?\"\n \"mappings\": [\n {\"if\":\"changing_table:location=female\",\"then\":\"In the female restroom\"},\n {\"if\":\"changing_table:location=male\",\"then\":\"In the male restroom\"},\n {\"if\":\"changing_table:location=wheelchair\",\"then\":\"In the wheelchair accessible restroom\", \"hideInAnswer\": \"wheelchair=no\"},\n\n ]\n}\n\nAlso have a look for the meta-tags\n{\n if: \"operator=Agentschap Natuur en Bos\",\n then: \"Maintained by Agentschap Natuur en Bos\",\n hideInAnswer: \"_country!=be\"\n}"
},
{
"path": [
"mappings",
"hideInAnswer"
],
"required": false,
"hints": {},
"type": "object",
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
},
{
"path": [
"mappings",
@ -293,13 +262,14 @@
"and"
],
"required": false,
"hints": {},
"hints": {
"typehint": "tag"
},
"type": [
{
"$ref": "#/definitions/AndTagConfigJson"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
"type": "object",
"properties": {
"or": {
@ -317,28 +287,7 @@
"type": "string"
}
],
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation"
},
{
"path": [
"mappings",
"hideInAnswer",
"and"
],
"required": false,
"hints": {},
"type": "object",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
},
{
"path": [
"mappings",
"hideInAnswer"
],
"required": false,
"hints": {},
"type": "object",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation\n"
},
{
"path": [
@ -347,13 +296,14 @@
"or"
],
"required": false,
"hints": {},
"hints": {
"typehint": "tag"
},
"type": [
{
"$ref": "#/definitions/AndTagConfigJson"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
"type": "object",
"properties": {
"or": {
@ -371,29 +321,7 @@
"type": "string"
}
],
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation"
},
{
"path": [
"mappings",
"hideInAnswer",
"or"
],
"required": false,
"hints": {},
"type": "object",
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
},
{
"path": [
"mappings",
"hideInAnswer",
"or"
],
"required": false,
"hints": {},
"type": "object",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation\n"
},
{
"path": [
@ -404,12 +332,10 @@
"hints": {},
"type": [
{
"$ref": "#/definitions/AndTagConfigJson",
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"$ref": "#/definitions/OrTagConfigJson",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{or:TagConfigJson[];}"
},
{
"type": "string"
@ -417,16 +343,6 @@
],
"description": "Only applicable if 'multiAnswer' is set.\nThis is for situations such as:\n`accepts:coins=no` where one can select all the possible payment methods. However, we want to make explicit that some options _were not_ selected.\nThis can be done with `ifnot`\nNote that we can not explicitly render this negative case to the user, we cannot show `does _not_ accept coins`.\nIf this is important to your usecase, consider using multiple radiobutton-fields without `multiAnswer`"
},
{
"path": [
"mappings",
"ifnot"
],
"required": false,
"hints": {},
"type": "object",
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
},
{
"path": [
"mappings",
@ -434,13 +350,14 @@
"and"
],
"required": false,
"hints": {},
"hints": {
"typehint": "tag"
},
"type": [
{
"$ref": "#/definitions/AndTagConfigJson"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
"type": "object",
"properties": {
"or": {
@ -458,28 +375,7 @@
"type": "string"
}
],
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation"
},
{
"path": [
"mappings",
"ifnot",
"and"
],
"required": false,
"hints": {},
"type": "object",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
},
{
"path": [
"mappings",
"ifnot"
],
"required": false,
"hints": {},
"type": "object",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation\n"
},
{
"path": [
@ -488,13 +384,14 @@
"or"
],
"required": false,
"hints": {},
"hints": {
"typehint": "tag"
},
"type": [
{
"$ref": "#/definitions/AndTagConfigJson"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
"type": "object",
"properties": {
"or": {
@ -512,29 +409,7 @@
"type": "string"
}
],
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation"
},
{
"path": [
"mappings",
"ifnot",
"or"
],
"required": false,
"hints": {},
"type": "object",
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
},
{
"path": [
"mappings",
"ifnot",
"or"
],
"required": false,
"hints": {},
"type": "object",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation\n"
},
{
"path": [
@ -555,12 +430,10 @@
"hints": {},
"type": [
{
"$ref": "#/definitions/AndTagConfigJson",
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"$ref": "#/definitions/OrTagConfigJson",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{or:TagConfigJson[];}"
},
{
"type": "string"
@ -568,16 +441,6 @@
],
"description": "If the searchable selector is picked, mappings with this item will have priority and show up even if the others are hidden\nUse this sparingly"
},
{
"path": [
"mappings",
"priorityIf"
],
"required": false,
"hints": {},
"type": "object",
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
},
{
"path": [
"mappings",
@ -585,13 +448,14 @@
"and"
],
"required": false,
"hints": {},
"hints": {
"typehint": "tag"
},
"type": [
{
"$ref": "#/definitions/AndTagConfigJson"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
"type": "object",
"properties": {
"or": {
@ -609,28 +473,7 @@
"type": "string"
}
],
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation"
},
{
"path": [
"mappings",
"priorityIf",
"and"
],
"required": false,
"hints": {},
"type": "object",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
},
{
"path": [
"mappings",
"priorityIf"
],
"required": false,
"hints": {},
"type": "object",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation\n"
},
{
"path": [
@ -639,13 +482,14 @@
"or"
],
"required": false,
"hints": {},
"hints": {
"typehint": "tag"
},
"type": [
{
"$ref": "#/definitions/AndTagConfigJson"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
"type": "object",
"properties": {
"or": {
@ -663,29 +507,7 @@
"type": "string"
}
],
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation"
},
{
"path": [
"mappings",
"priorityIf",
"or"
],
"required": false,
"hints": {},
"type": "object",
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
},
{
"path": [
"mappings",
"priorityIf",
"or"
],
"required": false,
"hints": {},
"type": "object",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation\n"
},
{
"path": [
@ -802,12 +624,10 @@
"hints": {},
"type": [
{
"$ref": "#/definitions/AndTagConfigJson",
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"$ref": "#/definitions/OrTagConfigJson",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{or:TagConfigJson[];}"
},
{
"type": "string"
@ -815,28 +635,20 @@
],
"description": "Only show this tagrendering (or ask the question) if the selected object also matches the tags specified as `condition`.\n\nThis is useful to ask a follow-up question.\nFor example, within toilets, asking _where_ the diaper changing table is is only useful _if_ there is one.\nThis can be done by adding `\"condition\": \"changing_table=yes\"`\n\nA full example would be:\n```json\n {\n \"question\": \"Where is the changing table located?\",\n \"render\": \"The changing table is located at {changing_table:location}\",\n \"condition\": \"changing_table=yes\",\n \"freeform\": {\n \"key\": \"changing_table:location\",\n \"inline\": true\n },\n \"mappings\": [\n {\n \"then\": \"The changing table is in the toilet for women.\",\n \"if\": \"changing_table:location=female_toilet\"\n },\n {\n \"then\": \"The changing table is in the toilet for men.\",\n \"if\": \"changing_table:location=male_toilet\"\n },\n {\n \"if\": \"changing_table:location=wheelchair_toilet\",\n \"then\": \"The changing table is in the toilet for wheelchair users.\",\n },\n {\n \"if\": \"changing_table:location=dedicated_room\",\n \"then\": \"The changing table is in a dedicated room. \",\n }\n ],\n \"id\": \"toilet-changing_table:location\"\n },\n```"
},
{
"path": [
"condition"
],
"required": false,
"hints": {},
"type": "object",
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
},
{
"path": [
"condition",
"and"
],
"required": false,
"hints": {},
"hints": {
"typehint": "tag"
},
"type": [
{
"$ref": "#/definitions/AndTagConfigJson"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
"type": "object",
"properties": {
"or": {
@ -854,26 +666,7 @@
"type": "string"
}
],
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation"
},
{
"path": [
"condition",
"and"
],
"required": false,
"hints": {},
"type": "object",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
},
{
"path": [
"condition"
],
"required": false,
"hints": {},
"type": "object",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation\n"
},
{
"path": [
@ -881,13 +674,14 @@
"or"
],
"required": false,
"hints": {},
"hints": {
"typehint": "tag"
},
"type": [
{
"$ref": "#/definitions/AndTagConfigJson"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
"type": "object",
"properties": {
"or": {
@ -905,27 +699,7 @@
"type": "string"
}
],
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation"
},
{
"path": [
"condition",
"or"
],
"required": false,
"hints": {},
"type": "object",
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
},
{
"path": [
"condition",
"or"
],
"required": false,
"hints": {},
"type": "object",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation\n"
},
{
"path": [
@ -935,12 +709,10 @@
"hints": {},
"type": [
{
"$ref": "#/definitions/AndTagConfigJson",
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"$ref": "#/definitions/OrTagConfigJson",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{or:TagConfigJson[];}"
},
{
"type": "string"
@ -948,28 +720,20 @@
],
"description": "If set, this tag will be evaluated agains the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options.\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_"
},
{
"path": [
"metacondition"
],
"required": false,
"hints": {},
"type": "object",
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
},
{
"path": [
"metacondition",
"and"
],
"required": false,
"hints": {},
"hints": {
"typehint": "tag"
},
"type": [
{
"$ref": "#/definitions/AndTagConfigJson"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
"type": "object",
"properties": {
"or": {
@ -987,26 +751,7 @@
"type": "string"
}
],
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation"
},
{
"path": [
"metacondition",
"and"
],
"required": false,
"hints": {},
"type": "object",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
},
{
"path": [
"metacondition"
],
"required": false,
"hints": {},
"type": "object",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation\n"
},
{
"path": [
@ -1014,13 +759,14 @@
"or"
],
"required": false,
"hints": {},
"hints": {
"typehint": "tag"
},
"type": [
{
"$ref": "#/definitions/AndTagConfigJson"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
"type": "object",
"properties": {
"or": {
@ -1038,26 +784,6 @@
"type": "string"
}
],
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation"
},
{
"path": [
"metacondition",
"or"
],
"required": false,
"hints": {},
"type": "object",
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
},
{
"path": [
"metacondition",
"or"
],
"required": false,
"hints": {},
"type": "object",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation\n"
}
]

View file

@ -111,12 +111,10 @@
"hints": {},
"type": [
{
"$ref": "#/definitions/AndTagConfigJson",
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"$ref": "#/definitions/OrTagConfigJson",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{or:TagConfigJson[];}"
},
{
"type": "string"
@ -124,28 +122,20 @@
],
"description": "Only show this tagrendering (or ask the question) if the selected object also matches the tags specified as `condition`.\n\nThis is useful to ask a follow-up question.\nFor example, within toilets, asking _where_ the diaper changing table is is only useful _if_ there is one.\nThis can be done by adding `\"condition\": \"changing_table=yes\"`\n\nA full example would be:\n```json\n {\n \"question\": \"Where is the changing table located?\",\n \"render\": \"The changing table is located at {changing_table:location}\",\n \"condition\": \"changing_table=yes\",\n \"freeform\": {\n \"key\": \"changing_table:location\",\n \"inline\": true\n },\n \"mappings\": [\n {\n \"then\": \"The changing table is in the toilet for women.\",\n \"if\": \"changing_table:location=female_toilet\"\n },\n {\n \"then\": \"The changing table is in the toilet for men.\",\n \"if\": \"changing_table:location=male_toilet\"\n },\n {\n \"if\": \"changing_table:location=wheelchair_toilet\",\n \"then\": \"The changing table is in the toilet for wheelchair users.\",\n },\n {\n \"if\": \"changing_table:location=dedicated_room\",\n \"then\": \"The changing table is in a dedicated room. \",\n }\n ],\n \"id\": \"toilet-changing_table:location\"\n },\n```"
},
{
"path": [
"condition"
],
"required": false,
"hints": {},
"type": "object",
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
},
{
"path": [
"condition",
"and"
],
"required": false,
"hints": {},
"hints": {
"typehint": "tag"
},
"type": [
{
"$ref": "#/definitions/AndTagConfigJson"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
"type": "object",
"properties": {
"or": {
@ -163,26 +153,7 @@
"type": "string"
}
],
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation"
},
{
"path": [
"condition",
"and"
],
"required": false,
"hints": {},
"type": "object",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
},
{
"path": [
"condition"
],
"required": false,
"hints": {},
"type": "object",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation\n"
},
{
"path": [
@ -190,13 +161,14 @@
"or"
],
"required": false,
"hints": {},
"hints": {
"typehint": "tag"
},
"type": [
{
"$ref": "#/definitions/AndTagConfigJson"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
"type": "object",
"properties": {
"or": {
@ -214,27 +186,7 @@
"type": "string"
}
],
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation"
},
{
"path": [
"condition",
"or"
],
"required": false,
"hints": {},
"type": "object",
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
},
{
"path": [
"condition",
"or"
],
"required": false,
"hints": {},
"type": "object",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation\n"
},
{
"path": [
@ -244,12 +196,10 @@
"hints": {},
"type": [
{
"$ref": "#/definitions/AndTagConfigJson",
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"$ref": "#/definitions/OrTagConfigJson",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"$ref": "#/definitions/{or:TagConfigJson[];}"
},
{
"type": "string"
@ -257,28 +207,20 @@
],
"description": "If set, this tag will be evaluated agains the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options.\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_"
},
{
"path": [
"metacondition"
],
"required": false,
"hints": {},
"type": "object",
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
},
{
"path": [
"metacondition",
"and"
],
"required": false,
"hints": {},
"hints": {
"typehint": "tag"
},
"type": [
{
"$ref": "#/definitions/AndTagConfigJson"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
"type": "object",
"properties": {
"or": {
@ -296,26 +238,7 @@
"type": "string"
}
],
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation"
},
{
"path": [
"metacondition",
"and"
],
"required": false,
"hints": {},
"type": "object",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
},
{
"path": [
"metacondition"
],
"required": false,
"hints": {},
"type": "object",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation\n"
},
{
"path": [
@ -323,13 +246,14 @@
"or"
],
"required": false,
"hints": {},
"hints": {
"typehint": "tag"
},
"type": [
{
"$ref": "#/definitions/AndTagConfigJson"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
"type": "object",
"properties": {
"or": {
@ -347,27 +271,7 @@
"type": "string"
}
],
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation"
},
{
"path": [
"metacondition",
"or"
],
"required": false,
"hints": {},
"type": "object",
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
},
{
"path": [
"metacondition",
"or"
],
"required": false,
"hints": {},
"type": "object",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation\n"
},
{
"path": [
@ -402,14 +306,15 @@
"mappings",
"if"
],
"required": false,
"hints": {},
"required": true,
"hints": {
"typehint": "tag"
},
"type": [
{
"$ref": "#/definitions/AndTagConfigJson"
"$ref": "#/definitions/{and:TagConfigJson[];}"
},
{
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation",
"type": "object",
"properties": {
"or": {
@ -427,27 +332,7 @@
"type": "string"
}
],
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation"
},
{
"path": [
"mappings",
"if"
],
"required": false,
"hints": {},
"type": "object",
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
},
{
"path": [
"mappings",
"if"
],
"required": false,
"hints": {},
"type": "object",
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation\n"
},
{
"path": [

View file

@ -638,6 +638,17 @@ video {
border-width: 0;
}
.not-sr-only {
position: static;
width: auto;
height: auto;
padding: 0;
margin: 0;
overflow: visible;
clip: auto;
white-space: normal;
}
.pointer-events-none {
pointer-events: none;
}
@ -687,6 +698,13 @@ video {
position: sticky;
}
.-inset-1 {
top: -0.25rem;
right: -0.25rem;
bottom: -0.25rem;
left: -0.25rem;
}
.left-24 {
left: 6rem;
}
@ -751,6 +769,10 @@ video {
isolation: isolate;
}
.isolation-auto {
isolation: auto;
}
.float-right {
float: right;
}
@ -979,14 +1001,62 @@ video {
display: table;
}
.inline-table {
display: inline-table;
}
.table-caption {
display: table-caption;
}
.table-cell {
display: table-cell;
}
.table-column {
display: table-column;
}
.table-column-group {
display: table-column-group;
}
.table-footer-group {
display: table-footer-group;
}
.table-header-group {
display: table-header-group;
}
.table-row-group {
display: table-row-group;
}
.table-row {
display: table-row;
}
.flow-root {
display: flow-root;
}
.grid {
display: grid;
}
.inline-grid {
display: inline-grid;
}
.contents {
display: contents;
}
.list-item {
display: list-item;
}
.hidden {
display: none;
}
@ -1193,6 +1263,10 @@ video {
flex-shrink: 0;
}
.shrink {
flex-shrink: 1;
}
.grow {
flex-grow: 1;
}
@ -1259,6 +1333,11 @@ video {
resize: both;
}
.appearance-none {
-webkit-appearance: none;
appearance: none;
}
.grid-cols-1 {
grid-template-columns: repeat(1, minmax(0, 1fr));
}
@ -1355,6 +1434,34 @@ video {
column-gap: 0.25rem;
}
.space-y-reverse > :not([hidden]) ~ :not([hidden]) {
--tw-space-y-reverse: 1;
}
.space-x-reverse > :not([hidden]) ~ :not([hidden]) {
--tw-space-x-reverse: 1;
}
.divide-x > :not([hidden]) ~ :not([hidden]) {
--tw-divide-x-reverse: 0;
border-right-width: calc(1px * var(--tw-divide-x-reverse));
border-left-width: calc(1px * calc(1 - var(--tw-divide-x-reverse)));
}
.divide-y > :not([hidden]) ~ :not([hidden]) {
--tw-divide-y-reverse: 0;
border-top-width: calc(1px * calc(1 - var(--tw-divide-y-reverse)));
border-bottom-width: calc(1px * var(--tw-divide-y-reverse));
}
.divide-y-reverse > :not([hidden]) ~ :not([hidden]) {
--tw-divide-y-reverse: 1;
}
.divide-x-reverse > :not([hidden]) ~ :not([hidden]) {
--tw-divide-x-reverse: 1;
}
.self-start {
align-self: flex-start;
}
@ -1393,6 +1500,10 @@ video {
text-overflow: ellipsis;
}
.text-clip {
text-overflow: clip;
}
.break-normal {
overflow-wrap: normal;
word-break: normal;
@ -1435,6 +1546,37 @@ video {
border-bottom-left-radius: 0.25rem;
}
.rounded-t {
border-top-left-radius: 0.25rem;
border-top-right-radius: 0.25rem;
}
.rounded-r {
border-top-right-radius: 0.25rem;
border-bottom-right-radius: 0.25rem;
}
.rounded-b {
border-bottom-right-radius: 0.25rem;
border-bottom-left-radius: 0.25rem;
}
.rounded-tl {
border-top-left-radius: 0.25rem;
}
.rounded-tr {
border-top-right-radius: 0.25rem;
}
.rounded-br {
border-bottom-right-radius: 0.25rem;
}
.rounded-bl {
border-bottom-left-radius: 0.25rem;
}
.border {
border-width: 1px;
}
@ -1447,6 +1589,20 @@ video {
border-width: 2px;
}
.border-8 {
border-width: 8px;
}
.border-x {
border-left-width: 1px;
border-right-width: 1px;
}
.border-y {
border-top-width: 1px;
border-bottom-width: 1px;
}
.border-b {
border-bottom-width: 1px;
}
@ -1455,12 +1611,20 @@ video {
border-bottom-width: 2px;
}
.border-dashed {
border-style: dashed;
.border-t {
border-top-width: 1px;
}
.border-dotted {
border-style: dotted;
.border-r {
border-right-width: 1px;
}
.border-l {
border-left-width: 1px;
}
.border-dashed {
border-style: dashed;
}
.border-black {
@ -1478,16 +1642,16 @@ video {
border-color: rgb(209 213 219 / var(--tw-border-opacity));
}
.border-gray-400 {
--tw-border-opacity: 1;
border-color: rgb(156 163 175 / var(--tw-border-opacity));
}
.border-gray-600 {
--tw-border-opacity: 1;
border-color: rgb(75 85 99 / var(--tw-border-opacity));
}
.border-gray-400 {
--tw-border-opacity: 1;
border-color: rgb(156 163 175 / var(--tw-border-opacity));
}
.border-gray-500 {
--tw-border-opacity: 1;
border-color: rgb(107 114 128 / var(--tw-border-opacity));
@ -1527,6 +1691,10 @@ video {
background-color: rgb(220 38 38 / var(--tw-bg-opacity));
}
.bg-repeat {
background-repeat: repeat;
}
.p-8 {
padding: 2rem;
}
@ -1599,10 +1767,6 @@ video {
padding-top: 0px;
}
.pt-2 {
padding-top: 0.5rem;
}
.pl-5 {
padding-left: 1.25rem;
}
@ -1702,15 +1866,61 @@ video {
text-transform: lowercase;
}
.capitalize {
text-transform: capitalize;
}
.normal-case {
text-transform: none;
}
.italic {
font-style: italic;
}
.not-italic {
font-style: normal;
}
.normal-nums {
font-variant-numeric: normal;
}
.ordinal {
--tw-ordinal: ordinal;
font-variant-numeric: var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction);
}
.slashed-zero {
--tw-slashed-zero: slashed-zero;
font-variant-numeric: var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction);
}
.lining-nums {
--tw-numeric-figure: lining-nums;
font-variant-numeric: var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction);
}
.oldstyle-nums {
--tw-numeric-figure: oldstyle-nums;
font-variant-numeric: var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction);
}
.proportional-nums {
--tw-numeric-spacing: proportional-nums;
font-variant-numeric: var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction);
}
.tabular-nums {
--tw-numeric-spacing: tabular-nums;
font-variant-numeric: var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction);
}
.diagonal-fractions {
--tw-numeric-fraction: diagonal-fractions;
font-variant-numeric: var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction);
}
.leading-none {
line-height: 1;
}
@ -1751,11 +1961,20 @@ video {
text-decoration-line: line-through;
}
.no-underline {
text-decoration-line: none;
}
.antialiased {
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.subpixel-antialiased {
-webkit-font-smoothing: auto;
-moz-osx-font-smoothing: auto;
}
.opacity-50 {
opacity: 0.5;
}
@ -1776,6 +1995,10 @@ video {
box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
}
.ring-inset {
--tw-ring-inset: inset;
}
.blur {
--tw-blur: blur(8px);
-webkit-filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
@ -1794,6 +2017,12 @@ video {
filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
}
.drop-shadow {
--tw-drop-shadow: drop-shadow(0 1px 2px rgb(0 0 0 / 0.1)) drop-shadow(0 1px 1px rgb(0 0 0 / 0.06));
-webkit-filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
}
.grayscale {
--tw-grayscale: grayscale(100%);
-webkit-filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
@ -1822,6 +2051,35 @@ video {
filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow) !important;
}
.backdrop-blur {
--tw-backdrop-blur: blur(8px);
-webkit-backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);
backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);
}
.backdrop-grayscale {
--tw-backdrop-grayscale: grayscale(100%);
-webkit-backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);
backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);
}
.backdrop-invert {
--tw-backdrop-invert: invert(100%);
-webkit-backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);
backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);
}
.backdrop-sepia {
--tw-backdrop-sepia: sepia(100%);
-webkit-backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);
backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);
}
.backdrop-filter {
-webkit-backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);
backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);
}
.transition-colors {
transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
@ -1840,6 +2098,10 @@ video {
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}
.\[a-zA-Z0-9\:_\] {
a-z-a--z0-9: ;
}
.\[key\:string\] {
key: string;
}
@ -2603,10 +2865,6 @@ a.link-underline {
flex-wrap: nowrap;
}
.md\:border-t-2 {
border-top-width: 2px;
}
.md\:p-6 {
padding: 1.5rem;
}

View file

@ -3,12 +3,12 @@ import { readFileSync, writeFileSync } from "fs"
import { JsonSchema } from "../UI/Studio/jsonSchema"
function WalkScheme<T>(
onEach: (schemePart: JsonSchema) => T,
onEach: (schemePart: JsonSchema, path: string[]) => T,
scheme: JsonSchema,
fullScheme: JsonSchema & { definitions?: any } = undefined,
path: string[] = [],
isHandlingReference = [],
required?: string[]
required: string[]
): { path: string[]; required: boolean; t: T }[] {
const results: { path: string[]; required: boolean; t: T }[] = []
if (scheme === undefined) {
@ -26,18 +26,23 @@ function WalkScheme<T>(
return []
}
const loadedScheme = fullScheme.definitions[definitionName]
return WalkScheme(onEach, loadedScheme, fullScheme, path, [
...isHandlingReference,
definitionName,
])
return WalkScheme(
onEach,
loadedScheme,
fullScheme,
path,
[...isHandlingReference, definitionName],
required
)
}
fullScheme = fullScheme ?? scheme
let t = onEach(scheme)
let t = onEach(scheme, path)
if (t !== undefined) {
const isRequired = required?.indexOf(path.at(-1)) >= 0
results.push({
path,
required: required?.indexOf(path.at(-1)) >= 0,
required: isRequired,
t,
})
}
@ -46,7 +51,7 @@ function WalkScheme<T>(
if (v === undefined) {
return
}
results.push(...WalkScheme(onEach, v, fullScheme, path, isHandlingReference))
results.push(...WalkScheme(onEach, v, fullScheme, path, isHandlingReference, v.required))
}
function walkEach(scheme: JsonSchema[]) {
@ -87,7 +92,7 @@ function WalkScheme<T>(
}
function addMetafields(fieldnames: string[], fullSchema: JsonSchema) {
return WalkScheme((schemePart) => {
const onEach = (schemePart, path) => {
if (schemePart.description === undefined) {
return
}
@ -113,8 +118,31 @@ function addMetafields(fieldnames: string[], fullSchema: JsonSchema) {
}
}
if (hints["types"]) {
const numberOfExpectedSubtypes = hints["types"].split(";").length
if (!Array.isArray(type)) {
throw (
"At " +
path.join(".") +
"Invalid hint in the documentation: `types` indicates that there are " +
numberOfExpectedSubtypes +
" subtypes, but object does not support subtypes. Did you mean `type` instead?\n\tTypes are: " +
hints["types"]
)
}
const numberOfActualTypes = type.length
if (numberOfActualTypes !== numberOfExpectedSubtypes) {
throw `At ${path.join(
"."
)}\nInvalid hint in the documentation: \`types\` indicates that there are ${numberOfExpectedSubtypes} subtypes, but there are ${numberOfActualTypes} subtypes
\tTypes are: ${hints["types"]}`
}
}
return { hints, type, description: description.join("\n") }
}, fullSchema)
}
return WalkScheme(onEach, fullSchema, fullSchema, [], [], fullSchema.required)
}
function extractMeta(typename: string, path: string) {
@ -124,7 +152,9 @@ function extractMeta(typename: string, path: string) {
const metainfo = {
type: "One of the inputValidator types",
types: "Is multiple types are allowed for this field, then first show a mapping to pick the appropriate subtype. `Types` should be `;`-separated and contain precisely the same amount of subtypes",
group: "A kind of label. Items with the same group name will be placed in the same region",
default: "The default value which is used if no value is specified",
question: "The question to ask in the tagRenderingConfig",
ifunset:
"Only applicable if _not_ a required item. This will appear in the 'not set'-option as extra description",

View file

@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="UTF-8">
<title>MapComplete statistics</title>
<title>MapComplete Studio</title>
<meta content="width=device-width, initial-scale=1.0, user-scalable=no" name="viewport">
<link href="./css/mobile.css" rel="stylesheet"/>
<link href="./css/openinghourstable.css" rel="stylesheet"/>