diff --git a/Docs/Schemas/LayerConfigJson.schema.json b/Docs/Schemas/LayerConfigJson.schema.json index 15d04a930..26c5fcb03 100644 --- a/Docs/Schemas/LayerConfigJson.schema.json +++ b/Docs/Schemas/LayerConfigJson.schema.json @@ -619,7 +619,7 @@ "type": "object", "properties": { "render": { - "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered", + "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered\nifunset: no text is rendered if no predefined options match", "anyOf": [ { "$ref": "#/definitions/Record" @@ -656,7 +656,7 @@ ] }, "icon": { - "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon", + "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon\nifunset: do not show an icon next to the \"render\"-value", "anyOf": [ { "type": "object", @@ -923,7 +923,7 @@ } }, "iconBadges": { - "description": "A list of extra badges to show next to the icon as small badge\nThey will be added as a 25% height icon at the bottom right of the icon, with all the badges in a flex layout.\n\nNote: strings are interpreted as icons, so layering and substituting is supported. You can use `circle:white;./my_icon.svg` to add a background circle", + "description": "A list of extra badges to show next to the icon as small badge\nThey will be added as a 25% height icon at the bottom right of the icon, with all the badges in a flex layout.\n\nNote: strings are interpreted as icons, so layering and substituting is supported. You can use `circle:white;./my_icon.svg` to add a background circle\ngroup: hidden", "type": "array", "items": { "type": "object", @@ -994,30 +994,8 @@ } ] }, - "css": { - "description": "question: What CSS should be applied to the entire marker?\nYou can set the css-properties here, e.g. `background: red; font-size: 12px; `\nThis will be applied to the _container_ containing both the marker and the label\ninline: Apply CSS-style {value} to the _entire marker_\ntypes: Dynamic value ; string\nifunset: Do not apply extra CSS element to the entire marker", - "anyOf": [ - { - "$ref": "#/definitions/TagRenderingConfigJson" - }, - { - "type": "string" - } - ] - }, - "cssClasses": { - "description": "question: Which CSS-classes should be applied to the entire marker?\nThis will be applied to the _container_ containing both the marker and the label\n\nThe classes should be separated by a space (` `)\nYou can use most Tailwind-css classes, see https://tailwindcss.com/ for more information\nFor example: `center bg-gray-500 mx-2 my-1 rounded-full`\ninline: Apply CSS-classes {value} to the entire container\nifunset: Do not apply extra CSS-classes to the label\ntypes: Dynamic value ; string\nifunset: Do not apply extra CSS-classes to the entire marker", - "anyOf": [ - { - "$ref": "#/definitions/TagRenderingConfigJson" - }, - { - "type": "string" - } - ] - }, "labelCss": { - "description": "question: What CSS should be applied to the label?\nYou can set the css-properties here, e.g. `background: red; font-size: 12px; `\ninline: Apply CSS-style {value} to the label\ntypes: Dynamic value ; string\nifunset: Do not apply extra CSS-labels to the label", + "description": "question: What CSS should be applied to the label?\nYou can set the css-properties here, e.g. `background: red; font-size: 12px; `\ninline: Apply CSS-style {value} to the label\ntypes: Dynamic value ; string\nifunset: Do not apply extra CSS-labels to the label\ngroup: expert", "anyOf": [ { "$ref": "#/definitions/TagRenderingConfigJson" @@ -1028,7 +1006,29 @@ ] }, "labelCssClasses": { - "description": "question: Which CSS-classes should be applied to the label?\n\nThe classes should be separated by a space (` `)\nYou can use most Tailwind-css classes, see https://tailwindcss.com/ for more information\nFor example: `center bg-gray-500 mx-2 my-1 rounded-full`\ninline: Apply CSS-classes {value} to the label\ntypes: Dynamic value ; string\nifunset: Do not apply extra CSS-classes to the label", + "description": "question: Which CSS-classes should be applied to the label?\n\nThe classes should be separated by a space (` `)\nYou can use most Tailwind-css classes, see https://tailwindcss.com/ for more information\nFor example: `center bg-gray-500 mx-2 my-1 rounded-full`\ninline: Apply CSS-classes {value} to the label\ntypes: Dynamic value ; string\nifunset: Do not apply extra CSS-classes to the label\nsuggestions: return [{if: \"value=bg-white rounded px-2\", then: \"Draw on a white background\"}]", + "anyOf": [ + { + "$ref": "#/definitions/TagRenderingConfigJson" + }, + { + "type": "string" + } + ] + }, + "css": { + "description": "question: What CSS should be applied to the entire marker?\nYou can set the css-properties here, e.g. `background: red; font-size: 12px; `\nThis will be applied to the _container_ containing both the marker and the label\ninline: Apply CSS-style {value} to the _entire marker_\ntypes: Dynamic value ; string\nifunset: Do not apply extra CSS element to the entire marker\ngroup: expert", + "anyOf": [ + { + "$ref": "#/definitions/TagRenderingConfigJson" + }, + { + "type": "string" + } + ] + }, + "cssClasses": { + "description": "question: Which CSS-classes should be applied to the entire marker?\nThis will be applied to the _container_ containing both the marker and the label\n\nThe classes should be separated by a space (` `)\nYou can use most Tailwind-css classes, see https://tailwindcss.com/ for more information\nFor example: `center bg-gray-500 mx-2 my-1 rounded-full`\ninline: Apply CSS-classes {value} to the entire container\nifunset: Do not apply extra CSS-classes to the label\ntypes: Dynamic value ; string\nifunset: Do not apply extra CSS-classes to the entire marker\ngroup: expert", "anyOf": [ { "$ref": "#/definitions/TagRenderingConfigJson" @@ -1039,7 +1039,7 @@ ] }, "pitchAlignment": { - "description": "question: If the map is pitched, should the icon stay parallel to the screen or to the groundplane?\nsuggestions: return [{if: \"value=canvas\", then: \"The icon will stay upward and not be transformed as if it sticks to the screen\"}, {if: \"value=map\", then: \"The icon will be transformed as if it were painted onto the ground. (Automatically sets rotationAlignment)\"}]", + "description": "question: If the map is pitched, should the icon stay parallel to the screen or to the groundplane?\nsuggestions: return [{if: \"value=canvas\", then: \"The icon will stay upward and not be transformed as if it sticks to the screen\"}, {if: \"value=map\", then: \"The icon will be transformed as if it were painted onto the ground. (Automatically sets rotationAlignment)\"}]\ngroup: expert", "anyOf": [ { "$ref": "#/definitions/TagRenderingConfigJson" @@ -1054,7 +1054,7 @@ ] }, "rotationAlignment": { - "description": "question: Should the icon be rotated if the map is rotated?\nifunset: Do not rotate or tilt icons. Always keep the icons straight\nsuggestions: return [{if: \"value=canvas\", then: \"Never rotate the icon\"}, {if: \"value=map\", then: \"If the map is rotated, rotate the icon as well. This gives the impression of an icon that floats perpendicular above the ground.\"}]", + "description": "question: Should the icon be rotated if the map is rotated?\nifunset: Do not rotate or tilt icons. Always keep the icons straight\nsuggestions: return [{if: \"value=canvas\", then: \"Never rotate the icon\"}, {if: \"value=map\", then: \"If the map is rotated, rotate the icon as well. This gives the impression of an icon that floats perpendicular above the ground.\"}]\ngroup: expert", "anyOf": [ { "$ref": "#/definitions/TagRenderingConfigJson" @@ -1250,7 +1250,7 @@ } }, "render": { - "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered", + "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered\nifunset: no text is rendered if no predefined options match", "anyOf": [ { "$ref": "#/definitions/Record" @@ -1287,7 +1287,7 @@ ] }, "icon": { - "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon", + "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon\nifunset: do not show an icon next to the \"render\"-value", "anyOf": [ { "type": "object", @@ -1465,7 +1465,7 @@ } }, "render": { - "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered", + "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered\nifunset: no text is rendered if no predefined options match", "anyOf": [ { "$ref": "#/definitions/Record" @@ -1502,7 +1502,7 @@ ] }, "icon": { - "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon", + "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon\nifunset: do not show an icon next to the \"render\"-value", "anyOf": [ { "type": "object", diff --git a/Docs/Schemas/LayerConfigJsonJSC.ts b/Docs/Schemas/LayerConfigJsonJSC.ts index cf2d93236..85c892e05 100644 --- a/Docs/Schemas/LayerConfigJsonJSC.ts +++ b/Docs/Schemas/LayerConfigJsonJSC.ts @@ -612,7 +612,7 @@ export default { "type": "object", "properties": { "render": { - "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered", + "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered\nifunset: no text is rendered if no predefined options match", "anyOf": [ { "$ref": "#/definitions/Record" @@ -649,7 +649,7 @@ export default { ] }, "icon": { - "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon", + "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon\nifunset: do not show an icon next to the \"render\"-value", "anyOf": [ { "type": "object", @@ -912,7 +912,7 @@ export default { } }, "iconBadges": { - "description": "A list of extra badges to show next to the icon as small badge\nThey will be added as a 25% height icon at the bottom right of the icon, with all the badges in a flex layout.\n\nNote: strings are interpreted as icons, so layering and substituting is supported. You can use `circle:white;./my_icon.svg` to add a background circle", + "description": "A list of extra badges to show next to the icon as small badge\nThey will be added as a 25% height icon at the bottom right of the icon, with all the badges in a flex layout.\n\nNote: strings are interpreted as icons, so layering and substituting is supported. You can use `circle:white;./my_icon.svg` to add a background circle\ngroup: hidden", "type": "array", "items": { "type": "object", @@ -983,30 +983,8 @@ export default { } ] }, - "css": { - "description": "question: What CSS should be applied to the entire marker?\nYou can set the css-properties here, e.g. `background: red; font-size: 12px; `\nThis will be applied to the _container_ containing both the marker and the label\ninline: Apply CSS-style {value} to the _entire marker_\ntypes: Dynamic value ; string\nifunset: Do not apply extra CSS element to the entire marker", - "anyOf": [ - { - "$ref": "#/definitions/TagRenderingConfigJson" - }, - { - "type": "string" - } - ] - }, - "cssClasses": { - "description": "question: Which CSS-classes should be applied to the entire marker?\nThis will be applied to the _container_ containing both the marker and the label\n\nThe classes should be separated by a space (` `)\nYou can use most Tailwind-css classes, see https://tailwindcss.com/ for more information\nFor example: `center bg-gray-500 mx-2 my-1 rounded-full`\ninline: Apply CSS-classes {value} to the entire container\nifunset: Do not apply extra CSS-classes to the label\ntypes: Dynamic value ; string\nifunset: Do not apply extra CSS-classes to the entire marker", - "anyOf": [ - { - "$ref": "#/definitions/TagRenderingConfigJson" - }, - { - "type": "string" - } - ] - }, "labelCss": { - "description": "question: What CSS should be applied to the label?\nYou can set the css-properties here, e.g. `background: red; font-size: 12px; `\ninline: Apply CSS-style {value} to the label\ntypes: Dynamic value ; string\nifunset: Do not apply extra CSS-labels to the label", + "description": "question: What CSS should be applied to the label?\nYou can set the css-properties here, e.g. `background: red; font-size: 12px; `\ninline: Apply CSS-style {value} to the label\ntypes: Dynamic value ; string\nifunset: Do not apply extra CSS-labels to the label\ngroup: expert", "anyOf": [ { "$ref": "#/definitions/TagRenderingConfigJson" @@ -1017,7 +995,29 @@ export default { ] }, "labelCssClasses": { - "description": "question: Which CSS-classes should be applied to the label?\n\nThe classes should be separated by a space (` `)\nYou can use most Tailwind-css classes, see https://tailwindcss.com/ for more information\nFor example: `center bg-gray-500 mx-2 my-1 rounded-full`\ninline: Apply CSS-classes {value} to the label\ntypes: Dynamic value ; string\nifunset: Do not apply extra CSS-classes to the label", + "description": "question: Which CSS-classes should be applied to the label?\n\nThe classes should be separated by a space (` `)\nYou can use most Tailwind-css classes, see https://tailwindcss.com/ for more information\nFor example: `center bg-gray-500 mx-2 my-1 rounded-full`\ninline: Apply CSS-classes {value} to the label\ntypes: Dynamic value ; string\nifunset: Do not apply extra CSS-classes to the label\nsuggestions: return [{if: \"value=bg-white rounded px-2\", then: \"Draw on a white background\"}]", + "anyOf": [ + { + "$ref": "#/definitions/TagRenderingConfigJson" + }, + { + "type": "string" + } + ] + }, + "css": { + "description": "question: What CSS should be applied to the entire marker?\nYou can set the css-properties here, e.g. `background: red; font-size: 12px; `\nThis will be applied to the _container_ containing both the marker and the label\ninline: Apply CSS-style {value} to the _entire marker_\ntypes: Dynamic value ; string\nifunset: Do not apply extra CSS element to the entire marker\ngroup: expert", + "anyOf": [ + { + "$ref": "#/definitions/TagRenderingConfigJson" + }, + { + "type": "string" + } + ] + }, + "cssClasses": { + "description": "question: Which CSS-classes should be applied to the entire marker?\nThis will be applied to the _container_ containing both the marker and the label\n\nThe classes should be separated by a space (` `)\nYou can use most Tailwind-css classes, see https://tailwindcss.com/ for more information\nFor example: `center bg-gray-500 mx-2 my-1 rounded-full`\ninline: Apply CSS-classes {value} to the entire container\nifunset: Do not apply extra CSS-classes to the label\ntypes: Dynamic value ; string\nifunset: Do not apply extra CSS-classes to the entire marker\ngroup: expert", "anyOf": [ { "$ref": "#/definitions/TagRenderingConfigJson" @@ -1028,7 +1028,7 @@ export default { ] }, "pitchAlignment": { - "description": "question: If the map is pitched, should the icon stay parallel to the screen or to the groundplane?\nsuggestions: return [{if: \"value=canvas\", then: \"The icon will stay upward and not be transformed as if it sticks to the screen\"}, {if: \"value=map\", then: \"The icon will be transformed as if it were painted onto the ground. (Automatically sets rotationAlignment)\"}]", + "description": "question: If the map is pitched, should the icon stay parallel to the screen or to the groundplane?\nsuggestions: return [{if: \"value=canvas\", then: \"The icon will stay upward and not be transformed as if it sticks to the screen\"}, {if: \"value=map\", then: \"The icon will be transformed as if it were painted onto the ground. (Automatically sets rotationAlignment)\"}]\ngroup: expert", "anyOf": [ { "$ref": "#/definitions/TagRenderingConfigJson" @@ -1043,7 +1043,7 @@ export default { ] }, "rotationAlignment": { - "description": "question: Should the icon be rotated if the map is rotated?\nifunset: Do not rotate or tilt icons. Always keep the icons straight\nsuggestions: return [{if: \"value=canvas\", then: \"Never rotate the icon\"}, {if: \"value=map\", then: \"If the map is rotated, rotate the icon as well. This gives the impression of an icon that floats perpendicular above the ground.\"}]", + "description": "question: Should the icon be rotated if the map is rotated?\nifunset: Do not rotate or tilt icons. Always keep the icons straight\nsuggestions: return [{if: \"value=canvas\", then: \"Never rotate the icon\"}, {if: \"value=map\", then: \"If the map is rotated, rotate the icon as well. This gives the impression of an icon that floats perpendicular above the ground.\"}]\ngroup: expert", "anyOf": [ { "$ref": "#/definitions/TagRenderingConfigJson" @@ -1237,7 +1237,7 @@ export default { } }, "render": { - "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered", + "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered\nifunset: no text is rendered if no predefined options match", "anyOf": [ { "$ref": "#/definitions/Record" @@ -1274,7 +1274,7 @@ export default { ] }, "icon": { - "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon", + "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon\nifunset: do not show an icon next to the \"render\"-value", "anyOf": [ { "type": "object", @@ -1451,7 +1451,7 @@ export default { } }, "render": { - "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered", + "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered\nifunset: no text is rendered if no predefined options match", "anyOf": [ { "$ref": "#/definitions/Record" @@ -1488,7 +1488,7 @@ export default { ] }, "icon": { - "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon", + "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon\nifunset: do not show an icon next to the \"render\"-value", "anyOf": [ { "type": "object", diff --git a/Docs/Schemas/LayoutConfigJson.schema.json b/Docs/Schemas/LayoutConfigJson.schema.json index e23aa9365..d41d2e07d 100644 --- a/Docs/Schemas/LayoutConfigJson.schema.json +++ b/Docs/Schemas/LayoutConfigJson.schema.json @@ -304,9 +304,6 @@ "icon", "id", "layers", - "startLat", - "startLon", - "startZoom", "title" ], "definitions": { @@ -531,7 +528,7 @@ "type": "object", "properties": { "render": { - "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered", + "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered\nifunset: no text is rendered if no predefined options match", "anyOf": [ { "$ref": "#/definitions/Record" @@ -568,7 +565,7 @@ ] }, "icon": { - "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon", + "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon\nifunset: do not show an icon next to the \"render\"-value", "anyOf": [ { "type": "object", @@ -835,7 +832,7 @@ } }, "iconBadges": { - "description": "A list of extra badges to show next to the icon as small badge\nThey will be added as a 25% height icon at the bottom right of the icon, with all the badges in a flex layout.\n\nNote: strings are interpreted as icons, so layering and substituting is supported. You can use `circle:white;./my_icon.svg` to add a background circle", + "description": "A list of extra badges to show next to the icon as small badge\nThey will be added as a 25% height icon at the bottom right of the icon, with all the badges in a flex layout.\n\nNote: strings are interpreted as icons, so layering and substituting is supported. You can use `circle:white;./my_icon.svg` to add a background circle\ngroup: hidden", "type": "array", "items": { "type": "object", @@ -906,30 +903,8 @@ } ] }, - "css": { - "description": "question: What CSS should be applied to the entire marker?\nYou can set the css-properties here, e.g. `background: red; font-size: 12px; `\nThis will be applied to the _container_ containing both the marker and the label\ninline: Apply CSS-style {value} to the _entire marker_\ntypes: Dynamic value ; string\nifunset: Do not apply extra CSS element to the entire marker", - "anyOf": [ - { - "$ref": "#/definitions/TagRenderingConfigJson" - }, - { - "type": "string" - } - ] - }, - "cssClasses": { - "description": "question: Which CSS-classes should be applied to the entire marker?\nThis will be applied to the _container_ containing both the marker and the label\n\nThe classes should be separated by a space (` `)\nYou can use most Tailwind-css classes, see https://tailwindcss.com/ for more information\nFor example: `center bg-gray-500 mx-2 my-1 rounded-full`\ninline: Apply CSS-classes {value} to the entire container\nifunset: Do not apply extra CSS-classes to the label\ntypes: Dynamic value ; string\nifunset: Do not apply extra CSS-classes to the entire marker", - "anyOf": [ - { - "$ref": "#/definitions/TagRenderingConfigJson" - }, - { - "type": "string" - } - ] - }, "labelCss": { - "description": "question: What CSS should be applied to the label?\nYou can set the css-properties here, e.g. `background: red; font-size: 12px; `\ninline: Apply CSS-style {value} to the label\ntypes: Dynamic value ; string\nifunset: Do not apply extra CSS-labels to the label", + "description": "question: What CSS should be applied to the label?\nYou can set the css-properties here, e.g. `background: red; font-size: 12px; `\ninline: Apply CSS-style {value} to the label\ntypes: Dynamic value ; string\nifunset: Do not apply extra CSS-labels to the label\ngroup: expert", "anyOf": [ { "$ref": "#/definitions/TagRenderingConfigJson" @@ -940,7 +915,29 @@ ] }, "labelCssClasses": { - "description": "question: Which CSS-classes should be applied to the label?\n\nThe classes should be separated by a space (` `)\nYou can use most Tailwind-css classes, see https://tailwindcss.com/ for more information\nFor example: `center bg-gray-500 mx-2 my-1 rounded-full`\ninline: Apply CSS-classes {value} to the label\ntypes: Dynamic value ; string\nifunset: Do not apply extra CSS-classes to the label", + "description": "question: Which CSS-classes should be applied to the label?\n\nThe classes should be separated by a space (` `)\nYou can use most Tailwind-css classes, see https://tailwindcss.com/ for more information\nFor example: `center bg-gray-500 mx-2 my-1 rounded-full`\ninline: Apply CSS-classes {value} to the label\ntypes: Dynamic value ; string\nifunset: Do not apply extra CSS-classes to the label\nsuggestions: return [{if: \"value=bg-white rounded px-2\", then: \"Draw on a white background\"}]", + "anyOf": [ + { + "$ref": "#/definitions/TagRenderingConfigJson" + }, + { + "type": "string" + } + ] + }, + "css": { + "description": "question: What CSS should be applied to the entire marker?\nYou can set the css-properties here, e.g. `background: red; font-size: 12px; `\nThis will be applied to the _container_ containing both the marker and the label\ninline: Apply CSS-style {value} to the _entire marker_\ntypes: Dynamic value ; string\nifunset: Do not apply extra CSS element to the entire marker\ngroup: expert", + "anyOf": [ + { + "$ref": "#/definitions/TagRenderingConfigJson" + }, + { + "type": "string" + } + ] + }, + "cssClasses": { + "description": "question: Which CSS-classes should be applied to the entire marker?\nThis will be applied to the _container_ containing both the marker and the label\n\nThe classes should be separated by a space (` `)\nYou can use most Tailwind-css classes, see https://tailwindcss.com/ for more information\nFor example: `center bg-gray-500 mx-2 my-1 rounded-full`\ninline: Apply CSS-classes {value} to the entire container\nifunset: Do not apply extra CSS-classes to the label\ntypes: Dynamic value ; string\nifunset: Do not apply extra CSS-classes to the entire marker\ngroup: expert", "anyOf": [ { "$ref": "#/definitions/TagRenderingConfigJson" @@ -951,7 +948,7 @@ ] }, "pitchAlignment": { - "description": "question: If the map is pitched, should the icon stay parallel to the screen or to the groundplane?\nsuggestions: return [{if: \"value=canvas\", then: \"The icon will stay upward and not be transformed as if it sticks to the screen\"}, {if: \"value=map\", then: \"The icon will be transformed as if it were painted onto the ground. (Automatically sets rotationAlignment)\"}]", + "description": "question: If the map is pitched, should the icon stay parallel to the screen or to the groundplane?\nsuggestions: return [{if: \"value=canvas\", then: \"The icon will stay upward and not be transformed as if it sticks to the screen\"}, {if: \"value=map\", then: \"The icon will be transformed as if it were painted onto the ground. (Automatically sets rotationAlignment)\"}]\ngroup: expert", "anyOf": [ { "$ref": "#/definitions/TagRenderingConfigJson" @@ -966,7 +963,7 @@ ] }, "rotationAlignment": { - "description": "question: Should the icon be rotated if the map is rotated?\nifunset: Do not rotate or tilt icons. Always keep the icons straight\nsuggestions: return [{if: \"value=canvas\", then: \"Never rotate the icon\"}, {if: \"value=map\", then: \"If the map is rotated, rotate the icon as well. This gives the impression of an icon that floats perpendicular above the ground.\"}]", + "description": "question: Should the icon be rotated if the map is rotated?\nifunset: Do not rotate or tilt icons. Always keep the icons straight\nsuggestions: return [{if: \"value=canvas\", then: \"Never rotate the icon\"}, {if: \"value=map\", then: \"If the map is rotated, rotate the icon as well. This gives the impression of an icon that floats perpendicular above the ground.\"}]\ngroup: expert", "anyOf": [ { "$ref": "#/definitions/TagRenderingConfigJson" @@ -1162,7 +1159,7 @@ } }, "render": { - "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered", + "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered\nifunset: no text is rendered if no predefined options match", "anyOf": [ { "$ref": "#/definitions/Record" @@ -1199,7 +1196,7 @@ ] }, "icon": { - "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon", + "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon\nifunset: do not show an icon next to the \"render\"-value", "anyOf": [ { "type": "object", @@ -1377,7 +1374,7 @@ } }, "render": { - "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered", + "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered\nifunset: no text is rendered if no predefined options match", "anyOf": [ { "$ref": "#/definitions/Record" @@ -1414,7 +1411,7 @@ ] }, "icon": { - "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon", + "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon\nifunset: do not show an icon next to the \"render\"-value", "anyOf": [ { "type": "object", diff --git a/Docs/Schemas/LayoutConfigJsonJSC.ts b/Docs/Schemas/LayoutConfigJsonJSC.ts index 4013beafb..5913488bc 100644 --- a/Docs/Schemas/LayoutConfigJsonJSC.ts +++ b/Docs/Schemas/LayoutConfigJsonJSC.ts @@ -304,9 +304,6 @@ export default { "icon", "id", "layers", - "startLat", - "startLon", - "startZoom", "title" ], "definitions": { @@ -524,7 +521,7 @@ export default { "type": "object", "properties": { "render": { - "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered", + "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered\nifunset: no text is rendered if no predefined options match", "anyOf": [ { "$ref": "#/definitions/Record" @@ -561,7 +558,7 @@ export default { ] }, "icon": { - "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon", + "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon\nifunset: do not show an icon next to the \"render\"-value", "anyOf": [ { "type": "object", @@ -824,7 +821,7 @@ export default { } }, "iconBadges": { - "description": "A list of extra badges to show next to the icon as small badge\nThey will be added as a 25% height icon at the bottom right of the icon, with all the badges in a flex layout.\n\nNote: strings are interpreted as icons, so layering and substituting is supported. You can use `circle:white;./my_icon.svg` to add a background circle", + "description": "A list of extra badges to show next to the icon as small badge\nThey will be added as a 25% height icon at the bottom right of the icon, with all the badges in a flex layout.\n\nNote: strings are interpreted as icons, so layering and substituting is supported. You can use `circle:white;./my_icon.svg` to add a background circle\ngroup: hidden", "type": "array", "items": { "type": "object", @@ -895,30 +892,8 @@ export default { } ] }, - "css": { - "description": "question: What CSS should be applied to the entire marker?\nYou can set the css-properties here, e.g. `background: red; font-size: 12px; `\nThis will be applied to the _container_ containing both the marker and the label\ninline: Apply CSS-style {value} to the _entire marker_\ntypes: Dynamic value ; string\nifunset: Do not apply extra CSS element to the entire marker", - "anyOf": [ - { - "$ref": "#/definitions/TagRenderingConfigJson" - }, - { - "type": "string" - } - ] - }, - "cssClasses": { - "description": "question: Which CSS-classes should be applied to the entire marker?\nThis will be applied to the _container_ containing both the marker and the label\n\nThe classes should be separated by a space (` `)\nYou can use most Tailwind-css classes, see https://tailwindcss.com/ for more information\nFor example: `center bg-gray-500 mx-2 my-1 rounded-full`\ninline: Apply CSS-classes {value} to the entire container\nifunset: Do not apply extra CSS-classes to the label\ntypes: Dynamic value ; string\nifunset: Do not apply extra CSS-classes to the entire marker", - "anyOf": [ - { - "$ref": "#/definitions/TagRenderingConfigJson" - }, - { - "type": "string" - } - ] - }, "labelCss": { - "description": "question: What CSS should be applied to the label?\nYou can set the css-properties here, e.g. `background: red; font-size: 12px; `\ninline: Apply CSS-style {value} to the label\ntypes: Dynamic value ; string\nifunset: Do not apply extra CSS-labels to the label", + "description": "question: What CSS should be applied to the label?\nYou can set the css-properties here, e.g. `background: red; font-size: 12px; `\ninline: Apply CSS-style {value} to the label\ntypes: Dynamic value ; string\nifunset: Do not apply extra CSS-labels to the label\ngroup: expert", "anyOf": [ { "$ref": "#/definitions/TagRenderingConfigJson" @@ -929,7 +904,29 @@ export default { ] }, "labelCssClasses": { - "description": "question: Which CSS-classes should be applied to the label?\n\nThe classes should be separated by a space (` `)\nYou can use most Tailwind-css classes, see https://tailwindcss.com/ for more information\nFor example: `center bg-gray-500 mx-2 my-1 rounded-full`\ninline: Apply CSS-classes {value} to the label\ntypes: Dynamic value ; string\nifunset: Do not apply extra CSS-classes to the label", + "description": "question: Which CSS-classes should be applied to the label?\n\nThe classes should be separated by a space (` `)\nYou can use most Tailwind-css classes, see https://tailwindcss.com/ for more information\nFor example: `center bg-gray-500 mx-2 my-1 rounded-full`\ninline: Apply CSS-classes {value} to the label\ntypes: Dynamic value ; string\nifunset: Do not apply extra CSS-classes to the label\nsuggestions: return [{if: \"value=bg-white rounded px-2\", then: \"Draw on a white background\"}]", + "anyOf": [ + { + "$ref": "#/definitions/TagRenderingConfigJson" + }, + { + "type": "string" + } + ] + }, + "css": { + "description": "question: What CSS should be applied to the entire marker?\nYou can set the css-properties here, e.g. `background: red; font-size: 12px; `\nThis will be applied to the _container_ containing both the marker and the label\ninline: Apply CSS-style {value} to the _entire marker_\ntypes: Dynamic value ; string\nifunset: Do not apply extra CSS element to the entire marker\ngroup: expert", + "anyOf": [ + { + "$ref": "#/definitions/TagRenderingConfigJson" + }, + { + "type": "string" + } + ] + }, + "cssClasses": { + "description": "question: Which CSS-classes should be applied to the entire marker?\nThis will be applied to the _container_ containing both the marker and the label\n\nThe classes should be separated by a space (` `)\nYou can use most Tailwind-css classes, see https://tailwindcss.com/ for more information\nFor example: `center bg-gray-500 mx-2 my-1 rounded-full`\ninline: Apply CSS-classes {value} to the entire container\nifunset: Do not apply extra CSS-classes to the label\ntypes: Dynamic value ; string\nifunset: Do not apply extra CSS-classes to the entire marker\ngroup: expert", "anyOf": [ { "$ref": "#/definitions/TagRenderingConfigJson" @@ -940,7 +937,7 @@ export default { ] }, "pitchAlignment": { - "description": "question: If the map is pitched, should the icon stay parallel to the screen or to the groundplane?\nsuggestions: return [{if: \"value=canvas\", then: \"The icon will stay upward and not be transformed as if it sticks to the screen\"}, {if: \"value=map\", then: \"The icon will be transformed as if it were painted onto the ground. (Automatically sets rotationAlignment)\"}]", + "description": "question: If the map is pitched, should the icon stay parallel to the screen or to the groundplane?\nsuggestions: return [{if: \"value=canvas\", then: \"The icon will stay upward and not be transformed as if it sticks to the screen\"}, {if: \"value=map\", then: \"The icon will be transformed as if it were painted onto the ground. (Automatically sets rotationAlignment)\"}]\ngroup: expert", "anyOf": [ { "$ref": "#/definitions/TagRenderingConfigJson" @@ -955,7 +952,7 @@ export default { ] }, "rotationAlignment": { - "description": "question: Should the icon be rotated if the map is rotated?\nifunset: Do not rotate or tilt icons. Always keep the icons straight\nsuggestions: return [{if: \"value=canvas\", then: \"Never rotate the icon\"}, {if: \"value=map\", then: \"If the map is rotated, rotate the icon as well. This gives the impression of an icon that floats perpendicular above the ground.\"}]", + "description": "question: Should the icon be rotated if the map is rotated?\nifunset: Do not rotate or tilt icons. Always keep the icons straight\nsuggestions: return [{if: \"value=canvas\", then: \"Never rotate the icon\"}, {if: \"value=map\", then: \"If the map is rotated, rotate the icon as well. This gives the impression of an icon that floats perpendicular above the ground.\"}]\ngroup: expert", "anyOf": [ { "$ref": "#/definitions/TagRenderingConfigJson" @@ -1149,7 +1146,7 @@ export default { } }, "render": { - "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered", + "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered\nifunset: no text is rendered if no predefined options match", "anyOf": [ { "$ref": "#/definitions/Record" @@ -1186,7 +1183,7 @@ export default { ] }, "icon": { - "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon", + "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon\nifunset: do not show an icon next to the \"render\"-value", "anyOf": [ { "type": "object", @@ -1363,7 +1360,7 @@ export default { } }, "render": { - "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered", + "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered\nifunset: no text is rendered if no predefined options match", "anyOf": [ { "$ref": "#/definitions/Record" @@ -1400,7 +1397,7 @@ export default { ] }, "icon": { - "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon", + "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon\nifunset: do not show an icon next to the \"render\"-value", "anyOf": [ { "type": "object", diff --git a/Docs/Schemas/LineRenderingConfigJson.schema.json b/Docs/Schemas/LineRenderingConfigJson.schema.json index eef5f8c8c..a60c94e2d 100644 --- a/Docs/Schemas/LineRenderingConfigJson.schema.json +++ b/Docs/Schemas/LineRenderingConfigJson.schema.json @@ -287,7 +287,7 @@ "type": "object", "properties": { "render": { - "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered", + "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered\nifunset: no text is rendered if no predefined options match", "anyOf": [ { "$ref": "#/definitions/Record" @@ -324,7 +324,7 @@ ] }, "icon": { - "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon", + "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon\nifunset: do not show an icon next to the \"render\"-value", "anyOf": [ { "type": "object", diff --git a/Docs/Schemas/LineRenderingConfigJsonJSC.ts b/Docs/Schemas/LineRenderingConfigJsonJSC.ts index faeadab5c..3e6169438 100644 --- a/Docs/Schemas/LineRenderingConfigJsonJSC.ts +++ b/Docs/Schemas/LineRenderingConfigJsonJSC.ts @@ -280,7 +280,7 @@ export default { "type": "object", "properties": { "render": { - "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered", + "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered\nifunset: no text is rendered if no predefined options match", "anyOf": [ { "$ref": "#/definitions/Record" @@ -317,7 +317,7 @@ export default { ] }, "icon": { - "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon", + "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon\nifunset: do not show an icon next to the \"render\"-value", "anyOf": [ { "type": "object", diff --git a/Docs/Schemas/MappingConfigJson.schema.json b/Docs/Schemas/MappingConfigJson.schema.json index d8811044a..124b4a382 100644 --- a/Docs/Schemas/MappingConfigJson.schema.json +++ b/Docs/Schemas/MappingConfigJson.schema.json @@ -327,7 +327,7 @@ "type": "object", "properties": { "render": { - "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered", + "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered\nifunset: no text is rendered if no predefined options match", "anyOf": [ { "$ref": "#/definitions/Record" @@ -364,7 +364,7 @@ ] }, "icon": { - "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon", + "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon\nifunset: do not show an icon next to the \"render\"-value", "anyOf": [ { "type": "object", diff --git a/Docs/Schemas/MappingConfigJsonJSC.ts b/Docs/Schemas/MappingConfigJsonJSC.ts index 8c0eb2c46..19b9c1a78 100644 --- a/Docs/Schemas/MappingConfigJsonJSC.ts +++ b/Docs/Schemas/MappingConfigJsonJSC.ts @@ -320,7 +320,7 @@ export default { "type": "object", "properties": { "render": { - "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered", + "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered\nifunset: no text is rendered if no predefined options match", "anyOf": [ { "$ref": "#/definitions/Record" @@ -357,7 +357,7 @@ export default { ] }, "icon": { - "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon", + "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon\nifunset: do not show an icon next to the \"render\"-value", "anyOf": [ { "type": "object", diff --git a/Docs/Schemas/PointRenderingConfigJson.schema.json b/Docs/Schemas/PointRenderingConfigJson.schema.json index 13c923a3c..fd6b8db3d 100644 --- a/Docs/Schemas/PointRenderingConfigJson.schema.json +++ b/Docs/Schemas/PointRenderingConfigJson.schema.json @@ -17,7 +17,7 @@ } }, "iconBadges": { - "description": "A list of extra badges to show next to the icon as small badge\nThey will be added as a 25% height icon at the bottom right of the icon, with all the badges in a flex layout.\n\nNote: strings are interpreted as icons, so layering and substituting is supported. You can use `circle:white;./my_icon.svg` to add a background circle", + "description": "A list of extra badges to show next to the icon as small badge\nThey will be added as a 25% height icon at the bottom right of the icon, with all the badges in a flex layout.\n\nNote: strings are interpreted as icons, so layering and substituting is supported. You can use `circle:white;./my_icon.svg` to add a background circle\ngroup: hidden", "type": "array", "items": { "type": "object", @@ -88,30 +88,8 @@ } ] }, - "css": { - "description": "question: What CSS should be applied to the entire marker?\nYou can set the css-properties here, e.g. `background: red; font-size: 12px; `\nThis will be applied to the _container_ containing both the marker and the label\ninline: Apply CSS-style {value} to the _entire marker_\ntypes: Dynamic value ; string\nifunset: Do not apply extra CSS element to the entire marker", - "anyOf": [ - { - "$ref": "#/definitions/TagRenderingConfigJson" - }, - { - "type": "string" - } - ] - }, - "cssClasses": { - "description": "question: Which CSS-classes should be applied to the entire marker?\nThis will be applied to the _container_ containing both the marker and the label\n\nThe classes should be separated by a space (` `)\nYou can use most Tailwind-css classes, see https://tailwindcss.com/ for more information\nFor example: `center bg-gray-500 mx-2 my-1 rounded-full`\ninline: Apply CSS-classes {value} to the entire container\nifunset: Do not apply extra CSS-classes to the label\ntypes: Dynamic value ; string\nifunset: Do not apply extra CSS-classes to the entire marker", - "anyOf": [ - { - "$ref": "#/definitions/TagRenderingConfigJson" - }, - { - "type": "string" - } - ] - }, "labelCss": { - "description": "question: What CSS should be applied to the label?\nYou can set the css-properties here, e.g. `background: red; font-size: 12px; `\ninline: Apply CSS-style {value} to the label\ntypes: Dynamic value ; string\nifunset: Do not apply extra CSS-labels to the label", + "description": "question: What CSS should be applied to the label?\nYou can set the css-properties here, e.g. `background: red; font-size: 12px; `\ninline: Apply CSS-style {value} to the label\ntypes: Dynamic value ; string\nifunset: Do not apply extra CSS-labels to the label\ngroup: expert", "anyOf": [ { "$ref": "#/definitions/TagRenderingConfigJson" @@ -122,7 +100,29 @@ ] }, "labelCssClasses": { - "description": "question: Which CSS-classes should be applied to the label?\n\nThe classes should be separated by a space (` `)\nYou can use most Tailwind-css classes, see https://tailwindcss.com/ for more information\nFor example: `center bg-gray-500 mx-2 my-1 rounded-full`\ninline: Apply CSS-classes {value} to the label\ntypes: Dynamic value ; string\nifunset: Do not apply extra CSS-classes to the label", + "description": "question: Which CSS-classes should be applied to the label?\n\nThe classes should be separated by a space (` `)\nYou can use most Tailwind-css classes, see https://tailwindcss.com/ for more information\nFor example: `center bg-gray-500 mx-2 my-1 rounded-full`\ninline: Apply CSS-classes {value} to the label\ntypes: Dynamic value ; string\nifunset: Do not apply extra CSS-classes to the label\nsuggestions: return [{if: \"value=bg-white rounded px-2\", then: \"Draw on a white background\"}]", + "anyOf": [ + { + "$ref": "#/definitions/TagRenderingConfigJson" + }, + { + "type": "string" + } + ] + }, + "css": { + "description": "question: What CSS should be applied to the entire marker?\nYou can set the css-properties here, e.g. `background: red; font-size: 12px; `\nThis will be applied to the _container_ containing both the marker and the label\ninline: Apply CSS-style {value} to the _entire marker_\ntypes: Dynamic value ; string\nifunset: Do not apply extra CSS element to the entire marker\ngroup: expert", + "anyOf": [ + { + "$ref": "#/definitions/TagRenderingConfigJson" + }, + { + "type": "string" + } + ] + }, + "cssClasses": { + "description": "question: Which CSS-classes should be applied to the entire marker?\nThis will be applied to the _container_ containing both the marker and the label\n\nThe classes should be separated by a space (` `)\nYou can use most Tailwind-css classes, see https://tailwindcss.com/ for more information\nFor example: `center bg-gray-500 mx-2 my-1 rounded-full`\ninline: Apply CSS-classes {value} to the entire container\nifunset: Do not apply extra CSS-classes to the label\ntypes: Dynamic value ; string\nifunset: Do not apply extra CSS-classes to the entire marker\ngroup: expert", "anyOf": [ { "$ref": "#/definitions/TagRenderingConfigJson" @@ -133,7 +133,7 @@ ] }, "pitchAlignment": { - "description": "question: If the map is pitched, should the icon stay parallel to the screen or to the groundplane?\nsuggestions: return [{if: \"value=canvas\", then: \"The icon will stay upward and not be transformed as if it sticks to the screen\"}, {if: \"value=map\", then: \"The icon will be transformed as if it were painted onto the ground. (Automatically sets rotationAlignment)\"}]", + "description": "question: If the map is pitched, should the icon stay parallel to the screen or to the groundplane?\nsuggestions: return [{if: \"value=canvas\", then: \"The icon will stay upward and not be transformed as if it sticks to the screen\"}, {if: \"value=map\", then: \"The icon will be transformed as if it were painted onto the ground. (Automatically sets rotationAlignment)\"}]\ngroup: expert", "anyOf": [ { "$ref": "#/definitions/TagRenderingConfigJson" @@ -148,7 +148,7 @@ ] }, "rotationAlignment": { - "description": "question: Should the icon be rotated if the map is rotated?\nifunset: Do not rotate or tilt icons. Always keep the icons straight\nsuggestions: return [{if: \"value=canvas\", then: \"Never rotate the icon\"}, {if: \"value=map\", then: \"If the map is rotated, rotate the icon as well. This gives the impression of an icon that floats perpendicular above the ground.\"}]", + "description": "question: Should the icon be rotated if the map is rotated?\nifunset: Do not rotate or tilt icons. Always keep the icons straight\nsuggestions: return [{if: \"value=canvas\", then: \"Never rotate the icon\"}, {if: \"value=map\", then: \"If the map is rotated, rotate the icon as well. This gives the impression of an icon that floats perpendicular above the ground.\"}]\ngroup: expert", "anyOf": [ { "$ref": "#/definitions/TagRenderingConfigJson" @@ -388,7 +388,7 @@ "type": "object", "properties": { "render": { - "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered", + "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered\nifunset: no text is rendered if no predefined options match", "anyOf": [ { "$ref": "#/definitions/Record" @@ -425,7 +425,7 @@ ] }, "icon": { - "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon", + "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon\nifunset: do not show an icon next to the \"render\"-value", "anyOf": [ { "type": "object", diff --git a/Docs/Schemas/PointRenderingConfigJsonJSC.ts b/Docs/Schemas/PointRenderingConfigJsonJSC.ts index 8d5b23ee6..e59df06c4 100644 --- a/Docs/Schemas/PointRenderingConfigJsonJSC.ts +++ b/Docs/Schemas/PointRenderingConfigJsonJSC.ts @@ -17,7 +17,7 @@ export default { } }, "iconBadges": { - "description": "A list of extra badges to show next to the icon as small badge\nThey will be added as a 25% height icon at the bottom right of the icon, with all the badges in a flex layout.\n\nNote: strings are interpreted as icons, so layering and substituting is supported. You can use `circle:white;./my_icon.svg` to add a background circle", + "description": "A list of extra badges to show next to the icon as small badge\nThey will be added as a 25% height icon at the bottom right of the icon, with all the badges in a flex layout.\n\nNote: strings are interpreted as icons, so layering and substituting is supported. You can use `circle:white;./my_icon.svg` to add a background circle\ngroup: hidden", "type": "array", "items": { "type": "object", @@ -88,30 +88,8 @@ export default { } ] }, - "css": { - "description": "question: What CSS should be applied to the entire marker?\nYou can set the css-properties here, e.g. `background: red; font-size: 12px; `\nThis will be applied to the _container_ containing both the marker and the label\ninline: Apply CSS-style {value} to the _entire marker_\ntypes: Dynamic value ; string\nifunset: Do not apply extra CSS element to the entire marker", - "anyOf": [ - { - "$ref": "#/definitions/TagRenderingConfigJson" - }, - { - "type": "string" - } - ] - }, - "cssClasses": { - "description": "question: Which CSS-classes should be applied to the entire marker?\nThis will be applied to the _container_ containing both the marker and the label\n\nThe classes should be separated by a space (` `)\nYou can use most Tailwind-css classes, see https://tailwindcss.com/ for more information\nFor example: `center bg-gray-500 mx-2 my-1 rounded-full`\ninline: Apply CSS-classes {value} to the entire container\nifunset: Do not apply extra CSS-classes to the label\ntypes: Dynamic value ; string\nifunset: Do not apply extra CSS-classes to the entire marker", - "anyOf": [ - { - "$ref": "#/definitions/TagRenderingConfigJson" - }, - { - "type": "string" - } - ] - }, "labelCss": { - "description": "question: What CSS should be applied to the label?\nYou can set the css-properties here, e.g. `background: red; font-size: 12px; `\ninline: Apply CSS-style {value} to the label\ntypes: Dynamic value ; string\nifunset: Do not apply extra CSS-labels to the label", + "description": "question: What CSS should be applied to the label?\nYou can set the css-properties here, e.g. `background: red; font-size: 12px; `\ninline: Apply CSS-style {value} to the label\ntypes: Dynamic value ; string\nifunset: Do not apply extra CSS-labels to the label\ngroup: expert", "anyOf": [ { "$ref": "#/definitions/TagRenderingConfigJson" @@ -122,7 +100,29 @@ export default { ] }, "labelCssClasses": { - "description": "question: Which CSS-classes should be applied to the label?\n\nThe classes should be separated by a space (` `)\nYou can use most Tailwind-css classes, see https://tailwindcss.com/ for more information\nFor example: `center bg-gray-500 mx-2 my-1 rounded-full`\ninline: Apply CSS-classes {value} to the label\ntypes: Dynamic value ; string\nifunset: Do not apply extra CSS-classes to the label", + "description": "question: Which CSS-classes should be applied to the label?\n\nThe classes should be separated by a space (` `)\nYou can use most Tailwind-css classes, see https://tailwindcss.com/ for more information\nFor example: `center bg-gray-500 mx-2 my-1 rounded-full`\ninline: Apply CSS-classes {value} to the label\ntypes: Dynamic value ; string\nifunset: Do not apply extra CSS-classes to the label\nsuggestions: return [{if: \"value=bg-white rounded px-2\", then: \"Draw on a white background\"}]", + "anyOf": [ + { + "$ref": "#/definitions/TagRenderingConfigJson" + }, + { + "type": "string" + } + ] + }, + "css": { + "description": "question: What CSS should be applied to the entire marker?\nYou can set the css-properties here, e.g. `background: red; font-size: 12px; `\nThis will be applied to the _container_ containing both the marker and the label\ninline: Apply CSS-style {value} to the _entire marker_\ntypes: Dynamic value ; string\nifunset: Do not apply extra CSS element to the entire marker\ngroup: expert", + "anyOf": [ + { + "$ref": "#/definitions/TagRenderingConfigJson" + }, + { + "type": "string" + } + ] + }, + "cssClasses": { + "description": "question: Which CSS-classes should be applied to the entire marker?\nThis will be applied to the _container_ containing both the marker and the label\n\nThe classes should be separated by a space (` `)\nYou can use most Tailwind-css classes, see https://tailwindcss.com/ for more information\nFor example: `center bg-gray-500 mx-2 my-1 rounded-full`\ninline: Apply CSS-classes {value} to the entire container\nifunset: Do not apply extra CSS-classes to the label\ntypes: Dynamic value ; string\nifunset: Do not apply extra CSS-classes to the entire marker\ngroup: expert", "anyOf": [ { "$ref": "#/definitions/TagRenderingConfigJson" @@ -133,7 +133,7 @@ export default { ] }, "pitchAlignment": { - "description": "question: If the map is pitched, should the icon stay parallel to the screen or to the groundplane?\nsuggestions: return [{if: \"value=canvas\", then: \"The icon will stay upward and not be transformed as if it sticks to the screen\"}, {if: \"value=map\", then: \"The icon will be transformed as if it were painted onto the ground. (Automatically sets rotationAlignment)\"}]", + "description": "question: If the map is pitched, should the icon stay parallel to the screen or to the groundplane?\nsuggestions: return [{if: \"value=canvas\", then: \"The icon will stay upward and not be transformed as if it sticks to the screen\"}, {if: \"value=map\", then: \"The icon will be transformed as if it were painted onto the ground. (Automatically sets rotationAlignment)\"}]\ngroup: expert", "anyOf": [ { "$ref": "#/definitions/TagRenderingConfigJson" @@ -148,7 +148,7 @@ export default { ] }, "rotationAlignment": { - "description": "question: Should the icon be rotated if the map is rotated?\nifunset: Do not rotate or tilt icons. Always keep the icons straight\nsuggestions: return [{if: \"value=canvas\", then: \"Never rotate the icon\"}, {if: \"value=map\", then: \"If the map is rotated, rotate the icon as well. This gives the impression of an icon that floats perpendicular above the ground.\"}]", + "description": "question: Should the icon be rotated if the map is rotated?\nifunset: Do not rotate or tilt icons. Always keep the icons straight\nsuggestions: return [{if: \"value=canvas\", then: \"Never rotate the icon\"}, {if: \"value=map\", then: \"If the map is rotated, rotate the icon as well. This gives the impression of an icon that floats perpendicular above the ground.\"}]\ngroup: expert", "anyOf": [ { "$ref": "#/definitions/TagRenderingConfigJson" @@ -381,7 +381,7 @@ export default { "type": "object", "properties": { "render": { - "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered", + "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered\nifunset: no text is rendered if no predefined options match", "anyOf": [ { "$ref": "#/definitions/Record" @@ -418,7 +418,7 @@ export default { ] }, "icon": { - "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon", + "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon\nifunset: do not show an icon next to the \"render\"-value", "anyOf": [ { "type": "object", diff --git a/Docs/Schemas/QuestionableTagRenderingConfigJson.schema.json b/Docs/Schemas/QuestionableTagRenderingConfigJson.schema.json index e3c1a8889..08134815d 100644 --- a/Docs/Schemas/QuestionableTagRenderingConfigJson.schema.json +++ b/Docs/Schemas/QuestionableTagRenderingConfigJson.schema.json @@ -105,7 +105,7 @@ } }, "render": { - "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered", + "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered\nifunset: no text is rendered if no predefined options match", "anyOf": [ { "$ref": "#/definitions/Record" @@ -142,7 +142,7 @@ ] }, "icon": { - "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon", + "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon\nifunset: do not show an icon next to the \"render\"-value", "anyOf": [ { "type": "object", @@ -434,7 +434,7 @@ "type": "object", "properties": { "render": { - "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered", + "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered\nifunset: no text is rendered if no predefined options match", "anyOf": [ { "$ref": "#/definitions/Record" @@ -471,7 +471,7 @@ ] }, "icon": { - "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon", + "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon\nifunset: do not show an icon next to the \"render\"-value", "anyOf": [ { "type": "object", diff --git a/Docs/Schemas/QuestionableTagRenderingConfigJsonJSC.ts b/Docs/Schemas/QuestionableTagRenderingConfigJsonJSC.ts index 3278a1be3..defa256df 100644 --- a/Docs/Schemas/QuestionableTagRenderingConfigJsonJSC.ts +++ b/Docs/Schemas/QuestionableTagRenderingConfigJsonJSC.ts @@ -105,7 +105,7 @@ export default { } }, "render": { - "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered", + "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered\nifunset: no text is rendered if no predefined options match", "anyOf": [ { "$ref": "#/definitions/Record" @@ -142,7 +142,7 @@ export default { ] }, "icon": { - "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon", + "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon\nifunset: do not show an icon next to the \"render\"-value", "anyOf": [ { "type": "object", @@ -427,7 +427,7 @@ export default { "type": "object", "properties": { "render": { - "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered", + "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered\nifunset: no text is rendered if no predefined options match", "anyOf": [ { "$ref": "#/definitions/Record" @@ -464,7 +464,7 @@ export default { ] }, "icon": { - "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon", + "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon\nifunset: do not show an icon next to the \"render\"-value", "anyOf": [ { "type": "object", diff --git a/Docs/Schemas/RewritableConfigJson.schema.json b/Docs/Schemas/RewritableConfigJson.schema.json index 376cdd151..4fc01a982 100644 --- a/Docs/Schemas/RewritableConfigJson.schema.json +++ b/Docs/Schemas/RewritableConfigJson.schema.json @@ -254,7 +254,7 @@ "type": "object", "properties": { "render": { - "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered", + "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered\nifunset: no text is rendered if no predefined options match", "anyOf": [ { "$ref": "#/definitions/Record" @@ -291,7 +291,7 @@ ] }, "icon": { - "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon", + "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon\nifunset: do not show an icon next to the \"render\"-value", "anyOf": [ { "type": "object", diff --git a/Docs/Schemas/RewritableConfigJsonJSC.ts b/Docs/Schemas/RewritableConfigJsonJSC.ts index 0a8e8aac3..7ab97f2be 100644 --- a/Docs/Schemas/RewritableConfigJsonJSC.ts +++ b/Docs/Schemas/RewritableConfigJsonJSC.ts @@ -247,7 +247,7 @@ export default { "type": "object", "properties": { "render": { - "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered", + "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered\nifunset: no text is rendered if no predefined options match", "anyOf": [ { "$ref": "#/definitions/Record" @@ -284,7 +284,7 @@ export default { ] }, "icon": { - "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon", + "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon\nifunset: do not show an icon next to the \"render\"-value", "anyOf": [ { "type": "object", diff --git a/Docs/Schemas/TagRenderingConfigJson.schema.json b/Docs/Schemas/TagRenderingConfigJson.schema.json index 36bf1b201..7a62d57c9 100644 --- a/Docs/Schemas/TagRenderingConfigJson.schema.json +++ b/Docs/Schemas/TagRenderingConfigJson.schema.json @@ -3,7 +3,7 @@ "type": "object", "properties": { "render": { - "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered", + "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered\nifunset: no text is rendered if no predefined options match", "anyOf": [ { "$ref": "#/definitions/Record" @@ -40,7 +40,7 @@ ] }, "icon": { - "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon", + "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon\nifunset: do not show an icon next to the \"render\"-value", "anyOf": [ { "type": "object", diff --git a/Docs/Schemas/TagRenderingConfigJsonJSC.ts b/Docs/Schemas/TagRenderingConfigJsonJSC.ts index f34268789..f1d928dec 100644 --- a/Docs/Schemas/TagRenderingConfigJsonJSC.ts +++ b/Docs/Schemas/TagRenderingConfigJsonJSC.ts @@ -3,7 +3,7 @@ export default { "type": "object", "properties": { "render": { - "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered", + "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered\nifunset: no text is rendered if no predefined options match", "anyOf": [ { "$ref": "#/definitions/Record" @@ -40,7 +40,7 @@ export default { ] }, "icon": { - "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon", + "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon\nifunset: do not show an icon next to the \"render\"-value", "anyOf": [ { "type": "object", diff --git a/Docs/UserTests/2023-10-31 User Test Studio Shareish.md b/Docs/UserTests/2023-10-31 User Test Studio Shareish.md index b0ddeb5cf..634ea6e1a 100644 --- a/Docs/UserTests/2023-10-31 User Test Studio Shareish.md +++ b/Docs/UserTests/2023-10-31 User Test Studio Shareish.md @@ -29,12 +29,12 @@ User has used mapcomplete a few times before but has very little OSM-knowledge. - [x] TagRenderings: freeform key cannot be set to 'undefined' again - [ ] How to create a mapping for `key=yes` or `key=no` is unclear. Person searched for a 'binary'-type instead - [x] When a new tagRendering is added, the floatover should open immediately -- [ ] Mappings with different keys do not erase each other/freeform (e.g. noname=yes should erase `name`) +- [x] Mappings with different keys do not erase each other/freeform (e.g. noname=yes should erase `name`) - [x] Rename `mapping` to `predifined icon`, perhaps add a clarifying icon - [x] In tagRenderings: the `question`-field should be in question-mode right from the start - [x] If _only_ freeform.key is set (but no question nor render): an error should be generated - [x] The questionHints take too much space and should be unstickied - [x] There should be some space for the 'close'-button in the tagRendering -- [ ] Changing the icon: the term 'icon badge' is misunderstood and interpreted as "the logo" -- [ ] Trying to change the 'iconBadges' does not work +- [x] Changing the icon: the term 'icon badge' is misunderstood and interpreted as "the logo" +- [x] Trying to change the 'iconBadges' does not work - [ ] Creating a preset: initially very unclear diff --git a/assets/layers/address/address.json b/assets/layers/address/address.json index 6f36cdb20..af063ee2e 100644 --- a/assets/layers/address/address.json +++ b/assets/layers/address/address.json @@ -201,6 +201,7 @@ "nohousenumber=yes" ] }, + "addExtraTags": ["addr:housenumber="], "then": { "en": "This building has no house number", "nl": "Dit gebouw heeft geen huisnummer", diff --git a/assets/layers/advertising/advertising.json b/assets/layers/advertising/advertising.json index a3ef1ebcd..bd379c4cc 100644 --- a/assets/layers/advertising/advertising.json +++ b/assets/layers/advertising/advertising.json @@ -1122,7 +1122,8 @@ "pl": "To jest lampa neonowa", "pt_BR": "Isso é uma luz de neon" }, - "hideInAnswer": "advertising!=sign" + "hideInAnswer": "advertising!=sign", + "addExtraTags": ["lit=no"] } ], "condition": { diff --git a/assets/layers/bench/bench.json b/assets/layers/bench/bench.json index 0c6906799..d816ed2fd 100644 --- a/assets/layers/bench/bench.json +++ b/assets/layers/bench/bench.json @@ -180,6 +180,7 @@ }, { "if": "backrest=no", + "addExtraTags": ["two_sided="], "then": { "en": "Does not have a backrest", "de": "Die Sitzbank hat keine Rückenlehne", @@ -253,7 +254,8 @@ }, "freeform": { "key": "seats", - "type": "nat" + "type": "nat", + "addExtraTags": ["seats:separated="] }, "question": { "en": "How many seats does this bench have?", @@ -282,6 +284,7 @@ "mappings": [ { "if": "seats:separated=no", + "addExtraTags": ["seats="], "then": { "en": "This bench does not have separated seats", "nl": "Deze bank is niet ingedeeld in aparte zitplaatsen", @@ -1052,7 +1055,8 @@ "pt_BR": "Esse banco é um memorial para alguém ou alguma coisa" }, "addExtraTags": [ - "memorial=bench" + "memorial=bench", + "not:historic=" ] }, { diff --git a/assets/layers/bicycle_rental/bicycle_rental.json b/assets/layers/bicycle_rental/bicycle_rental.json index ed3709a9f..ff06ad930 100644 --- a/assets/layers/bicycle_rental/bicycle_rental.json +++ b/assets/layers/bicycle_rental/bicycle_rental.json @@ -178,6 +178,7 @@ }, { "if": "shop=rental", + "then": { "en": "This is a rental business which rents out various objects and/or vehicles. It rents out bicycles too, but this is not the main focus", "nl": "Dit is een zaak die verschillende voorwerpen en/of voertuigen verhuurt, waaronder ook fietsen; al zijn fietsen niet de hoofdfocus", @@ -211,6 +212,7 @@ }, { "if": "bicycle_rental=docking_station", + "addExtraTags": ["service:bicycle:rental="], "then": { "en": "This is an automated docking station, where a bicycle is mechanically locked to a structure", "nl": "Dit is een docking station waar de fietsen mechanisch in een grotere structuur worden vastgemaakt", @@ -225,6 +227,7 @@ }, { "if": "bicycle_rental=key_dispensing_machine", + "addExtraTags": ["service:bicycle:rental="], "then": { "en": "A machine is present which dispenses and accepts keys, eventually after authentication and/or payment. The bicycles are parked nearby", "nl": "Hier is een machine die fietssleutels verdeelt en terugneemt, eventueel na aanmelden of betaling. De fietsen staan in de buurt geparkeerd", @@ -240,6 +243,7 @@ }, { "if": "bicycle_rental=dropoff_point", + "addExtraTags": ["service:bicycle:rental="], "then": { "en": "This is a dropoff point, e.g. a reserved parking to place the bicycles clearly marked as being for the rental service only", "nl": "Dit is een dropzone, bv. een fietsparkeerplaats die is voorbehouden voor fietsverhuur", diff --git a/assets/layers/car_rental/car_rental.json b/assets/layers/car_rental/car_rental.json index 6055726d1..b3b8bf381 100644 --- a/assets/layers/car_rental/car_rental.json +++ b/assets/layers/car_rental/car_rental.json @@ -95,6 +95,7 @@ "freeform": { "key": "name", "type": "string", + "addExtraTags": ["noname="], "placeholder": { "en": "Name of the car rental", "nl": "Naam van de autoverhuur", @@ -117,6 +118,7 @@ "mappings": [ { "if": "noname=yes", + "addExtraTags": ["name="], "then": { "en": "This car rental has no name", "nl": "Deze autoverhuur heeft geen naam", diff --git a/assets/layers/recycling/recycling.json b/assets/layers/recycling/recycling.json index ab0859032..823f95d66 100644 --- a/assets/layers/recycling/recycling.json +++ b/assets/layers/recycling/recycling.json @@ -581,6 +581,7 @@ "mappings": [ { "if": "recycling_type=container", + "addExtraTags": ["amenity=recycling"], "then": { "en": "This is a recycling container", "nl": "Dit is een recyclingcontainer", @@ -594,6 +595,7 @@ }, { "if": "recycling_type=centre", + "addExtraTags": ["amenity=recycling"], "then": { "en": "This is a recycling centre", "nl": "Dit is een recyclingcentrum", @@ -644,6 +646,7 @@ }, { "if": "recycling_type=pickup_point", + "addExtraTags": ["amenity=recycling"], "then": { "en": "This is a pickup point. The waste material is placed here without placing it in a dedicated container.", "nl": "Dit is een verzamelplaats zonder container waar het afval later opgepikt wordt.", @@ -655,6 +658,7 @@ }, { "if": "recycling_type=dump", + "addExtraTags": ["amenity=recycling"], "then": { "en": "This is a dump where the waste material is stacked.", "nl": "Dit is een afvalhoop waar het afvalmateriaal bovenop elkaar gestapeld wordt.", diff --git a/package.json b/package.json index 6ac5f13af..fb06d8845 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mapcomplete", - "version": "0.34.3", + "version": "0.34.4", "repository": "https://github.com/pietervdvn/MapComplete", "description": "A small website to edit OSM easily", "bugs": "https://github.com/pietervdvn/MapComplete/issues", diff --git a/public/css/index-tailwind-output.css b/public/css/index-tailwind-output.css index cfa520ffc..1da46e851 100644 --- a/public/css/index-tailwind-output.css +++ b/public/css/index-tailwind-output.css @@ -1650,6 +1650,11 @@ video { background-color: rgb(107 114 128 / var(--tw-bg-opacity)); } +.bg-white { + --tw-bg-opacity: 1; + background-color: rgb(255 255 255 / var(--tw-bg-opacity)); +} + .bg-red-400 { --tw-bg-opacity: 1; background-color: rgb(248 113 113 / var(--tw-bg-opacity)); @@ -1660,11 +1665,6 @@ video { background-color: rgb(0 0 0 / var(--tw-bg-opacity)); } -.bg-white { - --tw-bg-opacity: 1; - background-color: rgb(255 255 255 / var(--tw-bg-opacity)); -} - .bg-gray-200 { --tw-bg-opacity: 1; background-color: rgb(229 231 235 / var(--tw-bg-opacity)); @@ -1712,6 +1712,11 @@ video { padding: 3rem; } +.px-2 { + padding-left: 0.5rem; + padding-right: 0.5rem; +} + .px-1 { padding-left: 0.25rem; padding-right: 0.25rem; @@ -1727,11 +1732,6 @@ video { padding-right: 0.75rem; } -.px-2 { - padding-left: 0.5rem; - padding-right: 0.5rem; -} - .pr-12 { padding-right: 3rem; } diff --git a/scripts/generateLayerOverview.ts b/scripts/generateLayerOverview.ts index 4ffcee206..dc7779fd6 100644 --- a/scripts/generateLayerOverview.ts +++ b/scripts/generateLayerOverview.ts @@ -452,11 +452,16 @@ class LayerOverviewUtils extends Script { ): { raw: LayerConfigJson parsed: LayerConfig + context: ConversionContext } { const parser = new ParseLayer(prepLayer, doesImageExist) const context = ConversionContext.construct([sharedLayerPath], ["ParseLayer"]) const parsed = parser.convertStrict(sharedLayerPath, context) - return AddIconSummary.singleton.convertStrict(parsed, context.inOperation("AddIconSummary")) + const result = AddIconSummary.singleton.convertStrict( + parsed, + context.inOperation("AddIconSummary") + ) + return { ...result, context } } private buildLayerIndex( @@ -477,6 +482,7 @@ class LayerOverviewUtils extends Script { const prepLayer = new PrepareLayer(state) const skippedLayers: string[] = [] const recompiledLayers: string[] = [] + let warningCount = 0 for (const sharedLayerPath of ScriptUtils.getLayerPaths()) { { const targetPath = @@ -492,6 +498,7 @@ class LayerOverviewUtils extends Script { } const parsed = this.parseLayer(doesImageExist, prepLayer, sharedLayerPath) + warningCount += parsed.context.getAll("warning").length const fixed = parsed.raw if (sharedLayers.has(fixed.id)) { throw "There are multiple layers with the id " + fixed.id + ", " + sharedLayerPath @@ -508,7 +515,9 @@ class LayerOverviewUtils extends Script { recompiledLayers.join(", ") + " and skipped " + skippedLayers.length + - " layers" + " layers. Detected " + + warningCount + + " warnings" ) // We always need the calculated tags of 'usersettings', so we export them separately this.extractJavascriptCodeForLayer( diff --git a/src/Models/ThemeConfig/Conversion/Validation.ts b/src/Models/ThemeConfig/Conversion/Validation.ts index 4cbca22dd..b6b47c1a8 100644 --- a/src/Models/ThemeConfig/Conversion/Validation.ts +++ b/src/Models/ThemeConfig/Conversion/Validation.ts @@ -357,7 +357,7 @@ export class PrevalidateTheme extends Fuse { export class DetectConflictingAddExtraTags extends DesugaringStep { constructor() { super( - "The `if`-part in a mapping might set some keys. Those key are not allowed to be set in the `addExtraTags`, as this might result in conflicting values", + "The `if`-part in a mapping might set some keys. Those keys are not allowed to be set in the `addExtraTags`, as this might result in conflicting values", [], "DetectConflictingAddExtraTags" ) @@ -399,6 +399,100 @@ export class DetectConflictingAddExtraTags extends DesugaringStep { + constructor() { + super( + "A tagRendering might set a freeform key (e.g. `name` and have an option that _should_ erase this name, e.g. `noname=yes`). Under normal circumstances, every mapping/freeform should affect all touched keys", + [], + "DetectNonErasedKeysInMappings" + ) + } + + convert( + json: QuestionableTagRenderingConfigJson, + context: ConversionContext + ): QuestionableTagRenderingConfigJson { + if (json.multiAnswer) { + // No need to check this here, this has its own validation + return json + } + if (!json.question) { + // No need to check the writable tags, as this cannot write + return json + } + function addAll(keys: { forEach: (f: (s: string) => void) => void }, addTo: Set) { + keys?.forEach((k) => addTo.add(k)) + } + + const freeformKeys: Set = new Set() + if (json.freeform) { + freeformKeys.add(json.freeform.key) + for (const tag of json.freeform.addExtraTags ?? []) { + const tagParsed = TagUtils.Tag(tag) + addAll(tagParsed.usedKeys(), freeformKeys) + } + } + + const mappingKeys: Set[] = [] + for (const mapping of json.mappings ?? []) { + if (mapping.hideInAnswer === true) { + mappingKeys.push(undefined) + continue + } + const thisMappingKeys: Set = new Set() + addAll(TagUtils.Tag(mapping.if).usedKeys(), thisMappingKeys) + for (const tag of mapping.addExtraTags ?? []) { + addAll(TagUtils.Tag(tag).usedKeys(), thisMappingKeys) + } + mappingKeys.push(thisMappingKeys) + } + + const neededKeys = new Set() + + addAll(freeformKeys, neededKeys) + for (const mappingKey of mappingKeys) { + addAll(mappingKey, neededKeys) + } + + neededKeys.delete("fixme") // fixme gets a free pass + + if (json.freeform) { + for (const neededKey of neededKeys) { + if (!freeformKeys.has(neededKey)) { + context + .enters("freeform") + .warn( + "The freeform block does not modify the key `" + + neededKey + + "` which is set in a mapping. Use `addExtraTags` to overwrite it" + ) + } + } + } + + for (let i = 0; i < json.mappings?.length; i++) { + const mapping = json.mappings[i] + if (mapping.hideInAnswer === true) { + continue + } + const keys = mappingKeys[i] + for (const neededKey of neededKeys) { + if (!keys.has(neededKey)) { + context + .enters("mappings", i) + .warn( + "This mapping does not modify the key `" + + neededKey + + "` which is set in a mapping or by the freeform block. Use `addExtraTags` to overwrite it" + ) + } + } + } + + return json + } +} + export class DetectShadowedMappings extends DesugaringStep { private readonly _calculatedTagNames: string[] @@ -874,6 +968,7 @@ export class ValidateTagRenderings extends Fuse { "Various validation on tagRenderingConfigs", new DetectShadowedMappings(layerConfig), new DetectConflictingAddExtraTags(), + new DetectNonErasedKeysInMappings(), new DetectMappingsWithImages(doesImageExist), new On("render", new ValidatePossibleLinks()), new On("question", new ValidatePossibleLinks()), @@ -1195,6 +1290,10 @@ export class PrevalidateLayer extends DesugaringStep { const baseTags = TagUtils.Tag(json.source["osmTags"]) for (let i = 0; i < json.presets.length; i++) { const preset = json.presets[i] + if (!preset) { + context.enters("presets", i).err("This preset is undefined") + continue + } if (!preset.tags) { context.enters("presets", i, "tags").err("No tags defined for this preset") continue diff --git a/src/Models/ThemeConfig/Json/LayoutConfigJson.ts b/src/Models/ThemeConfig/Json/LayoutConfigJson.ts index f7369f5b0..a3ad24add 100644 --- a/src/Models/ThemeConfig/Json/LayoutConfigJson.ts +++ b/src/Models/ThemeConfig/Json/LayoutConfigJson.ts @@ -116,7 +116,7 @@ export interface LayoutConfigJson { * type: float * group: start_location */ - startZoom: number + startZoom?: number /** * question: At what start latitude should this theme open? * Default location and zoom to start. @@ -125,7 +125,7 @@ export interface LayoutConfigJson { * type: float * group: start_location */ - startLat: number + startLat?: number /** * question: At what start longitude should this theme open? * Default location and zoom to start. @@ -134,7 +134,7 @@ export interface LayoutConfigJson { * type: float * group: start_location */ - startLon: number + startLon?: number /** * The id of the default background. BY default: vanilla OSM */ diff --git a/src/Models/ThemeConfig/Json/PointRenderingConfigJson.ts b/src/Models/ThemeConfig/Json/PointRenderingConfigJson.ts index 2f92efb08..d4b69157f 100644 --- a/src/Models/ThemeConfig/Json/PointRenderingConfigJson.ts +++ b/src/Models/ThemeConfig/Json/PointRenderingConfigJson.ts @@ -50,6 +50,7 @@ export default interface PointRenderingConfigJson { * They will be added as a 25% height icon at the bottom right of the icon, with all the badges in a flex layout. * * Note: strings are interpreted as icons, so layering and substituting is supported. You can use `circle:white;./my_icon.svg` to add a background circle + * group: hidden */ iconBadges?: { if: TagConfigJson @@ -95,6 +96,29 @@ export default interface PointRenderingConfigJson { */ label?: string | TagRenderingConfigJson + /** + * question: What CSS should be applied to the label? + * You can set the css-properties here, e.g. `background: red; font-size: 12px; ` + * inline: Apply CSS-style {value} to the label + * types: Dynamic value ; string + * ifunset: Do not apply extra CSS-labels to the label + * group: expert + */ + labelCss?: TagRenderingConfigJson | string + + /** + * question: Which CSS-classes should be applied to the label? + * + * The classes should be separated by a space (` `) + * You can use most Tailwind-css classes, see https://tailwindcss.com/ for more information + * For example: `center bg-gray-500 mx-2 my-1 rounded-full` + * inline: Apply CSS-classes {value} to the label + * types: Dynamic value ; string + * ifunset: Do not apply extra CSS-classes to the label + * suggestions: return [{if: "value=bg-white rounded px-2", then: "Draw on a white background"}] + */ + labelCssClasses?: string | TagRenderingConfigJson + /** * question: What CSS should be applied to the entire marker? * You can set the css-properties here, e.g. `background: red; font-size: 12px; ` @@ -102,7 +126,7 @@ export default interface PointRenderingConfigJson { * inline: Apply CSS-style {value} to the _entire marker_ * types: Dynamic value ; string * ifunset: Do not apply extra CSS element to the entire marker - * + * group: expert */ css?: string | TagRenderingConfigJson @@ -117,34 +141,14 @@ export default interface PointRenderingConfigJson { * ifunset: Do not apply extra CSS-classes to the label * types: Dynamic value ; string * ifunset: Do not apply extra CSS-classes to the entire marker + * group: expert */ cssClasses?: string | TagRenderingConfigJson - /** - * question: What CSS should be applied to the label? - * You can set the css-properties here, e.g. `background: red; font-size: 12px; ` - * inline: Apply CSS-style {value} to the label - * types: Dynamic value ; string - * ifunset: Do not apply extra CSS-labels to the label - * - */ - labelCss?: TagRenderingConfigJson | string - - /** - * question: Which CSS-classes should be applied to the label? - * - * The classes should be separated by a space (` `) - * You can use most Tailwind-css classes, see https://tailwindcss.com/ for more information - * For example: `center bg-gray-500 mx-2 my-1 rounded-full` - * inline: Apply CSS-classes {value} to the label - * types: Dynamic value ; string - * ifunset: Do not apply extra CSS-classes to the label - */ - labelCssClasses?: string | TagRenderingConfigJson - /** * question: If the map is pitched, should the icon stay parallel to the screen or to the groundplane? * suggestions: return [{if: "value=canvas", then: "The icon will stay upward and not be transformed as if it sticks to the screen"}, {if: "value=map", then: "The icon will be transformed as if it were painted onto the ground. (Automatically sets rotationAlignment)"}] + * group: expert */ pitchAlignment?: "canvas" | "map" | TagRenderingConfigJson @@ -152,6 +156,7 @@ export default interface PointRenderingConfigJson { * question: Should the icon be rotated if the map is rotated? * ifunset: Do not rotate or tilt icons. Always keep the icons straight * suggestions: return [{if: "value=canvas", then: "Never rotate the icon"}, {if: "value=map", then: "If the map is rotated, rotate the icon as well. This gives the impression of an icon that floats perpendicular above the ground."}] + * group: expert */ rotationAlignment?: "map" | "canvas" | TagRenderingConfigJson } diff --git a/src/Models/ThemeConfig/Json/TagRenderingConfigJson.ts b/src/Models/ThemeConfig/Json/TagRenderingConfigJson.ts index ea64c9ba6..b116a755b 100644 --- a/src/Models/ThemeConfig/Json/TagRenderingConfigJson.ts +++ b/src/Models/ThemeConfig/Json/TagRenderingConfigJson.ts @@ -56,6 +56,7 @@ export interface TagRenderingConfigJson { * * Note that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />` * type: rendered + * ifunset: no text is rendered if no predefined options match */ render?: | Translatable @@ -66,6 +67,7 @@ export interface TagRenderingConfigJson { * An icon shown next to the rendering; typically shown pretty small * This is only shown next to the "render" value * Type: icon + * ifunset: do not show an icon next to the "render"-value */ icon?: | string diff --git a/src/UI/BigComponents/SelectedElementView.svelte b/src/UI/BigComponents/SelectedElementView.svelte index c7e0c2656..efa54cf29 100644 --- a/src/UI/BigComponents/SelectedElementView.svelte +++ b/src/UI/BigComponents/SelectedElementView.svelte @@ -32,7 +32,6 @@ {#each layer.tagRenderings as config (config.id)} {#if (config.condition?.matchesProperties($tags) ?? true) && config.metacondition?.matchesProperties({ ...$tags, ..._metatags } ?? true)} {#if config.IsKnown($tags)} - {config.id} { public getStoreFor(path: ReadonlyArray): UIEventSource { const key = path.join(".") - // TODO check if this gives problems when changing the order of e.g. mappings and questions - if (this._stores.has(key)) { - return this._stores.get(key) - } const store = new UIEventSource(this.getCurrentValueFor(path)) store.addCallback((v) => { this.setValueAt(path, v) diff --git a/src/UI/Studio/MappingInput.svelte b/src/UI/Studio/MappingInput.svelte index 6d741cc6f..b8d695ccf 100644 --- a/src/UI/Studio/MappingInput.svelte +++ b/src/UI/Studio/MappingInput.svelte @@ -32,7 +32,7 @@ let thenText: UIEventSource> = state.getStoreFor([...path, "then"]) let thenTextEn = thenText .mapD(translation => typeof translation === "string" ? translation : translation["en"] ) - let editMode = Object.keys($thenText).length === 0; + let editMode = Object.keys($thenText ?? {})?.length === 0; let mappingConfigs: ConfigMeta[] = configs.filter(c => c.path[0] === "mappings") .map(c => Utils.Clone(c)) diff --git a/src/UI/Studio/Region.svelte b/src/UI/Studio/Region.svelte index ea68bf8fd..1cc833473 100644 --- a/src/UI/Studio/Region.svelte +++ b/src/UI/Studio/Region.svelte @@ -13,7 +13,8 @@ export let title: string | undefined = undefined; export let path: (string | number)[] = []; let expertMode = state.expertMode -let configsFiltered = $expertMode ? configs : configs.filter(schema => schema.hints?.group !== "expert") +let configsNoHidden = configs.filter(schema => schema.hints?.group !== "hidden") +let configsFiltered = $expertMode ? configsNoHidden : configsNoHidden.filter(schema => schema.hints?.group !== "expert") {#if configs === undefined} diff --git a/src/UI/Studio/SchemaBasedArray.svelte b/src/UI/Studio/SchemaBasedArray.svelte index ad554a047..389e7406a 100644 --- a/src/UI/Studio/SchemaBasedArray.svelte +++ b/src/UI/Studio/SchemaBasedArray.svelte @@ -6,7 +6,6 @@ import SchemaBasedField from "./SchemaBasedField.svelte"; import { TrashIcon } from "@babeard/svelte-heroicons/mini"; import QuestionPreview from "./QuestionPreview.svelte"; - import { Utils } from "../../Utils"; import SchemaBasedMultiType from "./SchemaBasedMultiType.svelte"; import ShowConversionMessage from "./ShowConversionMessage.svelte"; @@ -24,6 +23,7 @@ article = "an"; } export let path: (string | number)[] = []; + const isTagRenderingBlock = path.length === 1 && path[0] === "tagRenderings"; if (isTagRenderingBlock) { @@ -33,37 +33,24 @@ const subparts: ConfigMeta = state.getSchemaStartingWith(schema.path) .filter(part => part.path.length - 1 === schema.path.length); - /** - * Store the _indices_ - */ - export let values: UIEventSource = new UIEventSource([]); - - const currentValue = <[]>state.getCurrentValueFor(path); - if (currentValue) { - if (!Array.isArray(currentValue)) { - console.error("SchemaBaseArray for path", path, "expected an array as initial value, but got a", typeof currentValue, currentValue); - } else { - values.setData(currentValue.map((_, i) => i)); - } - } - let createdItems = values.data.length; + let messages = state.messagesFor(path) - + + + const currentValue : UIEventSource = state.getStoreFor(path); + if(currentValue.data === undefined){ + currentValue.setData([]) + } function createItem(valueToSet?: any) { - values.data.push(createdItems); - if (valueToSet) { - state.getStoreFor([...path, createdItems]).setData(valueToSet); + if(currentValue.data === undefined){ + currentValue.setData([]) } - createdItems++; - values.ping(); + currentValue.data.push(valueToSet) + currentValue.ping() if(isTagRenderingBlock){ - if(typeof valueToSet === "string"){ - // THis is very broken state.highlightedItem.setData({path: [...path, createdItems], schema}) - }else{ - state.highlightedItem.setData({path: [...path, createdItems], schema}) - } + state.highlightedItem.setData({path: [...path, currentValue.data.length - 1], schema}) } } @@ -73,54 +60,40 @@ for (const part of path) { if (toAdd[0] === part) { toAdd.splice(0, 1); + }else{ + break } } newPath.push(...toAdd); + console.log({newPath}) return newPath; } - function del(i) { - const index = i; - console.log("Deleting", index); - values.data.splice(index, 1); - values.ping(); - - const store = >state.getStoreFor(path); - store.data.splice(index, 1); - store.setData(Utils.NoNull(store.data)); - state.configuration.ping(); - } - - function swap(indexA, indexB) { - const valueA = values.data[indexA]; - const valueB = values.data[indexB]; - - values.data[indexA] = valueB; - values.data[indexB] = valueA; - values.ping(); - - const store = >state.getStoreFor(path); - const svalueA = store.data[indexA]; - const svalueB = store.data[indexB]; - store.data[indexA] = svalueB; - store.data[indexB] = svalueA; - store.ping(); - state.configuration.ping(); - } - - function moveTo(currentIndex, targetIndex) { - const direction = currentIndex > targetIndex ? -1 : +1; - do { - swap(currentIndex, currentIndex + direction); - currentIndex = currentIndex + direction; - } while (currentIndex !== targetIndex); - } - function schemaForMultitype() { const sch = {...schema} sch.hints.typehint = undefined return sch } + + + function del(i: number){ + currentValue.data.splice(i, 1) + currentValue.ping() + } + + function swap(i: number, j: number) { + const x = currentValue.data[i] + currentValue.data[i] = currentValue.data[j] + currentValue.data[j] = x + currentValue.ping() + } + + function moveTo(source: number, target: number){ + const x = currentValue.data[source] + currentValue.data.splice(source, 1) + currentValue.data.splice(target, 0, x) + currentValue.ping() + } @@ -132,8 +105,9 @@ {schema.description} {/if} - - {#if $values.length === 0} + {#if $currentValue === undefined} + No array defined + {:else if $currentValue.length === 0} No values are defined {#if $messages.length > 0} {#each $messages as message} @@ -142,9 +116,9 @@ {/if} {:else if subparts.length === 0} - {#each $values as value, i (value)} + {#each $currentValue as value, i}
- +
{/each} {:else} - {#each $values as value, i (value)} - + {#each $currentValue as value, i} {#if !isTagRenderingBlock}
-

{singular} {value}

+

{singular} {i}

{/if} - {#if i + 1 < $values.length} + {#if i + 1 < $currentValue.length} - {/if} {:else if schema.hints.types} - + {:else} {#each subparts as subpart} - + {/each} {/if}
diff --git a/src/UI/Studio/SchemaBasedField.svelte b/src/UI/Studio/SchemaBasedField.svelte index 0846c4c85..5373eb01a 100644 --- a/src/UI/Studio/SchemaBasedField.svelte +++ b/src/UI/Studio/SchemaBasedField.svelte @@ -17,21 +17,21 @@ export let state: EditLayerState; export let path: (string | number)[] = []; export let schema: ConfigMeta; - export let startInEditModeIfUnset: boolean = schema.hints && !schema.hints.ifunset + export let startInEditModeIfUnset: boolean = schema.hints && !schema.hints.ifunset; let value = new UIEventSource(undefined); const isTranslation = schema.hints?.typehint === "translation" || schema.hints?.typehint === "rendered" || ConfigMetaUtils.isTranslation(schema); let type = schema.hints.typehint ?? "string"; - let rendervalue = (schema.hints.inline ?? schema.path.join(".")) + (isTranslation ? " {translated(value)}": " {value}"); - - if(schema.type === "boolean"){ - rendervalue = undefined + let rendervalue = (schema.hints.inline ?? schema.path.join(".")) + (isTranslation ? " {translated(value)}" : " {value}"); + + if (schema.type === "boolean") { + rendervalue = undefined; } - if(schema.hints.typehint === "tag" || schema.hints.typehint === "simple_tag") { - rendervalue = "{tags()}" + if (schema.hints.typehint === "tag" || schema.hints.typehint === "simple_tag") { + rendervalue = "{tags()}"; } - + let helperArgs = schema.hints.typehelper?.split(","); let inline = schema.hints.inline !== undefined; if (isTranslation) { @@ -111,7 +111,7 @@ } let config: TagRenderingConfig; let err: string = undefined; - let messages = state.messagesFor(path) + let messages = state.messagesFor(path); try { config = new TagRenderingConfig(configJson, "config based on " + schema.path.join(".")); } catch (e) { @@ -119,13 +119,13 @@ err = path.join(".") + " " + e; } let startValue = state.getCurrentValueFor(path); - let startInEditMode = !startValue && startInEditModeIfUnset + let startInEditMode = !startValue && startInEditModeIfUnset; const tags = new UIEventSource>({ value: startValue }); try { onDestroy(state.register(path, tags.map(tgs => { const v = tgs["value"]; if (typeof v !== "string") { - return { ... v }; + return { ...v }; } if (schema.type === "boolan") { return v === "true" || v === "yes" || v === "1"; @@ -156,18 +156,21 @@ console.error("Could not register", path, "due to", e); } + {#if err !== undefined} {err} {:else}
- + {#if $messages.length > 0} {#each $messages as message} - + {/each} {/if} {#if window.location.hostname === "127.0.0.1"} - SchemaBasedField {path.join(".")} console.log(schema)}>{schema.hints.typehint} + console.log(schema)}>SchemaBasedField {path.join(".")} console.log(schema)}>{schema.hints.typehint} Group: {schema.hints.group} {/if}
{/if} diff --git a/src/UI/Studio/SchemaBasedInput.svelte b/src/UI/Studio/SchemaBasedInput.svelte index 68176dfd3..cffd8a1b3 100644 --- a/src/UI/Studio/SchemaBasedInput.svelte +++ b/src/UI/Studio/SchemaBasedInput.svelte @@ -9,17 +9,21 @@ export let schema: ConfigMeta; export let state: EditLayerState; export let path: (string | number)[] = []; - + let expertMode = state.expertMode; -{#if schema.hints?.typehint?.endsWith("[]")} - - -{:else if schema.type === "array" && schema.hints.multianswer === "true"} - -{:else if schema.type === "array"} - -{:else if schema.hints?.types} - -{:else} - +{#if (schema.hints?.group !== "expert" || $expertMode) && schema.hints.group !== "hidden"} + {#if schema.hints?.typehint?.endsWith("[]")} + + + {:else if schema.type === "array" && schema.hints.multianswer === "true"} + + {:else if schema.type === "array"} + + {:else if schema.hints?.types} + + {:else} + + {/if} +{:else if window.location.hostname === "127.0.0.1"} +
Not showing SBI {schema.path.join(".")} due to group {schema.hints.group}
{/if} diff --git a/src/UI/Studio/SchemaBasedMultiType.svelte b/src/UI/Studio/SchemaBasedMultiType.svelte index 6e69144d5..da47b7f7c 100644 --- a/src/UI/Studio/SchemaBasedMultiType.svelte +++ b/src/UI/Studio/SchemaBasedMultiType.svelte @@ -14,7 +14,6 @@ // @ts-ignore import nmd from "nano-markdown"; import ShowConversionMessage from "./ShowConversionMessage.svelte"; - import exp from "constants"; /** * If 'types' is defined: allow the user to pick one of the types to input. @@ -196,7 +195,6 @@ })); let messages = state.messagesFor(path); -
@@ -209,7 +207,7 @@ Studio {:else}
- +
{#if chosenOption !== undefined} @@ -217,9 +215,9 @@ {#if $expertMode || subschema.hints?.group !== "expert"} - {:else if window.location.hostname === "127.0.0.1"} - Omitted expert question {subschema.path.join(".")} - + {:else if window.location.hostname === "127.0.0.1"} + Omitted expert question {subschema.path.join(".")} + {/if} {/each} {:else if $messages.length > 0} diff --git a/src/UI/Walkthrough/Walkthrough.svelte b/src/UI/Walkthrough/Walkthrough.svelte index bbb5d0661..e06031f50 100644 --- a/src/UI/Walkthrough/Walkthrough.svelte +++ b/src/UI/Walkthrough/Walkthrough.svelte @@ -9,7 +9,6 @@ * Markdown */ export let pages: string[]; - console.log("Walkthrough pages are", pages) let currentPage: number = 0; diff --git a/src/assets/schemas/layerconfigmeta.json b/src/assets/schemas/layerconfigmeta.json index 24c552f32..264923f9c 100644 --- a/src/assets/schemas/layerconfigmeta.json +++ b/src/assets/schemas/layerconfigmeta.json @@ -408,7 +408,7 @@ "type": "object", "properties": { "render": { - "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered", + "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered\nifunset: no text is rendered if no predefined options match", "anyOf": [ { "$ref": "#/definitions/Record" @@ -445,7 +445,7 @@ ] }, "icon": { - "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon", + "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon\nifunset: do not show an icon next to the \"render\"-value", "anyOf": [ { "type": "object", @@ -590,7 +590,8 @@ "required": false, "hints": { "typehint": "rendered", - "question": "What text should be rendered?" + "question": "What text should be rendered?", + "ifunset": "no text is rendered if no predefined options match" }, "type": [ { @@ -636,7 +637,8 @@ "required": false, "hints": { "typehint": "icon", - "question": "what icon should be shown next to the 'render' value?" + "question": "what icon should be shown next to the 'render' value?", + "ifunset": "do not show an icon next to the \"render\"-value" }, "type": [ { @@ -1111,7 +1113,8 @@ "required": false, "hints": { "typehint": "rendered", - "question": "What text should be rendered?" + "question": "What text should be rendered?", + "ifunset": "no text is rendered if no predefined options match" }, "type": [ { @@ -1157,7 +1160,8 @@ "required": false, "hints": { "typehint": "icon", - "question": "what icon should be shown next to the 'render' value?" + "question": "what icon should be shown next to the 'render' value?", + "ifunset": "do not show an icon next to the \"render\"-value" }, "type": [ { @@ -2025,7 +2029,9 @@ "iconBadges" ], "required": false, - "hints": {}, + "hints": { + "group": "hidden" + }, "type": "array", "description": "A list of extra badges to show next to the icon as small badge\nThey will be added as a 25% height icon at the bottom right of the icon, with all the badges in a flex layout.\nNote: strings are interpreted as icons, so layering and substituting is supported. You can use `circle:white;./my_icon.svg` to add a background circle" }, @@ -2206,7 +2212,7 @@ "type": "object", "properties": { "render": { - "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered", + "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered\nifunset: no text is rendered if no predefined options match", "anyOf": [ { "$ref": "#/definitions/Record" @@ -2243,7 +2249,7 @@ ] }, "icon": { - "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon", + "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon\nifunset: do not show an icon next to the \"render\"-value", "anyOf": [ { "type": "object", @@ -2389,7 +2395,8 @@ "required": false, "hints": { "typehint": "rendered", - "question": "What text should be rendered?" + "question": "What text should be rendered?", + "ifunset": "no text is rendered if no predefined options match" }, "type": [ { @@ -2436,7 +2443,8 @@ "required": false, "hints": { "typehint": "icon", - "question": "what icon should be shown next to the 'render' value?" + "question": "what icon should be shown next to the 'render' value?", + "ifunset": "do not show an icon next to the \"render\"-value" }, "type": [ { @@ -2905,7 +2913,7 @@ "type": "object", "properties": { "render": { - "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered", + "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered\nifunset: no text is rendered if no predefined options match", "anyOf": [ { "$ref": "#/definitions/Record" @@ -2942,7 +2950,7 @@ ] }, "icon": { - "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon", + "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon\nifunset: do not show an icon next to the \"render\"-value", "anyOf": [ { "type": "object", @@ -3088,7 +3096,8 @@ "required": false, "hints": { "typehint": "rendered", - "question": "What text should be rendered?" + "question": "What text should be rendered?", + "ifunset": "no text is rendered if no predefined options match" }, "type": [ { @@ -3135,7 +3144,8 @@ "required": false, "hints": { "typehint": "icon", - "question": "what icon should be shown next to the 'render' value?" + "question": "what icon should be shown next to the 'render' value?", + "ifunset": "do not show an icon next to the \"render\"-value" }, "type": [ { @@ -3582,7 +3592,7 @@ "type": "object", "properties": { "render": { - "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered", + "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered\nifunset: no text is rendered if no predefined options match", "anyOf": [ { "$ref": "#/definitions/Record" @@ -3619,7 +3629,7 @@ ] }, "icon": { - "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon", + "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon\nifunset: do not show an icon next to the \"render\"-value", "anyOf": [ { "type": "object", @@ -3765,7 +3775,8 @@ "required": false, "hints": { "typehint": "rendered", - "question": "What text should be rendered?" + "question": "What text should be rendered?", + "ifunset": "no text is rendered if no predefined options match" }, "type": [ { @@ -3812,7 +3823,8 @@ "required": false, "hints": { "typehint": "icon", - "question": "what icon should be shown next to the 'render' value?" + "question": "what icon should be shown next to the 'render' value?", + "ifunset": "do not show an icon next to the \"render\"-value" }, "type": [ { @@ -4261,7 +4273,7 @@ "type": "object", "properties": { "render": { - "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered", + "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered\nifunset: no text is rendered if no predefined options match", "anyOf": [ { "$ref": "#/definitions/Record" @@ -4298,7 +4310,7 @@ ] }, "icon": { - "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon", + "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon\nifunset: do not show an icon next to the \"render\"-value", "anyOf": [ { "type": "object", @@ -4444,7 +4456,8 @@ "required": false, "hints": { "typehint": "rendered", - "question": "What text should be rendered?" + "question": "What text should be rendered?", + "ifunset": "no text is rendered if no predefined options match" }, "type": [ { @@ -4491,7 +4504,8 @@ "required": false, "hints": { "typehint": "icon", - "question": "what icon should be shown next to the 'render' value?" + "question": "what icon should be shown next to the 'render' value?", + "ifunset": "do not show an icon next to the \"render\"-value" }, "type": [ { @@ -4922,1364 +4936,6 @@ "type": "string", "description": "A list of css-classes to apply to the entire tagRendering.\nThese classes are applied in 'answer'-mode, not in question mode\nThis is only for advanced users.\nValues are split on ` ` (space)" }, - { - "path": [ - "pointRendering", - "css" - ], - "required": false, - "hints": { - "types": "Dynamic value ; string", - "question": "What CSS should be applied to the entire marker?", - "ifunset": "Do not apply extra CSS element to the entire marker", - "inline": "Apply CSS-style {value} to the _entire marker_" - }, - "type": [ - { - "description": "A TagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nFor an _editable_ tagRendering, use 'QuestionableTagRenderingConfigJson' instead, which extends this one", - "type": "object", - "properties": { - "render": { - "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered", - "anyOf": [ - { - "$ref": "#/definitions/Record" - }, - { - "type": "object", - "properties": { - "special": { - "allOf": [ - { - "$ref": "#/definitions/Record>" - }, - { - "type": "object", - "properties": { - "type": { - "type": "string" - } - }, - "required": [ - "type" - ] - } - ] - } - }, - "required": [ - "special" - ] - }, - { - "type": "string" - } - ] - }, - "icon": { - "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon", - "anyOf": [ - { - "type": "object", - "properties": { - "path": { - "description": "The path to the icon\nType: icon", - "type": "string" - }, - "class": { - "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)", - "type": "string" - } - }, - "required": [ - "path" - ] - }, - { - "type": "string" - } - ] - }, - "condition": { - "description": "question: When should this item be shown?\ntype: tag\nifunset: No specific condition set; always show this tagRendering or ask the question if unkown\n\nOnly 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/{and:TagConfigJson[];}" - }, - { - "$ref": "#/definitions/{or:TagConfigJson[];}" - }, - { - "type": "string" - } - ] - }, - "metacondition": { - "description": "question: When should this item be shown (including special conditions)?\ntype: tag\n\nIf 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/{and:TagConfigJson[];}" - }, - { - "$ref": "#/definitions/{or:TagConfigJson[];}" - }, - { - "type": "string" - } - ] - }, - "freeform": { - "description": "question: Should a freeform text field be shown?\nAllow freeform text input from the user\nifunset: Do not add a freeform text field", - "type": "object", - "properties": { - "key": { - "description": "What attribute should be filled out\nIf this key is present in the feature, then 'render' is used to display the value.\nIf this is undefined, the rendering is _always_ shown", - "type": "string" - } - } - }, - "mappings": { - "description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes", - "type": "array", - "items": { - "type": "object", - "properties": { - "if": { - "$ref": "#/definitions/TagConfigJson", - "description": "question: When should this single mapping match?\n\nIf this condition is met, then the text under `then` will be shown.\nIf no value matches, and the user selects this mapping as an option, then these tags will be uploaded to OSM.\n\nFor example: {'if': 'diet:vegetarion=yes', 'then':'A vegetarian option is offered here'}\n\nThis can be an substituting-tag as well, e.g. {'if': 'addr:street:={_calculated_nearby_streetname}', 'then': '{_calculated_nearby_streetname}'}" - }, - "then": { - "description": "question: What text should be shown?\n\nIf the condition `if` is met, the text `then` will be rendered.\nIf not known yet, the user will be presented with `then` as an option\nType: rendered", - "anyOf": [ - { - "$ref": "#/definitions/Record" - }, - { - "type": "string" - } - ] - }, - "icon": { - "description": "question: What icon should be added to this mapping?\nifunset: Do not show an extra icon next to the render value\n\nAn icon supporting this mapping; typically shown pretty small.\nThis can be used to show a 'phone'-icon next to the phone number\ninline: {icon}\nType: icon", - "anyOf": [ - { - "type": "object", - "properties": { - "path": { - "description": "The path to the icon\nType: icon", - "type": "string" - }, - "class": { - "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)", - "type": "string" - } - }, - "required": [ - "path" - ] - }, - { - "type": "string" - } - ] - } - }, - "required": [ - "if", - "then" - ] - } - }, - "description": { - "description": "A human-readable text explaining what this tagRendering does.\nMostly used for the shared tagrenderings", - "anyOf": [ - { - "$ref": "#/definitions/Record" - }, - { - "type": "string" - } - ] - }, - "classes": { - "description": "question: What css-classes should be applied to showing this attribute?\n\nA list of css-classes to apply to the entire tagRendering.\nThese classes are applied in 'answer'-mode, not in question mode\nThis is only for advanced users.\n\nValues are split on ` ` (space)", - "type": "string" - } - }, - "additionalProperties": false - }, - { - "type": "string" - } - ], - "description": "You can set the css-properties here, e.g. `background: red; font-size: 12px; `\nThis will be applied to the _container_ containing both the marker and the label" - }, - { - "path": [ - "pointRendering", - "css", - "render" - ], - "required": false, - "hints": { - "typehint": "rendered", - "question": "What text should be rendered?" - }, - "type": [ - { - "$ref": "#/definitions/Record" - }, - { - "type": "object", - "properties": { - "special": { - "allOf": [ - { - "$ref": "#/definitions/Record>" - }, - { - "type": "object", - "properties": { - "type": { - "type": "string" - } - }, - "required": [ - "type" - ] - } - ] - } - }, - "required": [ - "special" - ] - }, - { - "type": "string" - } - ], - "description": "This piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`" - }, - { - "path": [ - "pointRendering", - "css", - "icon" - ], - "required": false, - "hints": { - "typehint": "icon", - "question": "what icon should be shown next to the 'render' value?" - }, - "type": [ - { - "type": "object", - "properties": { - "path": { - "description": "The path to the icon\nType: icon", - "type": "string" - }, - "class": { - "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)", - "type": "string" - } - }, - "required": [ - "path" - ] - }, - { - "type": "string" - } - ], - "description": "An icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value" - }, - { - "path": [ - "pointRendering", - "css", - "icon", - "path" - ], - "required": true, - "hints": { - "typehint": "icon" - }, - "type": "string", - "description": "The path to the icon" - }, - { - "path": [ - "pointRendering", - "css", - "icon", - "class" - ], - "required": false, - "hints": {}, - "type": "string", - "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)" - }, - { - "path": [ - "pointRendering", - "css", - "condition" - ], - "required": false, - "hints": { - "typehint": "tag", - "question": "When should this item be shown?", - "ifunset": "No specific condition set; always show this tagRendering or ask the question if unkown" - }, - "type": [ - { - "$ref": "#/definitions/{and:TagConfigJson[];}" - }, - { - "$ref": "#/definitions/{or:TagConfigJson[];}" - }, - { - "type": "string" - } - ], - "description": "Only show this tagrendering (or ask the question) if the selected object also matches the tags specified as `condition`.\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\"`\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": [ - "pointRendering", - "css", - "condition", - "and" - ], - "required": false, - "hints": { - "typehint": "tag" - }, - "type": [ - { - "$ref": "#/definitions/{and:TagConfigJson[];}" - }, - { - "type": "object", - "properties": { - "or": { - "type": "array", - "items": { - "$ref": "#/definitions/TagConfigJson" - } - } - }, - "required": [ - "or" - ] - }, - { - "type": "string" - } - ], - "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" - }, - { - "path": [ - "pointRendering", - "css", - "condition", - "or" - ], - "required": false, - "hints": { - "typehint": "tag" - }, - "type": [ - { - "$ref": "#/definitions/{and:TagConfigJson[];}" - }, - { - "type": "object", - "properties": { - "or": { - "type": "array", - "items": { - "$ref": "#/definitions/TagConfigJson" - } - } - }, - "required": [ - "or" - ] - }, - { - "type": "string" - } - ], - "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" - }, - { - "path": [ - "pointRendering", - "css", - "metacondition" - ], - "required": false, - "hints": { - "typehint": "tag", - "question": "When should this item be shown (including special conditions)?" - }, - "type": [ - { - "$ref": "#/definitions/{and:TagConfigJson[];}" - }, - { - "$ref": "#/definitions/{or:TagConfigJson[];}" - }, - { - "type": "string" - } - ], - "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": [ - "pointRendering", - "css", - "metacondition", - "and" - ], - "required": false, - "hints": { - "typehint": "tag" - }, - "type": [ - { - "$ref": "#/definitions/{and:TagConfigJson[];}" - }, - { - "type": "object", - "properties": { - "or": { - "type": "array", - "items": { - "$ref": "#/definitions/TagConfigJson" - } - } - }, - "required": [ - "or" - ] - }, - { - "type": "string" - } - ], - "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" - }, - { - "path": [ - "pointRendering", - "css", - "metacondition", - "or" - ], - "required": false, - "hints": { - "typehint": "tag" - }, - "type": [ - { - "$ref": "#/definitions/{and:TagConfigJson[];}" - }, - { - "type": "object", - "properties": { - "or": { - "type": "array", - "items": { - "$ref": "#/definitions/TagConfigJson" - } - } - }, - "required": [ - "or" - ] - }, - { - "type": "string" - } - ], - "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" - }, - { - "path": [ - "pointRendering", - "css", - "freeform" - ], - "required": false, - "hints": { - "question": "Should a freeform text field be shown?", - "ifunset": "Do not add a freeform text field" - }, - "type": "object", - "description": "Allow freeform text input from the user" - }, - { - "path": [ - "pointRendering", - "css", - "freeform", - "key" - ], - "required": false, - "hints": {}, - "type": "string", - "description": "What attribute should be filled out\nIf this key is present in the feature, then 'render' is used to display the value.\nIf this is undefined, the rendering is _always_ shown" - }, - { - "path": [ - "pointRendering", - "css", - "mappings" - ], - "required": false, - "hints": {}, - "type": "array", - "description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes" - }, - { - "path": [ - "pointRendering", - "css", - "mappings", - "if" - ], - "required": true, - "hints": { - "typehint": "tag", - "question": "When should this single mapping match?" - }, - "type": [ - { - "$ref": "#/definitions/{and:TagConfigJson[];}" - }, - { - "type": "object", - "properties": { - "or": { - "type": "array", - "items": { - "$ref": "#/definitions/TagConfigJson" - } - } - }, - "required": [ - "or" - ] - }, - { - "type": "string" - } - ], - "description": "If this condition is met, then the text under `then` will be shown.\nIf no value matches, and the user selects this mapping as an option, then these tags will be uploaded to OSM.\nFor example: {'if': 'diet:vegetarion=yes', 'then':'A vegetarian option is offered here'}\nThis can be an substituting-tag as well, e.g. {'if': 'addr:street:={_calculated_nearby_streetname}', 'then': '{_calculated_nearby_streetname}'}" - }, - { - "path": [ - "pointRendering", - "css", - "mappings", - "then" - ], - "required": true, - "hints": { - "typehint": "rendered", - "question": "What text should be shown?" - }, - "type": [ - { - "$ref": "#/definitions/Record" - }, - { - "type": "string" - } - ], - "description": "If the condition `if` is met, the text `then` will be rendered.\nIf not known yet, the user will be presented with `then` as an option" - }, - { - "path": [ - "pointRendering", - "css", - "mappings", - "icon" - ], - "required": false, - "hints": { - "typehint": "icon", - "question": "What icon should be added to this mapping?", - "ifunset": "Do not show an extra icon next to the render value", - "inline": " {icon}" - }, - "type": [ - { - "type": "object", - "properties": { - "path": { - "description": "The path to the icon\nType: icon", - "type": "string" - }, - "class": { - "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)", - "type": "string" - } - }, - "required": [ - "path" - ] - }, - { - "type": "string" - } - ], - "description": "An icon supporting this mapping; typically shown pretty small.\nThis can be used to show a 'phone'-icon next to the phone number" - }, - { - "path": [ - "pointRendering", - "css", - "mappings", - "icon", - "path" - ], - "required": true, - "hints": { - "typehint": "icon" - }, - "type": "string", - "description": "The path to the icon" - }, - { - "path": [ - "pointRendering", - "css", - "mappings", - "icon", - "class" - ], - "required": false, - "hints": {}, - "type": "string", - "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)" - }, - { - "path": [ - "pointRendering", - "css", - "description" - ], - "required": false, - "hints": {}, - "type": [ - { - "$ref": "#/definitions/Record" - }, - { - "type": "string" - } - ], - "description": "A human-readable text explaining what this tagRendering does.\nMostly used for the shared tagrenderings" - }, - { - "path": [ - "pointRendering", - "css", - "classes" - ], - "required": false, - "hints": { - "question": "What css-classes should be applied to showing this attribute?" - }, - "type": "string", - "description": "A list of css-classes to apply to the entire tagRendering.\nThese classes are applied in 'answer'-mode, not in question mode\nThis is only for advanced users.\nValues are split on ` ` (space)" - }, - { - "path": [ - "pointRendering", - "cssClasses" - ], - "required": false, - "hints": { - "types": "Dynamic value ; string", - "question": "Which CSS-classes should be applied to the entire marker?", - "ifunset": "Do not apply extra CSS-classes to the label", - "inline": "Apply CSS-classes {value} to the entire container" - }, - "type": [ - { - "description": "A TagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nFor an _editable_ tagRendering, use 'QuestionableTagRenderingConfigJson' instead, which extends this one", - "type": "object", - "properties": { - "render": { - "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered", - "anyOf": [ - { - "$ref": "#/definitions/Record" - }, - { - "type": "object", - "properties": { - "special": { - "allOf": [ - { - "$ref": "#/definitions/Record>" - }, - { - "type": "object", - "properties": { - "type": { - "type": "string" - } - }, - "required": [ - "type" - ] - } - ] - } - }, - "required": [ - "special" - ] - }, - { - "type": "string" - } - ] - }, - "icon": { - "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon", - "anyOf": [ - { - "type": "object", - "properties": { - "path": { - "description": "The path to the icon\nType: icon", - "type": "string" - }, - "class": { - "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)", - "type": "string" - } - }, - "required": [ - "path" - ] - }, - { - "type": "string" - } - ] - }, - "condition": { - "description": "question: When should this item be shown?\ntype: tag\nifunset: No specific condition set; always show this tagRendering or ask the question if unkown\n\nOnly 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/{and:TagConfigJson[];}" - }, - { - "$ref": "#/definitions/{or:TagConfigJson[];}" - }, - { - "type": "string" - } - ] - }, - "metacondition": { - "description": "question: When should this item be shown (including special conditions)?\ntype: tag\n\nIf 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/{and:TagConfigJson[];}" - }, - { - "$ref": "#/definitions/{or:TagConfigJson[];}" - }, - { - "type": "string" - } - ] - }, - "freeform": { - "description": "question: Should a freeform text field be shown?\nAllow freeform text input from the user\nifunset: Do not add a freeform text field", - "type": "object", - "properties": { - "key": { - "description": "What attribute should be filled out\nIf this key is present in the feature, then 'render' is used to display the value.\nIf this is undefined, the rendering is _always_ shown", - "type": "string" - } - } - }, - "mappings": { - "description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes", - "type": "array", - "items": { - "type": "object", - "properties": { - "if": { - "$ref": "#/definitions/TagConfigJson", - "description": "question: When should this single mapping match?\n\nIf this condition is met, then the text under `then` will be shown.\nIf no value matches, and the user selects this mapping as an option, then these tags will be uploaded to OSM.\n\nFor example: {'if': 'diet:vegetarion=yes', 'then':'A vegetarian option is offered here'}\n\nThis can be an substituting-tag as well, e.g. {'if': 'addr:street:={_calculated_nearby_streetname}', 'then': '{_calculated_nearby_streetname}'}" - }, - "then": { - "description": "question: What text should be shown?\n\nIf the condition `if` is met, the text `then` will be rendered.\nIf not known yet, the user will be presented with `then` as an option\nType: rendered", - "anyOf": [ - { - "$ref": "#/definitions/Record" - }, - { - "type": "string" - } - ] - }, - "icon": { - "description": "question: What icon should be added to this mapping?\nifunset: Do not show an extra icon next to the render value\n\nAn icon supporting this mapping; typically shown pretty small.\nThis can be used to show a 'phone'-icon next to the phone number\ninline: {icon}\nType: icon", - "anyOf": [ - { - "type": "object", - "properties": { - "path": { - "description": "The path to the icon\nType: icon", - "type": "string" - }, - "class": { - "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)", - "type": "string" - } - }, - "required": [ - "path" - ] - }, - { - "type": "string" - } - ] - } - }, - "required": [ - "if", - "then" - ] - } - }, - "description": { - "description": "A human-readable text explaining what this tagRendering does.\nMostly used for the shared tagrenderings", - "anyOf": [ - { - "$ref": "#/definitions/Record" - }, - { - "type": "string" - } - ] - }, - "classes": { - "description": "question: What css-classes should be applied to showing this attribute?\n\nA list of css-classes to apply to the entire tagRendering.\nThese classes are applied in 'answer'-mode, not in question mode\nThis is only for advanced users.\n\nValues are split on ` ` (space)", - "type": "string" - } - }, - "additionalProperties": false - }, - { - "type": "string" - } - ], - "description": "This will be applied to the _container_ containing both the marker and the label\nThe classes should be separated by a space (` `)\nYou can use most Tailwind-css classes, see https://tailwindcss.com/ for more information\nFor example: `center bg-gray-500 mx-2 my-1 rounded-full`" - }, - { - "path": [ - "pointRendering", - "cssClasses", - "render" - ], - "required": false, - "hints": { - "typehint": "rendered", - "question": "What text should be rendered?" - }, - "type": [ - { - "$ref": "#/definitions/Record" - }, - { - "type": "object", - "properties": { - "special": { - "allOf": [ - { - "$ref": "#/definitions/Record>" - }, - { - "type": "object", - "properties": { - "type": { - "type": "string" - } - }, - "required": [ - "type" - ] - } - ] - } - }, - "required": [ - "special" - ] - }, - { - "type": "string" - } - ], - "description": "This piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`" - }, - { - "path": [ - "pointRendering", - "cssClasses", - "icon" - ], - "required": false, - "hints": { - "typehint": "icon", - "question": "what icon should be shown next to the 'render' value?" - }, - "type": [ - { - "type": "object", - "properties": { - "path": { - "description": "The path to the icon\nType: icon", - "type": "string" - }, - "class": { - "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)", - "type": "string" - } - }, - "required": [ - "path" - ] - }, - { - "type": "string" - } - ], - "description": "An icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value" - }, - { - "path": [ - "pointRendering", - "cssClasses", - "icon", - "path" - ], - "required": true, - "hints": { - "typehint": "icon" - }, - "type": "string", - "description": "The path to the icon" - }, - { - "path": [ - "pointRendering", - "cssClasses", - "icon", - "class" - ], - "required": false, - "hints": {}, - "type": "string", - "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)" - }, - { - "path": [ - "pointRendering", - "cssClasses", - "condition" - ], - "required": false, - "hints": { - "typehint": "tag", - "question": "When should this item be shown?", - "ifunset": "No specific condition set; always show this tagRendering or ask the question if unkown" - }, - "type": [ - { - "$ref": "#/definitions/{and:TagConfigJson[];}" - }, - { - "$ref": "#/definitions/{or:TagConfigJson[];}" - }, - { - "type": "string" - } - ], - "description": "Only show this tagrendering (or ask the question) if the selected object also matches the tags specified as `condition`.\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\"`\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": [ - "pointRendering", - "cssClasses", - "condition", - "and" - ], - "required": false, - "hints": { - "typehint": "tag" - }, - "type": [ - { - "$ref": "#/definitions/{and:TagConfigJson[];}" - }, - { - "type": "object", - "properties": { - "or": { - "type": "array", - "items": { - "$ref": "#/definitions/TagConfigJson" - } - } - }, - "required": [ - "or" - ] - }, - { - "type": "string" - } - ], - "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" - }, - { - "path": [ - "pointRendering", - "cssClasses", - "condition", - "or" - ], - "required": false, - "hints": { - "typehint": "tag" - }, - "type": [ - { - "$ref": "#/definitions/{and:TagConfigJson[];}" - }, - { - "type": "object", - "properties": { - "or": { - "type": "array", - "items": { - "$ref": "#/definitions/TagConfigJson" - } - } - }, - "required": [ - "or" - ] - }, - { - "type": "string" - } - ], - "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" - }, - { - "path": [ - "pointRendering", - "cssClasses", - "metacondition" - ], - "required": false, - "hints": { - "typehint": "tag", - "question": "When should this item be shown (including special conditions)?" - }, - "type": [ - { - "$ref": "#/definitions/{and:TagConfigJson[];}" - }, - { - "$ref": "#/definitions/{or:TagConfigJson[];}" - }, - { - "type": "string" - } - ], - "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": [ - "pointRendering", - "cssClasses", - "metacondition", - "and" - ], - "required": false, - "hints": { - "typehint": "tag" - }, - "type": [ - { - "$ref": "#/definitions/{and:TagConfigJson[];}" - }, - { - "type": "object", - "properties": { - "or": { - "type": "array", - "items": { - "$ref": "#/definitions/TagConfigJson" - } - } - }, - "required": [ - "or" - ] - }, - { - "type": "string" - } - ], - "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" - }, - { - "path": [ - "pointRendering", - "cssClasses", - "metacondition", - "or" - ], - "required": false, - "hints": { - "typehint": "tag" - }, - "type": [ - { - "$ref": "#/definitions/{and:TagConfigJson[];}" - }, - { - "type": "object", - "properties": { - "or": { - "type": "array", - "items": { - "$ref": "#/definitions/TagConfigJson" - } - } - }, - "required": [ - "or" - ] - }, - { - "type": "string" - } - ], - "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" - }, - { - "path": [ - "pointRendering", - "cssClasses", - "freeform" - ], - "required": false, - "hints": { - "question": "Should a freeform text field be shown?", - "ifunset": "Do not add a freeform text field" - }, - "type": "object", - "description": "Allow freeform text input from the user" - }, - { - "path": [ - "pointRendering", - "cssClasses", - "freeform", - "key" - ], - "required": false, - "hints": {}, - "type": "string", - "description": "What attribute should be filled out\nIf this key is present in the feature, then 'render' is used to display the value.\nIf this is undefined, the rendering is _always_ shown" - }, - { - "path": [ - "pointRendering", - "cssClasses", - "mappings" - ], - "required": false, - "hints": {}, - "type": "array", - "description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes" - }, - { - "path": [ - "pointRendering", - "cssClasses", - "mappings", - "if" - ], - "required": true, - "hints": { - "typehint": "tag", - "question": "When should this single mapping match?" - }, - "type": [ - { - "$ref": "#/definitions/{and:TagConfigJson[];}" - }, - { - "type": "object", - "properties": { - "or": { - "type": "array", - "items": { - "$ref": "#/definitions/TagConfigJson" - } - } - }, - "required": [ - "or" - ] - }, - { - "type": "string" - } - ], - "description": "If this condition is met, then the text under `then` will be shown.\nIf no value matches, and the user selects this mapping as an option, then these tags will be uploaded to OSM.\nFor example: {'if': 'diet:vegetarion=yes', 'then':'A vegetarian option is offered here'}\nThis can be an substituting-tag as well, e.g. {'if': 'addr:street:={_calculated_nearby_streetname}', 'then': '{_calculated_nearby_streetname}'}" - }, - { - "path": [ - "pointRendering", - "cssClasses", - "mappings", - "then" - ], - "required": true, - "hints": { - "typehint": "rendered", - "question": "What text should be shown?" - }, - "type": [ - { - "$ref": "#/definitions/Record" - }, - { - "type": "string" - } - ], - "description": "If the condition `if` is met, the text `then` will be rendered.\nIf not known yet, the user will be presented with `then` as an option" - }, - { - "path": [ - "pointRendering", - "cssClasses", - "mappings", - "icon" - ], - "required": false, - "hints": { - "typehint": "icon", - "question": "What icon should be added to this mapping?", - "ifunset": "Do not show an extra icon next to the render value", - "inline": " {icon}" - }, - "type": [ - { - "type": "object", - "properties": { - "path": { - "description": "The path to the icon\nType: icon", - "type": "string" - }, - "class": { - "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)", - "type": "string" - } - }, - "required": [ - "path" - ] - }, - { - "type": "string" - } - ], - "description": "An icon supporting this mapping; typically shown pretty small.\nThis can be used to show a 'phone'-icon next to the phone number" - }, - { - "path": [ - "pointRendering", - "cssClasses", - "mappings", - "icon", - "path" - ], - "required": true, - "hints": { - "typehint": "icon" - }, - "type": "string", - "description": "The path to the icon" - }, - { - "path": [ - "pointRendering", - "cssClasses", - "mappings", - "icon", - "class" - ], - "required": false, - "hints": {}, - "type": "string", - "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)" - }, - { - "path": [ - "pointRendering", - "cssClasses", - "description" - ], - "required": false, - "hints": {}, - "type": [ - { - "$ref": "#/definitions/Record" - }, - { - "type": "string" - } - ], - "description": "A human-readable text explaining what this tagRendering does.\nMostly used for the shared tagrenderings" - }, - { - "path": [ - "pointRendering", - "cssClasses", - "classes" - ], - "required": false, - "hints": { - "question": "What css-classes should be applied to showing this attribute?" - }, - "type": "string", - "description": "A list of css-classes to apply to the entire tagRendering.\nThese classes are applied in 'answer'-mode, not in question mode\nThis is only for advanced users.\nValues are split on ` ` (space)" - }, { "path": [ "pointRendering", @@ -6288,6 +4944,7 @@ "required": false, "hints": { "types": "Dynamic value ; string", + "group": "expert", "question": "What CSS should be applied to the label?", "ifunset": "Do not apply extra CSS-labels to the label", "inline": "Apply CSS-style {value} to the label" @@ -6298,7 +4955,7 @@ "type": "object", "properties": { "render": { - "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered", + "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered\nifunset: no text is rendered if no predefined options match", "anyOf": [ { "$ref": "#/definitions/Record" @@ -6335,7 +4992,7 @@ ] }, "icon": { - "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon", + "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon\nifunset: do not show an icon next to the \"render\"-value", "anyOf": [ { "type": "object", @@ -6481,7 +5138,8 @@ "required": false, "hints": { "typehint": "rendered", - "question": "What text should be rendered?" + "question": "What text should be rendered?", + "ifunset": "no text is rendered if no predefined options match" }, "type": [ { @@ -6528,7 +5186,8 @@ "required": false, "hints": { "typehint": "icon", - "question": "what icon should be shown next to the 'render' value?" + "question": "what icon should be shown next to the 'render' value?", + "ifunset": "do not show an icon next to the \"render\"-value" }, "type": [ { @@ -6969,7 +5628,13 @@ "types": "Dynamic value ; string", "question": "Which CSS-classes should be applied to the label?", "ifunset": "Do not apply extra CSS-classes to the label", - "inline": "Apply CSS-classes {value} to the label" + "inline": "Apply CSS-classes {value} to the label", + "suggestions": [ + { + "if": "value=bg-white rounded px-2", + "then": "Draw on a white background" + } + ] }, "type": [ { @@ -6977,7 +5642,7 @@ "type": "object", "properties": { "render": { - "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered", + "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered\nifunset: no text is rendered if no predefined options match", "anyOf": [ { "$ref": "#/definitions/Record" @@ -7014,7 +5679,7 @@ ] }, "icon": { - "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon", + "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon\nifunset: do not show an icon next to the \"render\"-value", "anyOf": [ { "type": "object", @@ -7160,7 +5825,8 @@ "required": false, "hints": { "typehint": "rendered", - "question": "What text should be rendered?" + "question": "What text should be rendered?", + "ifunset": "no text is rendered if no predefined options match" }, "type": [ { @@ -7207,7 +5873,8 @@ "required": false, "hints": { "typehint": "icon", - "question": "what icon should be shown next to the 'render' value?" + "question": "what icon should be shown next to the 'render' value?", + "ifunset": "do not show an icon next to the \"render\"-value" }, "type": [ { @@ -7641,21 +6308,15 @@ { "path": [ "pointRendering", - "pitchAlignment" + "css" ], "required": false, "hints": { - "question": "If the map is pitched, should the icon stay parallel to the screen or to the groundplane?", - "suggestions": [ - { - "if": "value=canvas", - "then": "The icon will stay upward and not be transformed as if it sticks to the screen" - }, - { - "if": "value=map", - "then": "The icon will be transformed as if it were painted onto the ground. (Automatically sets rotationAlignment)" - } - ] + "types": "Dynamic value ; string", + "group": "expert", + "question": "What CSS should be applied to the entire marker?", + "ifunset": "Do not apply extra CSS element to the entire marker", + "inline": "Apply CSS-style {value} to the _entire marker_" }, "type": [ { @@ -7663,7 +6324,7 @@ "type": "object", "properties": { "render": { - "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered", + "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered\nifunset: no text is rendered if no predefined options match", "anyOf": [ { "$ref": "#/definitions/Record" @@ -7700,7 +6361,1378 @@ ] }, "icon": { - "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon", + "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon\nifunset: do not show an icon next to the \"render\"-value", + "anyOf": [ + { + "type": "object", + "properties": { + "path": { + "description": "The path to the icon\nType: icon", + "type": "string" + }, + "class": { + "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)", + "type": "string" + } + }, + "required": [ + "path" + ] + }, + { + "type": "string" + } + ] + }, + "condition": { + "description": "question: When should this item be shown?\ntype: tag\nifunset: No specific condition set; always show this tagRendering or ask the question if unkown\n\nOnly 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/{and:TagConfigJson[];}" + }, + { + "$ref": "#/definitions/{or:TagConfigJson[];}" + }, + { + "type": "string" + } + ] + }, + "metacondition": { + "description": "question: When should this item be shown (including special conditions)?\ntype: tag\n\nIf 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/{and:TagConfigJson[];}" + }, + { + "$ref": "#/definitions/{or:TagConfigJson[];}" + }, + { + "type": "string" + } + ] + }, + "freeform": { + "description": "question: Should a freeform text field be shown?\nAllow freeform text input from the user\nifunset: Do not add a freeform text field", + "type": "object", + "properties": { + "key": { + "description": "What attribute should be filled out\nIf this key is present in the feature, then 'render' is used to display the value.\nIf this is undefined, the rendering is _always_ shown", + "type": "string" + } + } + }, + "mappings": { + "description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes", + "type": "array", + "items": { + "type": "object", + "properties": { + "if": { + "$ref": "#/definitions/TagConfigJson", + "description": "question: When should this single mapping match?\n\nIf this condition is met, then the text under `then` will be shown.\nIf no value matches, and the user selects this mapping as an option, then these tags will be uploaded to OSM.\n\nFor example: {'if': 'diet:vegetarion=yes', 'then':'A vegetarian option is offered here'}\n\nThis can be an substituting-tag as well, e.g. {'if': 'addr:street:={_calculated_nearby_streetname}', 'then': '{_calculated_nearby_streetname}'}" + }, + "then": { + "description": "question: What text should be shown?\n\nIf the condition `if` is met, the text `then` will be rendered.\nIf not known yet, the user will be presented with `then` as an option\nType: rendered", + "anyOf": [ + { + "$ref": "#/definitions/Record" + }, + { + "type": "string" + } + ] + }, + "icon": { + "description": "question: What icon should be added to this mapping?\nifunset: Do not show an extra icon next to the render value\n\nAn icon supporting this mapping; typically shown pretty small.\nThis can be used to show a 'phone'-icon next to the phone number\ninline: {icon}\nType: icon", + "anyOf": [ + { + "type": "object", + "properties": { + "path": { + "description": "The path to the icon\nType: icon", + "type": "string" + }, + "class": { + "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)", + "type": "string" + } + }, + "required": [ + "path" + ] + }, + { + "type": "string" + } + ] + } + }, + "required": [ + "if", + "then" + ] + } + }, + "description": { + "description": "A human-readable text explaining what this tagRendering does.\nMostly used for the shared tagrenderings", + "anyOf": [ + { + "$ref": "#/definitions/Record" + }, + { + "type": "string" + } + ] + }, + "classes": { + "description": "question: What css-classes should be applied to showing this attribute?\n\nA list of css-classes to apply to the entire tagRendering.\nThese classes are applied in 'answer'-mode, not in question mode\nThis is only for advanced users.\n\nValues are split on ` ` (space)", + "type": "string" + } + }, + "additionalProperties": false + }, + { + "type": "string" + } + ], + "description": "You can set the css-properties here, e.g. `background: red; font-size: 12px; `\nThis will be applied to the _container_ containing both the marker and the label" + }, + { + "path": [ + "pointRendering", + "css", + "render" + ], + "required": false, + "hints": { + "typehint": "rendered", + "question": "What text should be rendered?", + "ifunset": "no text is rendered if no predefined options match" + }, + "type": [ + { + "$ref": "#/definitions/Record" + }, + { + "type": "object", + "properties": { + "special": { + "allOf": [ + { + "$ref": "#/definitions/Record>" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string" + } + }, + "required": [ + "type" + ] + } + ] + } + }, + "required": [ + "special" + ] + }, + { + "type": "string" + } + ], + "description": "This piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`" + }, + { + "path": [ + "pointRendering", + "css", + "icon" + ], + "required": false, + "hints": { + "typehint": "icon", + "question": "what icon should be shown next to the 'render' value?", + "ifunset": "do not show an icon next to the \"render\"-value" + }, + "type": [ + { + "type": "object", + "properties": { + "path": { + "description": "The path to the icon\nType: icon", + "type": "string" + }, + "class": { + "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)", + "type": "string" + } + }, + "required": [ + "path" + ] + }, + { + "type": "string" + } + ], + "description": "An icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value" + }, + { + "path": [ + "pointRendering", + "css", + "icon", + "path" + ], + "required": true, + "hints": { + "typehint": "icon" + }, + "type": "string", + "description": "The path to the icon" + }, + { + "path": [ + "pointRendering", + "css", + "icon", + "class" + ], + "required": false, + "hints": {}, + "type": "string", + "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)" + }, + { + "path": [ + "pointRendering", + "css", + "condition" + ], + "required": false, + "hints": { + "typehint": "tag", + "question": "When should this item be shown?", + "ifunset": "No specific condition set; always show this tagRendering or ask the question if unkown" + }, + "type": [ + { + "$ref": "#/definitions/{and:TagConfigJson[];}" + }, + { + "$ref": "#/definitions/{or:TagConfigJson[];}" + }, + { + "type": "string" + } + ], + "description": "Only show this tagrendering (or ask the question) if the selected object also matches the tags specified as `condition`.\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\"`\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": [ + "pointRendering", + "css", + "condition", + "and" + ], + "required": false, + "hints": { + "typehint": "tag" + }, + "type": [ + { + "$ref": "#/definitions/{and:TagConfigJson[];}" + }, + { + "type": "object", + "properties": { + "or": { + "type": "array", + "items": { + "$ref": "#/definitions/TagConfigJson" + } + } + }, + "required": [ + "or" + ] + }, + { + "type": "string" + } + ], + "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" + }, + { + "path": [ + "pointRendering", + "css", + "condition", + "or" + ], + "required": false, + "hints": { + "typehint": "tag" + }, + "type": [ + { + "$ref": "#/definitions/{and:TagConfigJson[];}" + }, + { + "type": "object", + "properties": { + "or": { + "type": "array", + "items": { + "$ref": "#/definitions/TagConfigJson" + } + } + }, + "required": [ + "or" + ] + }, + { + "type": "string" + } + ], + "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" + }, + { + "path": [ + "pointRendering", + "css", + "metacondition" + ], + "required": false, + "hints": { + "typehint": "tag", + "question": "When should this item be shown (including special conditions)?" + }, + "type": [ + { + "$ref": "#/definitions/{and:TagConfigJson[];}" + }, + { + "$ref": "#/definitions/{or:TagConfigJson[];}" + }, + { + "type": "string" + } + ], + "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": [ + "pointRendering", + "css", + "metacondition", + "and" + ], + "required": false, + "hints": { + "typehint": "tag" + }, + "type": [ + { + "$ref": "#/definitions/{and:TagConfigJson[];}" + }, + { + "type": "object", + "properties": { + "or": { + "type": "array", + "items": { + "$ref": "#/definitions/TagConfigJson" + } + } + }, + "required": [ + "or" + ] + }, + { + "type": "string" + } + ], + "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" + }, + { + "path": [ + "pointRendering", + "css", + "metacondition", + "or" + ], + "required": false, + "hints": { + "typehint": "tag" + }, + "type": [ + { + "$ref": "#/definitions/{and:TagConfigJson[];}" + }, + { + "type": "object", + "properties": { + "or": { + "type": "array", + "items": { + "$ref": "#/definitions/TagConfigJson" + } + } + }, + "required": [ + "or" + ] + }, + { + "type": "string" + } + ], + "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" + }, + { + "path": [ + "pointRendering", + "css", + "freeform" + ], + "required": false, + "hints": { + "question": "Should a freeform text field be shown?", + "ifunset": "Do not add a freeform text field" + }, + "type": "object", + "description": "Allow freeform text input from the user" + }, + { + "path": [ + "pointRendering", + "css", + "freeform", + "key" + ], + "required": false, + "hints": {}, + "type": "string", + "description": "What attribute should be filled out\nIf this key is present in the feature, then 'render' is used to display the value.\nIf this is undefined, the rendering is _always_ shown" + }, + { + "path": [ + "pointRendering", + "css", + "mappings" + ], + "required": false, + "hints": {}, + "type": "array", + "description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes" + }, + { + "path": [ + "pointRendering", + "css", + "mappings", + "if" + ], + "required": true, + "hints": { + "typehint": "tag", + "question": "When should this single mapping match?" + }, + "type": [ + { + "$ref": "#/definitions/{and:TagConfigJson[];}" + }, + { + "type": "object", + "properties": { + "or": { + "type": "array", + "items": { + "$ref": "#/definitions/TagConfigJson" + } + } + }, + "required": [ + "or" + ] + }, + { + "type": "string" + } + ], + "description": "If this condition is met, then the text under `then` will be shown.\nIf no value matches, and the user selects this mapping as an option, then these tags will be uploaded to OSM.\nFor example: {'if': 'diet:vegetarion=yes', 'then':'A vegetarian option is offered here'}\nThis can be an substituting-tag as well, e.g. {'if': 'addr:street:={_calculated_nearby_streetname}', 'then': '{_calculated_nearby_streetname}'}" + }, + { + "path": [ + "pointRendering", + "css", + "mappings", + "then" + ], + "required": true, + "hints": { + "typehint": "rendered", + "question": "What text should be shown?" + }, + "type": [ + { + "$ref": "#/definitions/Record" + }, + { + "type": "string" + } + ], + "description": "If the condition `if` is met, the text `then` will be rendered.\nIf not known yet, the user will be presented with `then` as an option" + }, + { + "path": [ + "pointRendering", + "css", + "mappings", + "icon" + ], + "required": false, + "hints": { + "typehint": "icon", + "question": "What icon should be added to this mapping?", + "ifunset": "Do not show an extra icon next to the render value", + "inline": " {icon}" + }, + "type": [ + { + "type": "object", + "properties": { + "path": { + "description": "The path to the icon\nType: icon", + "type": "string" + }, + "class": { + "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)", + "type": "string" + } + }, + "required": [ + "path" + ] + }, + { + "type": "string" + } + ], + "description": "An icon supporting this mapping; typically shown pretty small.\nThis can be used to show a 'phone'-icon next to the phone number" + }, + { + "path": [ + "pointRendering", + "css", + "mappings", + "icon", + "path" + ], + "required": true, + "hints": { + "typehint": "icon" + }, + "type": "string", + "description": "The path to the icon" + }, + { + "path": [ + "pointRendering", + "css", + "mappings", + "icon", + "class" + ], + "required": false, + "hints": {}, + "type": "string", + "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)" + }, + { + "path": [ + "pointRendering", + "css", + "description" + ], + "required": false, + "hints": {}, + "type": [ + { + "$ref": "#/definitions/Record" + }, + { + "type": "string" + } + ], + "description": "A human-readable text explaining what this tagRendering does.\nMostly used for the shared tagrenderings" + }, + { + "path": [ + "pointRendering", + "css", + "classes" + ], + "required": false, + "hints": { + "question": "What css-classes should be applied to showing this attribute?" + }, + "type": "string", + "description": "A list of css-classes to apply to the entire tagRendering.\nThese classes are applied in 'answer'-mode, not in question mode\nThis is only for advanced users.\nValues are split on ` ` (space)" + }, + { + "path": [ + "pointRendering", + "cssClasses" + ], + "required": false, + "hints": { + "types": "Dynamic value ; string", + "group": "expert", + "question": "Which CSS-classes should be applied to the entire marker?", + "ifunset": "Do not apply extra CSS-classes to the label", + "inline": "Apply CSS-classes {value} to the entire container" + }, + "type": [ + { + "description": "A TagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nFor an _editable_ tagRendering, use 'QuestionableTagRenderingConfigJson' instead, which extends this one", + "type": "object", + "properties": { + "render": { + "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered\nifunset: no text is rendered if no predefined options match", + "anyOf": [ + { + "$ref": "#/definitions/Record" + }, + { + "type": "object", + "properties": { + "special": { + "allOf": [ + { + "$ref": "#/definitions/Record>" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string" + } + }, + "required": [ + "type" + ] + } + ] + } + }, + "required": [ + "special" + ] + }, + { + "type": "string" + } + ] + }, + "icon": { + "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon\nifunset: do not show an icon next to the \"render\"-value", + "anyOf": [ + { + "type": "object", + "properties": { + "path": { + "description": "The path to the icon\nType: icon", + "type": "string" + }, + "class": { + "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)", + "type": "string" + } + }, + "required": [ + "path" + ] + }, + { + "type": "string" + } + ] + }, + "condition": { + "description": "question: When should this item be shown?\ntype: tag\nifunset: No specific condition set; always show this tagRendering or ask the question if unkown\n\nOnly 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/{and:TagConfigJson[];}" + }, + { + "$ref": "#/definitions/{or:TagConfigJson[];}" + }, + { + "type": "string" + } + ] + }, + "metacondition": { + "description": "question: When should this item be shown (including special conditions)?\ntype: tag\n\nIf 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/{and:TagConfigJson[];}" + }, + { + "$ref": "#/definitions/{or:TagConfigJson[];}" + }, + { + "type": "string" + } + ] + }, + "freeform": { + "description": "question: Should a freeform text field be shown?\nAllow freeform text input from the user\nifunset: Do not add a freeform text field", + "type": "object", + "properties": { + "key": { + "description": "What attribute should be filled out\nIf this key is present in the feature, then 'render' is used to display the value.\nIf this is undefined, the rendering is _always_ shown", + "type": "string" + } + } + }, + "mappings": { + "description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes", + "type": "array", + "items": { + "type": "object", + "properties": { + "if": { + "$ref": "#/definitions/TagConfigJson", + "description": "question: When should this single mapping match?\n\nIf this condition is met, then the text under `then` will be shown.\nIf no value matches, and the user selects this mapping as an option, then these tags will be uploaded to OSM.\n\nFor example: {'if': 'diet:vegetarion=yes', 'then':'A vegetarian option is offered here'}\n\nThis can be an substituting-tag as well, e.g. {'if': 'addr:street:={_calculated_nearby_streetname}', 'then': '{_calculated_nearby_streetname}'}" + }, + "then": { + "description": "question: What text should be shown?\n\nIf the condition `if` is met, the text `then` will be rendered.\nIf not known yet, the user will be presented with `then` as an option\nType: rendered", + "anyOf": [ + { + "$ref": "#/definitions/Record" + }, + { + "type": "string" + } + ] + }, + "icon": { + "description": "question: What icon should be added to this mapping?\nifunset: Do not show an extra icon next to the render value\n\nAn icon supporting this mapping; typically shown pretty small.\nThis can be used to show a 'phone'-icon next to the phone number\ninline: {icon}\nType: icon", + "anyOf": [ + { + "type": "object", + "properties": { + "path": { + "description": "The path to the icon\nType: icon", + "type": "string" + }, + "class": { + "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)", + "type": "string" + } + }, + "required": [ + "path" + ] + }, + { + "type": "string" + } + ] + } + }, + "required": [ + "if", + "then" + ] + } + }, + "description": { + "description": "A human-readable text explaining what this tagRendering does.\nMostly used for the shared tagrenderings", + "anyOf": [ + { + "$ref": "#/definitions/Record" + }, + { + "type": "string" + } + ] + }, + "classes": { + "description": "question: What css-classes should be applied to showing this attribute?\n\nA list of css-classes to apply to the entire tagRendering.\nThese classes are applied in 'answer'-mode, not in question mode\nThis is only for advanced users.\n\nValues are split on ` ` (space)", + "type": "string" + } + }, + "additionalProperties": false + }, + { + "type": "string" + } + ], + "description": "This will be applied to the _container_ containing both the marker and the label\nThe classes should be separated by a space (` `)\nYou can use most Tailwind-css classes, see https://tailwindcss.com/ for more information\nFor example: `center bg-gray-500 mx-2 my-1 rounded-full`" + }, + { + "path": [ + "pointRendering", + "cssClasses", + "render" + ], + "required": false, + "hints": { + "typehint": "rendered", + "question": "What text should be rendered?", + "ifunset": "no text is rendered if no predefined options match" + }, + "type": [ + { + "$ref": "#/definitions/Record" + }, + { + "type": "object", + "properties": { + "special": { + "allOf": [ + { + "$ref": "#/definitions/Record>" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string" + } + }, + "required": [ + "type" + ] + } + ] + } + }, + "required": [ + "special" + ] + }, + { + "type": "string" + } + ], + "description": "This piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`" + }, + { + "path": [ + "pointRendering", + "cssClasses", + "icon" + ], + "required": false, + "hints": { + "typehint": "icon", + "question": "what icon should be shown next to the 'render' value?", + "ifunset": "do not show an icon next to the \"render\"-value" + }, + "type": [ + { + "type": "object", + "properties": { + "path": { + "description": "The path to the icon\nType: icon", + "type": "string" + }, + "class": { + "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)", + "type": "string" + } + }, + "required": [ + "path" + ] + }, + { + "type": "string" + } + ], + "description": "An icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value" + }, + { + "path": [ + "pointRendering", + "cssClasses", + "icon", + "path" + ], + "required": true, + "hints": { + "typehint": "icon" + }, + "type": "string", + "description": "The path to the icon" + }, + { + "path": [ + "pointRendering", + "cssClasses", + "icon", + "class" + ], + "required": false, + "hints": {}, + "type": "string", + "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)" + }, + { + "path": [ + "pointRendering", + "cssClasses", + "condition" + ], + "required": false, + "hints": { + "typehint": "tag", + "question": "When should this item be shown?", + "ifunset": "No specific condition set; always show this tagRendering or ask the question if unkown" + }, + "type": [ + { + "$ref": "#/definitions/{and:TagConfigJson[];}" + }, + { + "$ref": "#/definitions/{or:TagConfigJson[];}" + }, + { + "type": "string" + } + ], + "description": "Only show this tagrendering (or ask the question) if the selected object also matches the tags specified as `condition`.\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\"`\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": [ + "pointRendering", + "cssClasses", + "condition", + "and" + ], + "required": false, + "hints": { + "typehint": "tag" + }, + "type": [ + { + "$ref": "#/definitions/{and:TagConfigJson[];}" + }, + { + "type": "object", + "properties": { + "or": { + "type": "array", + "items": { + "$ref": "#/definitions/TagConfigJson" + } + } + }, + "required": [ + "or" + ] + }, + { + "type": "string" + } + ], + "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" + }, + { + "path": [ + "pointRendering", + "cssClasses", + "condition", + "or" + ], + "required": false, + "hints": { + "typehint": "tag" + }, + "type": [ + { + "$ref": "#/definitions/{and:TagConfigJson[];}" + }, + { + "type": "object", + "properties": { + "or": { + "type": "array", + "items": { + "$ref": "#/definitions/TagConfigJson" + } + } + }, + "required": [ + "or" + ] + }, + { + "type": "string" + } + ], + "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" + }, + { + "path": [ + "pointRendering", + "cssClasses", + "metacondition" + ], + "required": false, + "hints": { + "typehint": "tag", + "question": "When should this item be shown (including special conditions)?" + }, + "type": [ + { + "$ref": "#/definitions/{and:TagConfigJson[];}" + }, + { + "$ref": "#/definitions/{or:TagConfigJson[];}" + }, + { + "type": "string" + } + ], + "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": [ + "pointRendering", + "cssClasses", + "metacondition", + "and" + ], + "required": false, + "hints": { + "typehint": "tag" + }, + "type": [ + { + "$ref": "#/definitions/{and:TagConfigJson[];}" + }, + { + "type": "object", + "properties": { + "or": { + "type": "array", + "items": { + "$ref": "#/definitions/TagConfigJson" + } + } + }, + "required": [ + "or" + ] + }, + { + "type": "string" + } + ], + "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" + }, + { + "path": [ + "pointRendering", + "cssClasses", + "metacondition", + "or" + ], + "required": false, + "hints": { + "typehint": "tag" + }, + "type": [ + { + "$ref": "#/definitions/{and:TagConfigJson[];}" + }, + { + "type": "object", + "properties": { + "or": { + "type": "array", + "items": { + "$ref": "#/definitions/TagConfigJson" + } + } + }, + "required": [ + "or" + ] + }, + { + "type": "string" + } + ], + "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" + }, + { + "path": [ + "pointRendering", + "cssClasses", + "freeform" + ], + "required": false, + "hints": { + "question": "Should a freeform text field be shown?", + "ifunset": "Do not add a freeform text field" + }, + "type": "object", + "description": "Allow freeform text input from the user" + }, + { + "path": [ + "pointRendering", + "cssClasses", + "freeform", + "key" + ], + "required": false, + "hints": {}, + "type": "string", + "description": "What attribute should be filled out\nIf this key is present in the feature, then 'render' is used to display the value.\nIf this is undefined, the rendering is _always_ shown" + }, + { + "path": [ + "pointRendering", + "cssClasses", + "mappings" + ], + "required": false, + "hints": {}, + "type": "array", + "description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes" + }, + { + "path": [ + "pointRendering", + "cssClasses", + "mappings", + "if" + ], + "required": true, + "hints": { + "typehint": "tag", + "question": "When should this single mapping match?" + }, + "type": [ + { + "$ref": "#/definitions/{and:TagConfigJson[];}" + }, + { + "type": "object", + "properties": { + "or": { + "type": "array", + "items": { + "$ref": "#/definitions/TagConfigJson" + } + } + }, + "required": [ + "or" + ] + }, + { + "type": "string" + } + ], + "description": "If this condition is met, then the text under `then` will be shown.\nIf no value matches, and the user selects this mapping as an option, then these tags will be uploaded to OSM.\nFor example: {'if': 'diet:vegetarion=yes', 'then':'A vegetarian option is offered here'}\nThis can be an substituting-tag as well, e.g. {'if': 'addr:street:={_calculated_nearby_streetname}', 'then': '{_calculated_nearby_streetname}'}" + }, + { + "path": [ + "pointRendering", + "cssClasses", + "mappings", + "then" + ], + "required": true, + "hints": { + "typehint": "rendered", + "question": "What text should be shown?" + }, + "type": [ + { + "$ref": "#/definitions/Record" + }, + { + "type": "string" + } + ], + "description": "If the condition `if` is met, the text `then` will be rendered.\nIf not known yet, the user will be presented with `then` as an option" + }, + { + "path": [ + "pointRendering", + "cssClasses", + "mappings", + "icon" + ], + "required": false, + "hints": { + "typehint": "icon", + "question": "What icon should be added to this mapping?", + "ifunset": "Do not show an extra icon next to the render value", + "inline": " {icon}" + }, + "type": [ + { + "type": "object", + "properties": { + "path": { + "description": "The path to the icon\nType: icon", + "type": "string" + }, + "class": { + "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)", + "type": "string" + } + }, + "required": [ + "path" + ] + }, + { + "type": "string" + } + ], + "description": "An icon supporting this mapping; typically shown pretty small.\nThis can be used to show a 'phone'-icon next to the phone number" + }, + { + "path": [ + "pointRendering", + "cssClasses", + "mappings", + "icon", + "path" + ], + "required": true, + "hints": { + "typehint": "icon" + }, + "type": "string", + "description": "The path to the icon" + }, + { + "path": [ + "pointRendering", + "cssClasses", + "mappings", + "icon", + "class" + ], + "required": false, + "hints": {}, + "type": "string", + "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)" + }, + { + "path": [ + "pointRendering", + "cssClasses", + "description" + ], + "required": false, + "hints": {}, + "type": [ + { + "$ref": "#/definitions/Record" + }, + { + "type": "string" + } + ], + "description": "A human-readable text explaining what this tagRendering does.\nMostly used for the shared tagrenderings" + }, + { + "path": [ + "pointRendering", + "cssClasses", + "classes" + ], + "required": false, + "hints": { + "question": "What css-classes should be applied to showing this attribute?" + }, + "type": "string", + "description": "A list of css-classes to apply to the entire tagRendering.\nThese classes are applied in 'answer'-mode, not in question mode\nThis is only for advanced users.\nValues are split on ` ` (space)" + }, + { + "path": [ + "pointRendering", + "pitchAlignment" + ], + "required": false, + "hints": { + "group": "expert", + "question": "If the map is pitched, should the icon stay parallel to the screen or to the groundplane?", + "suggestions": [ + { + "if": "value=canvas", + "then": "The icon will stay upward and not be transformed as if it sticks to the screen" + }, + { + "if": "value=map", + "then": "The icon will be transformed as if it were painted onto the ground. (Automatically sets rotationAlignment)" + } + ] + }, + "type": [ + { + "description": "A TagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nFor an _editable_ tagRendering, use 'QuestionableTagRenderingConfigJson' instead, which extends this one", + "type": "object", + "properties": { + "render": { + "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered\nifunset: no text is rendered if no predefined options match", + "anyOf": [ + { + "$ref": "#/definitions/Record" + }, + { + "type": "object", + "properties": { + "special": { + "allOf": [ + { + "$ref": "#/definitions/Record>" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string" + } + }, + "required": [ + "type" + ] + } + ] + } + }, + "required": [ + "special" + ] + }, + { + "type": "string" + } + ] + }, + "icon": { + "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon\nifunset: do not show an icon next to the \"render\"-value", "anyOf": [ { "type": "object", @@ -7850,7 +7882,8 @@ "required": false, "hints": { "typehint": "rendered", - "question": "What text should be rendered?" + "question": "What text should be rendered?", + "ifunset": "no text is rendered if no predefined options match" }, "type": [ { @@ -7897,7 +7930,8 @@ "required": false, "hints": { "typehint": "icon", - "question": "what icon should be shown next to the 'render' value?" + "question": "what icon should be shown next to the 'render' value?", + "ifunset": "do not show an icon next to the \"render\"-value" }, "type": [ { @@ -8335,6 +8369,7 @@ ], "required": false, "hints": { + "group": "expert", "question": "Should the icon be rotated if the map is rotated?", "ifunset": "Do not rotate or tilt icons. Always keep the icons straight", "suggestions": [ @@ -8354,7 +8389,7 @@ "type": "object", "properties": { "render": { - "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered", + "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered\nifunset: no text is rendered if no predefined options match", "anyOf": [ { "$ref": "#/definitions/Record" @@ -8391,7 +8426,7 @@ ] }, "icon": { - "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon", + "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon\nifunset: do not show an icon next to the \"render\"-value", "anyOf": [ { "type": "object", @@ -8541,7 +8576,8 @@ "required": false, "hints": { "typehint": "rendered", - "question": "What text should be rendered?" + "question": "What text should be rendered?", + "ifunset": "no text is rendered if no predefined options match" }, "type": [ { @@ -8588,7 +8624,8 @@ "required": false, "hints": { "typehint": "icon", - "question": "what icon should be shown next to the 'render' value?" + "question": "what icon should be shown next to the 'render' value?", + "ifunset": "do not show an icon next to the \"render\"-value" }, "type": [ { @@ -10520,7 +10557,7 @@ } }, "render": { - "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered", + "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered\nifunset: no text is rendered if no predefined options match", "anyOf": [ { "$ref": "#/definitions/Record" @@ -10557,7 +10594,7 @@ ] }, "icon": { - "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon", + "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon\nifunset: do not show an icon next to the \"render\"-value", "anyOf": [ { "type": "object", @@ -11500,7 +11537,8 @@ "required": false, "hints": { "typehint": "rendered", - "question": "What text should be rendered?" + "question": "What text should be rendered?", + "ifunset": "no text is rendered if no predefined options match" }, "type": [ { @@ -11546,7 +11584,8 @@ "required": false, "hints": { "typehint": "icon", - "question": "what icon should be shown next to the 'render' value?" + "question": "what icon should be shown next to the 'render' value?", + "ifunset": "do not show an icon next to the \"render\"-value" }, "type": [ { @@ -12660,7 +12699,8 @@ "required": false, "hints": { "typehint": "rendered", - "question": "What text should be rendered?" + "question": "What text should be rendered?", + "ifunset": "no text is rendered if no predefined options match" }, "type": [ { @@ -12707,7 +12747,8 @@ "required": false, "hints": { "typehint": "icon", - "question": "what icon should be shown next to the 'render' value?" + "question": "what icon should be shown next to the 'render' value?", + "ifunset": "do not show an icon next to the \"render\"-value" }, "type": [ { @@ -13840,7 +13881,8 @@ "required": false, "hints": { "typehint": "rendered", - "question": "What text should be rendered?" + "question": "What text should be rendered?", + "ifunset": "no text is rendered if no predefined options match" }, "type": [ { @@ -13887,7 +13929,8 @@ "required": false, "hints": { "typehint": "icon", - "question": "what icon should be shown next to the 'render' value?" + "question": "what icon should be shown next to the 'render' value?", + "ifunset": "do not show an icon next to the \"render\"-value" }, "type": [ { @@ -15045,7 +15088,8 @@ "required": false, "hints": { "typehint": "rendered", - "question": "What text should be rendered?" + "question": "What text should be rendered?", + "ifunset": "no text is rendered if no predefined options match" }, "type": [ { @@ -15093,7 +15137,8 @@ "required": false, "hints": { "typehint": "icon", - "question": "what icon should be shown next to the 'render' value?" + "question": "what icon should be shown next to the 'render' value?", + "ifunset": "do not show an icon next to the \"render\"-value" }, "type": [ { diff --git a/src/assets/schemas/layoutconfigmeta.json b/src/assets/schemas/layoutconfigmeta.json index 26c575757..8de5863af 100644 --- a/src/assets/schemas/layoutconfigmeta.json +++ b/src/assets/schemas/layoutconfigmeta.json @@ -238,7 +238,7 @@ "path": [ "startZoom" ], - "required": true, + "required": false, "hints": { "typehint": "float", "group": "start_location", @@ -252,7 +252,7 @@ "path": [ "startLat" ], - "required": true, + "required": false, "hints": { "typehint": "float", "group": "start_location", @@ -266,7 +266,7 @@ "path": [ "startLon" ], - "required": true, + "required": false, "hints": { "typehint": "float", "group": "start_location", @@ -1005,7 +1005,7 @@ "type": "object", "properties": { "render": { - "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered", + "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered\nifunset: no text is rendered if no predefined options match", "anyOf": [ { "$ref": "#/definitions/Record" @@ -1042,7 +1042,7 @@ ] }, "icon": { - "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon", + "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon\nifunset: do not show an icon next to the \"render\"-value", "anyOf": [ { "type": "object", @@ -1411,7 +1411,7 @@ } }, "render": { - "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered", + "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered\nifunset: no text is rendered if no predefined options match", "anyOf": [ { "$ref": "#/definitions/Record" @@ -1448,7 +1448,7 @@ ] }, "icon": { - "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon", + "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon\nifunset: do not show an icon next to the \"render\"-value", "anyOf": [ { "type": "object", @@ -2194,7 +2194,7 @@ "type": "object", "properties": { "render": { - "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered", + "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered\nifunset: no text is rendered if no predefined options match", "anyOf": [ { "$ref": "#/definitions/Record" @@ -2231,7 +2231,7 @@ ] }, "icon": { - "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon", + "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon\nifunset: do not show an icon next to the \"render\"-value", "anyOf": [ { "type": "object", @@ -2377,7 +2377,8 @@ "required": false, "hints": { "typehint": "rendered", - "question": "What text should be rendered?" + "question": "What text should be rendered?", + "ifunset": "no text is rendered if no predefined options match" }, "type": [ { @@ -2424,7 +2425,8 @@ "required": false, "hints": { "typehint": "icon", - "question": "what icon should be shown next to the 'render' value?" + "question": "what icon should be shown next to the 'render' value?", + "ifunset": "do not show an icon next to the \"render\"-value" }, "type": [ { @@ -2920,7 +2922,8 @@ "required": false, "hints": { "typehint": "rendered", - "question": "What text should be rendered?" + "question": "What text should be rendered?", + "ifunset": "no text is rendered if no predefined options match" }, "type": [ { @@ -2967,7 +2970,8 @@ "required": false, "hints": { "typehint": "icon", - "question": "what icon should be shown next to the 'render' value?" + "question": "what icon should be shown next to the 'render' value?", + "ifunset": "do not show an icon next to the \"render\"-value" }, "type": [ { @@ -3868,7 +3872,9 @@ "iconBadges" ], "required": false, - "hints": {}, + "hints": { + "group": "hidden" + }, "type": "array", "description": "A list of extra badges to show next to the icon as small badge\nThey will be added as a 25% height icon at the bottom right of the icon, with all the badges in a flex layout.\nNote: strings are interpreted as icons, so layering and substituting is supported. You can use `circle:white;./my_icon.svg` to add a background circle" }, @@ -4056,7 +4062,7 @@ "type": "object", "properties": { "render": { - "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered", + "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered\nifunset: no text is rendered if no predefined options match", "anyOf": [ { "$ref": "#/definitions/Record" @@ -4093,7 +4099,7 @@ ] }, "icon": { - "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon", + "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon\nifunset: do not show an icon next to the \"render\"-value", "anyOf": [ { "type": "object", @@ -4240,7 +4246,8 @@ "required": false, "hints": { "typehint": "rendered", - "question": "What text should be rendered?" + "question": "What text should be rendered?", + "ifunset": "no text is rendered if no predefined options match" }, "type": [ { @@ -4288,7 +4295,8 @@ "required": false, "hints": { "typehint": "icon", - "question": "what icon should be shown next to the 'render' value?" + "question": "what icon should be shown next to the 'render' value?", + "ifunset": "do not show an icon next to the \"render\"-value" }, "type": [ { @@ -4776,7 +4784,7 @@ "type": "object", "properties": { "render": { - "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered", + "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered\nifunset: no text is rendered if no predefined options match", "anyOf": [ { "$ref": "#/definitions/Record" @@ -4813,7 +4821,7 @@ ] }, "icon": { - "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon", + "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon\nifunset: do not show an icon next to the \"render\"-value", "anyOf": [ { "type": "object", @@ -4960,7 +4968,8 @@ "required": false, "hints": { "typehint": "rendered", - "question": "What text should be rendered?" + "question": "What text should be rendered?", + "ifunset": "no text is rendered if no predefined options match" }, "type": [ { @@ -5008,7 +5017,8 @@ "required": false, "hints": { "typehint": "icon", - "question": "what icon should be shown next to the 'render' value?" + "question": "what icon should be shown next to the 'render' value?", + "ifunset": "do not show an icon next to the \"render\"-value" }, "type": [ { @@ -5474,7 +5484,7 @@ "type": "object", "properties": { "render": { - "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered", + "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered\nifunset: no text is rendered if no predefined options match", "anyOf": [ { "$ref": "#/definitions/Record" @@ -5511,7 +5521,7 @@ ] }, "icon": { - "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon", + "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon\nifunset: do not show an icon next to the \"render\"-value", "anyOf": [ { "type": "object", @@ -5658,7 +5668,8 @@ "required": false, "hints": { "typehint": "rendered", - "question": "What text should be rendered?" + "question": "What text should be rendered?", + "ifunset": "no text is rendered if no predefined options match" }, "type": [ { @@ -5706,7 +5717,8 @@ "required": false, "hints": { "typehint": "icon", - "question": "what icon should be shown next to the 'render' value?" + "question": "what icon should be shown next to the 'render' value?", + "ifunset": "do not show an icon next to the \"render\"-value" }, "type": [ { @@ -6174,7 +6186,7 @@ "type": "object", "properties": { "render": { - "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered", + "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered\nifunset: no text is rendered if no predefined options match", "anyOf": [ { "$ref": "#/definitions/Record" @@ -6211,7 +6223,7 @@ ] }, "icon": { - "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon", + "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon\nifunset: do not show an icon next to the \"render\"-value", "anyOf": [ { "type": "object", @@ -6358,7 +6370,8 @@ "required": false, "hints": { "typehint": "rendered", - "question": "What text should be rendered?" + "question": "What text should be rendered?", + "ifunset": "no text is rendered if no predefined options match" }, "type": [ { @@ -6406,7 +6419,8 @@ "required": false, "hints": { "typehint": "icon", - "question": "what icon should be shown next to the 'render' value?" + "question": "what icon should be shown next to the 'render' value?", + "ifunset": "do not show an icon next to the \"render\"-value" }, "type": [ { @@ -6855,1406 +6869,6 @@ "type": "string", "description": "A list of css-classes to apply to the entire tagRendering.\nThese classes are applied in 'answer'-mode, not in question mode\nThis is only for advanced users.\nValues are split on ` ` (space)" }, - { - "path": [ - "layers", - "pointRendering", - "css" - ], - "required": false, - "hints": { - "types": "Dynamic value ; string", - "question": "What CSS should be applied to the entire marker?", - "ifunset": "Do not apply extra CSS element to the entire marker", - "inline": "Apply CSS-style {value} to the _entire marker_" - }, - "type": [ - { - "description": "A TagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nFor an _editable_ tagRendering, use 'QuestionableTagRenderingConfigJson' instead, which extends this one", - "type": "object", - "properties": { - "render": { - "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered", - "anyOf": [ - { - "$ref": "#/definitions/Record" - }, - { - "type": "object", - "properties": { - "special": { - "allOf": [ - { - "$ref": "#/definitions/Record>" - }, - { - "type": "object", - "properties": { - "type": { - "type": "string" - } - }, - "required": [ - "type" - ] - } - ] - } - }, - "required": [ - "special" - ] - }, - { - "type": "string" - } - ] - }, - "icon": { - "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon", - "anyOf": [ - { - "type": "object", - "properties": { - "path": { - "description": "The path to the icon\nType: icon", - "type": "string" - }, - "class": { - "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)", - "type": "string" - } - }, - "required": [ - "path" - ] - }, - { - "type": "string" - } - ] - }, - "condition": { - "description": "question: When should this item be shown?\ntype: tag\nifunset: No specific condition set; always show this tagRendering or ask the question if unkown\n\nOnly 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/{and:TagConfigJson[];}" - }, - { - "$ref": "#/definitions/{or:TagConfigJson[];}" - }, - { - "type": "string" - } - ] - }, - "metacondition": { - "description": "question: When should this item be shown (including special conditions)?\ntype: tag\n\nIf 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/{and:TagConfigJson[];}" - }, - { - "$ref": "#/definitions/{or:TagConfigJson[];}" - }, - { - "type": "string" - } - ] - }, - "freeform": { - "description": "question: Should a freeform text field be shown?\nAllow freeform text input from the user\nifunset: Do not add a freeform text field", - "type": "object", - "properties": { - "key": { - "description": "What attribute should be filled out\nIf this key is present in the feature, then 'render' is used to display the value.\nIf this is undefined, the rendering is _always_ shown", - "type": "string" - } - } - }, - "mappings": { - "description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes", - "type": "array", - "items": { - "type": "object", - "properties": { - "if": { - "$ref": "#/definitions/TagConfigJson", - "description": "question: When should this single mapping match?\n\nIf this condition is met, then the text under `then` will be shown.\nIf no value matches, and the user selects this mapping as an option, then these tags will be uploaded to OSM.\n\nFor example: {'if': 'diet:vegetarion=yes', 'then':'A vegetarian option is offered here'}\n\nThis can be an substituting-tag as well, e.g. {'if': 'addr:street:={_calculated_nearby_streetname}', 'then': '{_calculated_nearby_streetname}'}" - }, - "then": { - "description": "question: What text should be shown?\n\nIf the condition `if` is met, the text `then` will be rendered.\nIf not known yet, the user will be presented with `then` as an option\nType: rendered", - "anyOf": [ - { - "$ref": "#/definitions/Record" - }, - { - "type": "string" - } - ] - }, - "icon": { - "description": "question: What icon should be added to this mapping?\nifunset: Do not show an extra icon next to the render value\n\nAn icon supporting this mapping; typically shown pretty small.\nThis can be used to show a 'phone'-icon next to the phone number\ninline: {icon}\nType: icon", - "anyOf": [ - { - "type": "object", - "properties": { - "path": { - "description": "The path to the icon\nType: icon", - "type": "string" - }, - "class": { - "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)", - "type": "string" - } - }, - "required": [ - "path" - ] - }, - { - "type": "string" - } - ] - } - }, - "required": [ - "if", - "then" - ] - } - }, - "description": { - "description": "A human-readable text explaining what this tagRendering does.\nMostly used for the shared tagrenderings", - "anyOf": [ - { - "$ref": "#/definitions/Record" - }, - { - "type": "string" - } - ] - }, - "classes": { - "description": "question: What css-classes should be applied to showing this attribute?\n\nA list of css-classes to apply to the entire tagRendering.\nThese classes are applied in 'answer'-mode, not in question mode\nThis is only for advanced users.\n\nValues are split on ` ` (space)", - "type": "string" - } - }, - "additionalProperties": false - }, - { - "type": "string" - } - ], - "description": "You can set the css-properties here, e.g. `background: red; font-size: 12px; `\nThis will be applied to the _container_ containing both the marker and the label" - }, - { - "path": [ - "layers", - "pointRendering", - "css", - "render" - ], - "required": false, - "hints": { - "typehint": "rendered", - "question": "What text should be rendered?" - }, - "type": [ - { - "$ref": "#/definitions/Record" - }, - { - "type": "object", - "properties": { - "special": { - "allOf": [ - { - "$ref": "#/definitions/Record>" - }, - { - "type": "object", - "properties": { - "type": { - "type": "string" - } - }, - "required": [ - "type" - ] - } - ] - } - }, - "required": [ - "special" - ] - }, - { - "type": "string" - } - ], - "description": "This piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`" - }, - { - "path": [ - "layers", - "pointRendering", - "css", - "icon" - ], - "required": false, - "hints": { - "typehint": "icon", - "question": "what icon should be shown next to the 'render' value?" - }, - "type": [ - { - "type": "object", - "properties": { - "path": { - "description": "The path to the icon\nType: icon", - "type": "string" - }, - "class": { - "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)", - "type": "string" - } - }, - "required": [ - "path" - ] - }, - { - "type": "string" - } - ], - "description": "An icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value" - }, - { - "path": [ - "layers", - "pointRendering", - "css", - "icon", - "path" - ], - "required": true, - "hints": { - "typehint": "icon" - }, - "type": "string", - "description": "The path to the icon" - }, - { - "path": [ - "layers", - "pointRendering", - "css", - "icon", - "class" - ], - "required": false, - "hints": {}, - "type": "string", - "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)" - }, - { - "path": [ - "layers", - "pointRendering", - "css", - "condition" - ], - "required": false, - "hints": { - "typehint": "tag", - "question": "When should this item be shown?", - "ifunset": "No specific condition set; always show this tagRendering or ask the question if unkown" - }, - "type": [ - { - "$ref": "#/definitions/{and:TagConfigJson[];}" - }, - { - "$ref": "#/definitions/{or:TagConfigJson[];}" - }, - { - "type": "string" - } - ], - "description": "Only show this tagrendering (or ask the question) if the selected object also matches the tags specified as `condition`.\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\"`\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": [ - "layers", - "pointRendering", - "css", - "condition", - "and" - ], - "required": false, - "hints": { - "typehint": "tag" - }, - "type": [ - { - "$ref": "#/definitions/{and:TagConfigJson[];}" - }, - { - "type": "object", - "properties": { - "or": { - "type": "array", - "items": { - "$ref": "#/definitions/TagConfigJson" - } - } - }, - "required": [ - "or" - ] - }, - { - "type": "string" - } - ], - "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" - }, - { - "path": [ - "layers", - "pointRendering", - "css", - "condition", - "or" - ], - "required": false, - "hints": { - "typehint": "tag" - }, - "type": [ - { - "$ref": "#/definitions/{and:TagConfigJson[];}" - }, - { - "type": "object", - "properties": { - "or": { - "type": "array", - "items": { - "$ref": "#/definitions/TagConfigJson" - } - } - }, - "required": [ - "or" - ] - }, - { - "type": "string" - } - ], - "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" - }, - { - "path": [ - "layers", - "pointRendering", - "css", - "metacondition" - ], - "required": false, - "hints": { - "typehint": "tag", - "question": "When should this item be shown (including special conditions)?" - }, - "type": [ - { - "$ref": "#/definitions/{and:TagConfigJson[];}" - }, - { - "$ref": "#/definitions/{or:TagConfigJson[];}" - }, - { - "type": "string" - } - ], - "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": [ - "layers", - "pointRendering", - "css", - "metacondition", - "and" - ], - "required": false, - "hints": { - "typehint": "tag" - }, - "type": [ - { - "$ref": "#/definitions/{and:TagConfigJson[];}" - }, - { - "type": "object", - "properties": { - "or": { - "type": "array", - "items": { - "$ref": "#/definitions/TagConfigJson" - } - } - }, - "required": [ - "or" - ] - }, - { - "type": "string" - } - ], - "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" - }, - { - "path": [ - "layers", - "pointRendering", - "css", - "metacondition", - "or" - ], - "required": false, - "hints": { - "typehint": "tag" - }, - "type": [ - { - "$ref": "#/definitions/{and:TagConfigJson[];}" - }, - { - "type": "object", - "properties": { - "or": { - "type": "array", - "items": { - "$ref": "#/definitions/TagConfigJson" - } - } - }, - "required": [ - "or" - ] - }, - { - "type": "string" - } - ], - "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" - }, - { - "path": [ - "layers", - "pointRendering", - "css", - "freeform" - ], - "required": false, - "hints": { - "question": "Should a freeform text field be shown?", - "ifunset": "Do not add a freeform text field" - }, - "type": "object", - "description": "Allow freeform text input from the user" - }, - { - "path": [ - "layers", - "pointRendering", - "css", - "freeform", - "key" - ], - "required": false, - "hints": {}, - "type": "string", - "description": "What attribute should be filled out\nIf this key is present in the feature, then 'render' is used to display the value.\nIf this is undefined, the rendering is _always_ shown" - }, - { - "path": [ - "layers", - "pointRendering", - "css", - "mappings" - ], - "required": false, - "hints": {}, - "type": "array", - "description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes" - }, - { - "path": [ - "layers", - "pointRendering", - "css", - "mappings", - "if" - ], - "required": true, - "hints": { - "typehint": "tag", - "question": "When should this single mapping match?" - }, - "type": [ - { - "$ref": "#/definitions/{and:TagConfigJson[];}" - }, - { - "type": "object", - "properties": { - "or": { - "type": "array", - "items": { - "$ref": "#/definitions/TagConfigJson" - } - } - }, - "required": [ - "or" - ] - }, - { - "type": "string" - } - ], - "description": "If this condition is met, then the text under `then` will be shown.\nIf no value matches, and the user selects this mapping as an option, then these tags will be uploaded to OSM.\nFor example: {'if': 'diet:vegetarion=yes', 'then':'A vegetarian option is offered here'}\nThis can be an substituting-tag as well, e.g. {'if': 'addr:street:={_calculated_nearby_streetname}', 'then': '{_calculated_nearby_streetname}'}" - }, - { - "path": [ - "layers", - "pointRendering", - "css", - "mappings", - "then" - ], - "required": true, - "hints": { - "typehint": "rendered", - "question": "What text should be shown?" - }, - "type": [ - { - "$ref": "#/definitions/Record" - }, - { - "type": "string" - } - ], - "description": "If the condition `if` is met, the text `then` will be rendered.\nIf not known yet, the user will be presented with `then` as an option" - }, - { - "path": [ - "layers", - "pointRendering", - "css", - "mappings", - "icon" - ], - "required": false, - "hints": { - "typehint": "icon", - "question": "What icon should be added to this mapping?", - "ifunset": "Do not show an extra icon next to the render value", - "inline": " {icon}" - }, - "type": [ - { - "type": "object", - "properties": { - "path": { - "description": "The path to the icon\nType: icon", - "type": "string" - }, - "class": { - "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)", - "type": "string" - } - }, - "required": [ - "path" - ] - }, - { - "type": "string" - } - ], - "description": "An icon supporting this mapping; typically shown pretty small.\nThis can be used to show a 'phone'-icon next to the phone number" - }, - { - "path": [ - "layers", - "pointRendering", - "css", - "mappings", - "icon", - "path" - ], - "required": true, - "hints": { - "typehint": "icon" - }, - "type": "string", - "description": "The path to the icon" - }, - { - "path": [ - "layers", - "pointRendering", - "css", - "mappings", - "icon", - "class" - ], - "required": false, - "hints": {}, - "type": "string", - "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)" - }, - { - "path": [ - "layers", - "pointRendering", - "css", - "description" - ], - "required": false, - "hints": {}, - "type": [ - { - "$ref": "#/definitions/Record" - }, - { - "type": "string" - } - ], - "description": "A human-readable text explaining what this tagRendering does.\nMostly used for the shared tagrenderings" - }, - { - "path": [ - "layers", - "pointRendering", - "css", - "classes" - ], - "required": false, - "hints": { - "question": "What css-classes should be applied to showing this attribute?" - }, - "type": "string", - "description": "A list of css-classes to apply to the entire tagRendering.\nThese classes are applied in 'answer'-mode, not in question mode\nThis is only for advanced users.\nValues are split on ` ` (space)" - }, - { - "path": [ - "layers", - "pointRendering", - "cssClasses" - ], - "required": false, - "hints": { - "types": "Dynamic value ; string", - "question": "Which CSS-classes should be applied to the entire marker?", - "ifunset": "Do not apply extra CSS-classes to the label", - "inline": "Apply CSS-classes {value} to the entire container" - }, - "type": [ - { - "description": "A TagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nFor an _editable_ tagRendering, use 'QuestionableTagRenderingConfigJson' instead, which extends this one", - "type": "object", - "properties": { - "render": { - "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered", - "anyOf": [ - { - "$ref": "#/definitions/Record" - }, - { - "type": "object", - "properties": { - "special": { - "allOf": [ - { - "$ref": "#/definitions/Record>" - }, - { - "type": "object", - "properties": { - "type": { - "type": "string" - } - }, - "required": [ - "type" - ] - } - ] - } - }, - "required": [ - "special" - ] - }, - { - "type": "string" - } - ] - }, - "icon": { - "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon", - "anyOf": [ - { - "type": "object", - "properties": { - "path": { - "description": "The path to the icon\nType: icon", - "type": "string" - }, - "class": { - "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)", - "type": "string" - } - }, - "required": [ - "path" - ] - }, - { - "type": "string" - } - ] - }, - "condition": { - "description": "question: When should this item be shown?\ntype: tag\nifunset: No specific condition set; always show this tagRendering or ask the question if unkown\n\nOnly 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/{and:TagConfigJson[];}" - }, - { - "$ref": "#/definitions/{or:TagConfigJson[];}" - }, - { - "type": "string" - } - ] - }, - "metacondition": { - "description": "question: When should this item be shown (including special conditions)?\ntype: tag\n\nIf 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/{and:TagConfigJson[];}" - }, - { - "$ref": "#/definitions/{or:TagConfigJson[];}" - }, - { - "type": "string" - } - ] - }, - "freeform": { - "description": "question: Should a freeform text field be shown?\nAllow freeform text input from the user\nifunset: Do not add a freeform text field", - "type": "object", - "properties": { - "key": { - "description": "What attribute should be filled out\nIf this key is present in the feature, then 'render' is used to display the value.\nIf this is undefined, the rendering is _always_ shown", - "type": "string" - } - } - }, - "mappings": { - "description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes", - "type": "array", - "items": { - "type": "object", - "properties": { - "if": { - "$ref": "#/definitions/TagConfigJson", - "description": "question: When should this single mapping match?\n\nIf this condition is met, then the text under `then` will be shown.\nIf no value matches, and the user selects this mapping as an option, then these tags will be uploaded to OSM.\n\nFor example: {'if': 'diet:vegetarion=yes', 'then':'A vegetarian option is offered here'}\n\nThis can be an substituting-tag as well, e.g. {'if': 'addr:street:={_calculated_nearby_streetname}', 'then': '{_calculated_nearby_streetname}'}" - }, - "then": { - "description": "question: What text should be shown?\n\nIf the condition `if` is met, the text `then` will be rendered.\nIf not known yet, the user will be presented with `then` as an option\nType: rendered", - "anyOf": [ - { - "$ref": "#/definitions/Record" - }, - { - "type": "string" - } - ] - }, - "icon": { - "description": "question: What icon should be added to this mapping?\nifunset: Do not show an extra icon next to the render value\n\nAn icon supporting this mapping; typically shown pretty small.\nThis can be used to show a 'phone'-icon next to the phone number\ninline: {icon}\nType: icon", - "anyOf": [ - { - "type": "object", - "properties": { - "path": { - "description": "The path to the icon\nType: icon", - "type": "string" - }, - "class": { - "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)", - "type": "string" - } - }, - "required": [ - "path" - ] - }, - { - "type": "string" - } - ] - } - }, - "required": [ - "if", - "then" - ] - } - }, - "description": { - "description": "A human-readable text explaining what this tagRendering does.\nMostly used for the shared tagrenderings", - "anyOf": [ - { - "$ref": "#/definitions/Record" - }, - { - "type": "string" - } - ] - }, - "classes": { - "description": "question: What css-classes should be applied to showing this attribute?\n\nA list of css-classes to apply to the entire tagRendering.\nThese classes are applied in 'answer'-mode, not in question mode\nThis is only for advanced users.\n\nValues are split on ` ` (space)", - "type": "string" - } - }, - "additionalProperties": false - }, - { - "type": "string" - } - ], - "description": "This will be applied to the _container_ containing both the marker and the label\nThe classes should be separated by a space (` `)\nYou can use most Tailwind-css classes, see https://tailwindcss.com/ for more information\nFor example: `center bg-gray-500 mx-2 my-1 rounded-full`" - }, - { - "path": [ - "layers", - "pointRendering", - "cssClasses", - "render" - ], - "required": false, - "hints": { - "typehint": "rendered", - "question": "What text should be rendered?" - }, - "type": [ - { - "$ref": "#/definitions/Record" - }, - { - "type": "object", - "properties": { - "special": { - "allOf": [ - { - "$ref": "#/definitions/Record>" - }, - { - "type": "object", - "properties": { - "type": { - "type": "string" - } - }, - "required": [ - "type" - ] - } - ] - } - }, - "required": [ - "special" - ] - }, - { - "type": "string" - } - ], - "description": "This piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`" - }, - { - "path": [ - "layers", - "pointRendering", - "cssClasses", - "icon" - ], - "required": false, - "hints": { - "typehint": "icon", - "question": "what icon should be shown next to the 'render' value?" - }, - "type": [ - { - "type": "object", - "properties": { - "path": { - "description": "The path to the icon\nType: icon", - "type": "string" - }, - "class": { - "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)", - "type": "string" - } - }, - "required": [ - "path" - ] - }, - { - "type": "string" - } - ], - "description": "An icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value" - }, - { - "path": [ - "layers", - "pointRendering", - "cssClasses", - "icon", - "path" - ], - "required": true, - "hints": { - "typehint": "icon" - }, - "type": "string", - "description": "The path to the icon" - }, - { - "path": [ - "layers", - "pointRendering", - "cssClasses", - "icon", - "class" - ], - "required": false, - "hints": {}, - "type": "string", - "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)" - }, - { - "path": [ - "layers", - "pointRendering", - "cssClasses", - "condition" - ], - "required": false, - "hints": { - "typehint": "tag", - "question": "When should this item be shown?", - "ifunset": "No specific condition set; always show this tagRendering or ask the question if unkown" - }, - "type": [ - { - "$ref": "#/definitions/{and:TagConfigJson[];}" - }, - { - "$ref": "#/definitions/{or:TagConfigJson[];}" - }, - { - "type": "string" - } - ], - "description": "Only show this tagrendering (or ask the question) if the selected object also matches the tags specified as `condition`.\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\"`\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": [ - "layers", - "pointRendering", - "cssClasses", - "condition", - "and" - ], - "required": false, - "hints": { - "typehint": "tag" - }, - "type": [ - { - "$ref": "#/definitions/{and:TagConfigJson[];}" - }, - { - "type": "object", - "properties": { - "or": { - "type": "array", - "items": { - "$ref": "#/definitions/TagConfigJson" - } - } - }, - "required": [ - "or" - ] - }, - { - "type": "string" - } - ], - "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" - }, - { - "path": [ - "layers", - "pointRendering", - "cssClasses", - "condition", - "or" - ], - "required": false, - "hints": { - "typehint": "tag" - }, - "type": [ - { - "$ref": "#/definitions/{and:TagConfigJson[];}" - }, - { - "type": "object", - "properties": { - "or": { - "type": "array", - "items": { - "$ref": "#/definitions/TagConfigJson" - } - } - }, - "required": [ - "or" - ] - }, - { - "type": "string" - } - ], - "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" - }, - { - "path": [ - "layers", - "pointRendering", - "cssClasses", - "metacondition" - ], - "required": false, - "hints": { - "typehint": "tag", - "question": "When should this item be shown (including special conditions)?" - }, - "type": [ - { - "$ref": "#/definitions/{and:TagConfigJson[];}" - }, - { - "$ref": "#/definitions/{or:TagConfigJson[];}" - }, - { - "type": "string" - } - ], - "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": [ - "layers", - "pointRendering", - "cssClasses", - "metacondition", - "and" - ], - "required": false, - "hints": { - "typehint": "tag" - }, - "type": [ - { - "$ref": "#/definitions/{and:TagConfigJson[];}" - }, - { - "type": "object", - "properties": { - "or": { - "type": "array", - "items": { - "$ref": "#/definitions/TagConfigJson" - } - } - }, - "required": [ - "or" - ] - }, - { - "type": "string" - } - ], - "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" - }, - { - "path": [ - "layers", - "pointRendering", - "cssClasses", - "metacondition", - "or" - ], - "required": false, - "hints": { - "typehint": "tag" - }, - "type": [ - { - "$ref": "#/definitions/{and:TagConfigJson[];}" - }, - { - "type": "object", - "properties": { - "or": { - "type": "array", - "items": { - "$ref": "#/definitions/TagConfigJson" - } - } - }, - "required": [ - "or" - ] - }, - { - "type": "string" - } - ], - "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" - }, - { - "path": [ - "layers", - "pointRendering", - "cssClasses", - "freeform" - ], - "required": false, - "hints": { - "question": "Should a freeform text field be shown?", - "ifunset": "Do not add a freeform text field" - }, - "type": "object", - "description": "Allow freeform text input from the user" - }, - { - "path": [ - "layers", - "pointRendering", - "cssClasses", - "freeform", - "key" - ], - "required": false, - "hints": {}, - "type": "string", - "description": "What attribute should be filled out\nIf this key is present in the feature, then 'render' is used to display the value.\nIf this is undefined, the rendering is _always_ shown" - }, - { - "path": [ - "layers", - "pointRendering", - "cssClasses", - "mappings" - ], - "required": false, - "hints": {}, - "type": "array", - "description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes" - }, - { - "path": [ - "layers", - "pointRendering", - "cssClasses", - "mappings", - "if" - ], - "required": true, - "hints": { - "typehint": "tag", - "question": "When should this single mapping match?" - }, - "type": [ - { - "$ref": "#/definitions/{and:TagConfigJson[];}" - }, - { - "type": "object", - "properties": { - "or": { - "type": "array", - "items": { - "$ref": "#/definitions/TagConfigJson" - } - } - }, - "required": [ - "or" - ] - }, - { - "type": "string" - } - ], - "description": "If this condition is met, then the text under `then` will be shown.\nIf no value matches, and the user selects this mapping as an option, then these tags will be uploaded to OSM.\nFor example: {'if': 'diet:vegetarion=yes', 'then':'A vegetarian option is offered here'}\nThis can be an substituting-tag as well, e.g. {'if': 'addr:street:={_calculated_nearby_streetname}', 'then': '{_calculated_nearby_streetname}'}" - }, - { - "path": [ - "layers", - "pointRendering", - "cssClasses", - "mappings", - "then" - ], - "required": true, - "hints": { - "typehint": "rendered", - "question": "What text should be shown?" - }, - "type": [ - { - "$ref": "#/definitions/Record" - }, - { - "type": "string" - } - ], - "description": "If the condition `if` is met, the text `then` will be rendered.\nIf not known yet, the user will be presented with `then` as an option" - }, - { - "path": [ - "layers", - "pointRendering", - "cssClasses", - "mappings", - "icon" - ], - "required": false, - "hints": { - "typehint": "icon", - "question": "What icon should be added to this mapping?", - "ifunset": "Do not show an extra icon next to the render value", - "inline": " {icon}" - }, - "type": [ - { - "type": "object", - "properties": { - "path": { - "description": "The path to the icon\nType: icon", - "type": "string" - }, - "class": { - "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)", - "type": "string" - } - }, - "required": [ - "path" - ] - }, - { - "type": "string" - } - ], - "description": "An icon supporting this mapping; typically shown pretty small.\nThis can be used to show a 'phone'-icon next to the phone number" - }, - { - "path": [ - "layers", - "pointRendering", - "cssClasses", - "mappings", - "icon", - "path" - ], - "required": true, - "hints": { - "typehint": "icon" - }, - "type": "string", - "description": "The path to the icon" - }, - { - "path": [ - "layers", - "pointRendering", - "cssClasses", - "mappings", - "icon", - "class" - ], - "required": false, - "hints": {}, - "type": "string", - "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)" - }, - { - "path": [ - "layers", - "pointRendering", - "cssClasses", - "description" - ], - "required": false, - "hints": {}, - "type": [ - { - "$ref": "#/definitions/Record" - }, - { - "type": "string" - } - ], - "description": "A human-readable text explaining what this tagRendering does.\nMostly used for the shared tagrenderings" - }, - { - "path": [ - "layers", - "pointRendering", - "cssClasses", - "classes" - ], - "required": false, - "hints": { - "question": "What css-classes should be applied to showing this attribute?" - }, - "type": "string", - "description": "A list of css-classes to apply to the entire tagRendering.\nThese classes are applied in 'answer'-mode, not in question mode\nThis is only for advanced users.\nValues are split on ` ` (space)" - }, { "path": [ "layers", @@ -8264,6 +6878,7 @@ "required": false, "hints": { "types": "Dynamic value ; string", + "group": "expert", "question": "What CSS should be applied to the label?", "ifunset": "Do not apply extra CSS-labels to the label", "inline": "Apply CSS-style {value} to the label" @@ -8274,7 +6889,7 @@ "type": "object", "properties": { "render": { - "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered", + "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered\nifunset: no text is rendered if no predefined options match", "anyOf": [ { "$ref": "#/definitions/Record" @@ -8311,7 +6926,7 @@ ] }, "icon": { - "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon", + "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon\nifunset: do not show an icon next to the \"render\"-value", "anyOf": [ { "type": "object", @@ -8458,7 +7073,8 @@ "required": false, "hints": { "typehint": "rendered", - "question": "What text should be rendered?" + "question": "What text should be rendered?", + "ifunset": "no text is rendered if no predefined options match" }, "type": [ { @@ -8506,7 +7122,8 @@ "required": false, "hints": { "typehint": "icon", - "question": "what icon should be shown next to the 'render' value?" + "question": "what icon should be shown next to the 'render' value?", + "ifunset": "do not show an icon next to the \"render\"-value" }, "type": [ { @@ -8966,7 +7583,13 @@ "types": "Dynamic value ; string", "question": "Which CSS-classes should be applied to the label?", "ifunset": "Do not apply extra CSS-classes to the label", - "inline": "Apply CSS-classes {value} to the label" + "inline": "Apply CSS-classes {value} to the label", + "suggestions": [ + { + "if": "value=bg-white rounded px-2", + "then": "Draw on a white background" + } + ] }, "type": [ { @@ -8974,7 +7597,7 @@ "type": "object", "properties": { "render": { - "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered", + "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered\nifunset: no text is rendered if no predefined options match", "anyOf": [ { "$ref": "#/definitions/Record" @@ -9011,7 +7634,7 @@ ] }, "icon": { - "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon", + "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon\nifunset: do not show an icon next to the \"render\"-value", "anyOf": [ { "type": "object", @@ -9158,7 +7781,8 @@ "required": false, "hints": { "typehint": "rendered", - "question": "What text should be rendered?" + "question": "What text should be rendered?", + "ifunset": "no text is rendered if no predefined options match" }, "type": [ { @@ -9206,7 +7830,8 @@ "required": false, "hints": { "typehint": "icon", - "question": "what icon should be shown next to the 'render' value?" + "question": "what icon should be shown next to the 'render' value?", + "ifunset": "do not show an icon next to the \"render\"-value" }, "type": [ { @@ -9659,21 +8284,15 @@ "path": [ "layers", "pointRendering", - "pitchAlignment" + "css" ], "required": false, "hints": { - "question": "If the map is pitched, should the icon stay parallel to the screen or to the groundplane?", - "suggestions": [ - { - "if": "value=canvas", - "then": "The icon will stay upward and not be transformed as if it sticks to the screen" - }, - { - "if": "value=map", - "then": "The icon will be transformed as if it were painted onto the ground. (Automatically sets rotationAlignment)" - } - ] + "types": "Dynamic value ; string", + "group": "expert", + "question": "What CSS should be applied to the entire marker?", + "ifunset": "Do not apply extra CSS element to the entire marker", + "inline": "Apply CSS-style {value} to the _entire marker_" }, "type": [ { @@ -9681,7 +8300,7 @@ "type": "object", "properties": { "render": { - "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered", + "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered\nifunset: no text is rendered if no predefined options match", "anyOf": [ { "$ref": "#/definitions/Record" @@ -9718,7 +8337,1420 @@ ] }, "icon": { - "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon", + "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon\nifunset: do not show an icon next to the \"render\"-value", + "anyOf": [ + { + "type": "object", + "properties": { + "path": { + "description": "The path to the icon\nType: icon", + "type": "string" + }, + "class": { + "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)", + "type": "string" + } + }, + "required": [ + "path" + ] + }, + { + "type": "string" + } + ] + }, + "condition": { + "description": "question: When should this item be shown?\ntype: tag\nifunset: No specific condition set; always show this tagRendering or ask the question if unkown\n\nOnly 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/{and:TagConfigJson[];}" + }, + { + "$ref": "#/definitions/{or:TagConfigJson[];}" + }, + { + "type": "string" + } + ] + }, + "metacondition": { + "description": "question: When should this item be shown (including special conditions)?\ntype: tag\n\nIf 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/{and:TagConfigJson[];}" + }, + { + "$ref": "#/definitions/{or:TagConfigJson[];}" + }, + { + "type": "string" + } + ] + }, + "freeform": { + "description": "question: Should a freeform text field be shown?\nAllow freeform text input from the user\nifunset: Do not add a freeform text field", + "type": "object", + "properties": { + "key": { + "description": "What attribute should be filled out\nIf this key is present in the feature, then 'render' is used to display the value.\nIf this is undefined, the rendering is _always_ shown", + "type": "string" + } + } + }, + "mappings": { + "description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes", + "type": "array", + "items": { + "type": "object", + "properties": { + "if": { + "$ref": "#/definitions/TagConfigJson", + "description": "question: When should this single mapping match?\n\nIf this condition is met, then the text under `then` will be shown.\nIf no value matches, and the user selects this mapping as an option, then these tags will be uploaded to OSM.\n\nFor example: {'if': 'diet:vegetarion=yes', 'then':'A vegetarian option is offered here'}\n\nThis can be an substituting-tag as well, e.g. {'if': 'addr:street:={_calculated_nearby_streetname}', 'then': '{_calculated_nearby_streetname}'}" + }, + "then": { + "description": "question: What text should be shown?\n\nIf the condition `if` is met, the text `then` will be rendered.\nIf not known yet, the user will be presented with `then` as an option\nType: rendered", + "anyOf": [ + { + "$ref": "#/definitions/Record" + }, + { + "type": "string" + } + ] + }, + "icon": { + "description": "question: What icon should be added to this mapping?\nifunset: Do not show an extra icon next to the render value\n\nAn icon supporting this mapping; typically shown pretty small.\nThis can be used to show a 'phone'-icon next to the phone number\ninline: {icon}\nType: icon", + "anyOf": [ + { + "type": "object", + "properties": { + "path": { + "description": "The path to the icon\nType: icon", + "type": "string" + }, + "class": { + "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)", + "type": "string" + } + }, + "required": [ + "path" + ] + }, + { + "type": "string" + } + ] + } + }, + "required": [ + "if", + "then" + ] + } + }, + "description": { + "description": "A human-readable text explaining what this tagRendering does.\nMostly used for the shared tagrenderings", + "anyOf": [ + { + "$ref": "#/definitions/Record" + }, + { + "type": "string" + } + ] + }, + "classes": { + "description": "question: What css-classes should be applied to showing this attribute?\n\nA list of css-classes to apply to the entire tagRendering.\nThese classes are applied in 'answer'-mode, not in question mode\nThis is only for advanced users.\n\nValues are split on ` ` (space)", + "type": "string" + } + }, + "additionalProperties": false + }, + { + "type": "string" + } + ], + "description": "You can set the css-properties here, e.g. `background: red; font-size: 12px; `\nThis will be applied to the _container_ containing both the marker and the label" + }, + { + "path": [ + "layers", + "pointRendering", + "css", + "render" + ], + "required": false, + "hints": { + "typehint": "rendered", + "question": "What text should be rendered?", + "ifunset": "no text is rendered if no predefined options match" + }, + "type": [ + { + "$ref": "#/definitions/Record" + }, + { + "type": "object", + "properties": { + "special": { + "allOf": [ + { + "$ref": "#/definitions/Record>" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string" + } + }, + "required": [ + "type" + ] + } + ] + } + }, + "required": [ + "special" + ] + }, + { + "type": "string" + } + ], + "description": "This piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`" + }, + { + "path": [ + "layers", + "pointRendering", + "css", + "icon" + ], + "required": false, + "hints": { + "typehint": "icon", + "question": "what icon should be shown next to the 'render' value?", + "ifunset": "do not show an icon next to the \"render\"-value" + }, + "type": [ + { + "type": "object", + "properties": { + "path": { + "description": "The path to the icon\nType: icon", + "type": "string" + }, + "class": { + "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)", + "type": "string" + } + }, + "required": [ + "path" + ] + }, + { + "type": "string" + } + ], + "description": "An icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value" + }, + { + "path": [ + "layers", + "pointRendering", + "css", + "icon", + "path" + ], + "required": true, + "hints": { + "typehint": "icon" + }, + "type": "string", + "description": "The path to the icon" + }, + { + "path": [ + "layers", + "pointRendering", + "css", + "icon", + "class" + ], + "required": false, + "hints": {}, + "type": "string", + "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)" + }, + { + "path": [ + "layers", + "pointRendering", + "css", + "condition" + ], + "required": false, + "hints": { + "typehint": "tag", + "question": "When should this item be shown?", + "ifunset": "No specific condition set; always show this tagRendering or ask the question if unkown" + }, + "type": [ + { + "$ref": "#/definitions/{and:TagConfigJson[];}" + }, + { + "$ref": "#/definitions/{or:TagConfigJson[];}" + }, + { + "type": "string" + } + ], + "description": "Only show this tagrendering (or ask the question) if the selected object also matches the tags specified as `condition`.\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\"`\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": [ + "layers", + "pointRendering", + "css", + "condition", + "and" + ], + "required": false, + "hints": { + "typehint": "tag" + }, + "type": [ + { + "$ref": "#/definitions/{and:TagConfigJson[];}" + }, + { + "type": "object", + "properties": { + "or": { + "type": "array", + "items": { + "$ref": "#/definitions/TagConfigJson" + } + } + }, + "required": [ + "or" + ] + }, + { + "type": "string" + } + ], + "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" + }, + { + "path": [ + "layers", + "pointRendering", + "css", + "condition", + "or" + ], + "required": false, + "hints": { + "typehint": "tag" + }, + "type": [ + { + "$ref": "#/definitions/{and:TagConfigJson[];}" + }, + { + "type": "object", + "properties": { + "or": { + "type": "array", + "items": { + "$ref": "#/definitions/TagConfigJson" + } + } + }, + "required": [ + "or" + ] + }, + { + "type": "string" + } + ], + "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" + }, + { + "path": [ + "layers", + "pointRendering", + "css", + "metacondition" + ], + "required": false, + "hints": { + "typehint": "tag", + "question": "When should this item be shown (including special conditions)?" + }, + "type": [ + { + "$ref": "#/definitions/{and:TagConfigJson[];}" + }, + { + "$ref": "#/definitions/{or:TagConfigJson[];}" + }, + { + "type": "string" + } + ], + "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": [ + "layers", + "pointRendering", + "css", + "metacondition", + "and" + ], + "required": false, + "hints": { + "typehint": "tag" + }, + "type": [ + { + "$ref": "#/definitions/{and:TagConfigJson[];}" + }, + { + "type": "object", + "properties": { + "or": { + "type": "array", + "items": { + "$ref": "#/definitions/TagConfigJson" + } + } + }, + "required": [ + "or" + ] + }, + { + "type": "string" + } + ], + "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" + }, + { + "path": [ + "layers", + "pointRendering", + "css", + "metacondition", + "or" + ], + "required": false, + "hints": { + "typehint": "tag" + }, + "type": [ + { + "$ref": "#/definitions/{and:TagConfigJson[];}" + }, + { + "type": "object", + "properties": { + "or": { + "type": "array", + "items": { + "$ref": "#/definitions/TagConfigJson" + } + } + }, + "required": [ + "or" + ] + }, + { + "type": "string" + } + ], + "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" + }, + { + "path": [ + "layers", + "pointRendering", + "css", + "freeform" + ], + "required": false, + "hints": { + "question": "Should a freeform text field be shown?", + "ifunset": "Do not add a freeform text field" + }, + "type": "object", + "description": "Allow freeform text input from the user" + }, + { + "path": [ + "layers", + "pointRendering", + "css", + "freeform", + "key" + ], + "required": false, + "hints": {}, + "type": "string", + "description": "What attribute should be filled out\nIf this key is present in the feature, then 'render' is used to display the value.\nIf this is undefined, the rendering is _always_ shown" + }, + { + "path": [ + "layers", + "pointRendering", + "css", + "mappings" + ], + "required": false, + "hints": {}, + "type": "array", + "description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes" + }, + { + "path": [ + "layers", + "pointRendering", + "css", + "mappings", + "if" + ], + "required": true, + "hints": { + "typehint": "tag", + "question": "When should this single mapping match?" + }, + "type": [ + { + "$ref": "#/definitions/{and:TagConfigJson[];}" + }, + { + "type": "object", + "properties": { + "or": { + "type": "array", + "items": { + "$ref": "#/definitions/TagConfigJson" + } + } + }, + "required": [ + "or" + ] + }, + { + "type": "string" + } + ], + "description": "If this condition is met, then the text under `then` will be shown.\nIf no value matches, and the user selects this mapping as an option, then these tags will be uploaded to OSM.\nFor example: {'if': 'diet:vegetarion=yes', 'then':'A vegetarian option is offered here'}\nThis can be an substituting-tag as well, e.g. {'if': 'addr:street:={_calculated_nearby_streetname}', 'then': '{_calculated_nearby_streetname}'}" + }, + { + "path": [ + "layers", + "pointRendering", + "css", + "mappings", + "then" + ], + "required": true, + "hints": { + "typehint": "rendered", + "question": "What text should be shown?" + }, + "type": [ + { + "$ref": "#/definitions/Record" + }, + { + "type": "string" + } + ], + "description": "If the condition `if` is met, the text `then` will be rendered.\nIf not known yet, the user will be presented with `then` as an option" + }, + { + "path": [ + "layers", + "pointRendering", + "css", + "mappings", + "icon" + ], + "required": false, + "hints": { + "typehint": "icon", + "question": "What icon should be added to this mapping?", + "ifunset": "Do not show an extra icon next to the render value", + "inline": " {icon}" + }, + "type": [ + { + "type": "object", + "properties": { + "path": { + "description": "The path to the icon\nType: icon", + "type": "string" + }, + "class": { + "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)", + "type": "string" + } + }, + "required": [ + "path" + ] + }, + { + "type": "string" + } + ], + "description": "An icon supporting this mapping; typically shown pretty small.\nThis can be used to show a 'phone'-icon next to the phone number" + }, + { + "path": [ + "layers", + "pointRendering", + "css", + "mappings", + "icon", + "path" + ], + "required": true, + "hints": { + "typehint": "icon" + }, + "type": "string", + "description": "The path to the icon" + }, + { + "path": [ + "layers", + "pointRendering", + "css", + "mappings", + "icon", + "class" + ], + "required": false, + "hints": {}, + "type": "string", + "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)" + }, + { + "path": [ + "layers", + "pointRendering", + "css", + "description" + ], + "required": false, + "hints": {}, + "type": [ + { + "$ref": "#/definitions/Record" + }, + { + "type": "string" + } + ], + "description": "A human-readable text explaining what this tagRendering does.\nMostly used for the shared tagrenderings" + }, + { + "path": [ + "layers", + "pointRendering", + "css", + "classes" + ], + "required": false, + "hints": { + "question": "What css-classes should be applied to showing this attribute?" + }, + "type": "string", + "description": "A list of css-classes to apply to the entire tagRendering.\nThese classes are applied in 'answer'-mode, not in question mode\nThis is only for advanced users.\nValues are split on ` ` (space)" + }, + { + "path": [ + "layers", + "pointRendering", + "cssClasses" + ], + "required": false, + "hints": { + "types": "Dynamic value ; string", + "group": "expert", + "question": "Which CSS-classes should be applied to the entire marker?", + "ifunset": "Do not apply extra CSS-classes to the label", + "inline": "Apply CSS-classes {value} to the entire container" + }, + "type": [ + { + "description": "A TagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nFor an _editable_ tagRendering, use 'QuestionableTagRenderingConfigJson' instead, which extends this one", + "type": "object", + "properties": { + "render": { + "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered\nifunset: no text is rendered if no predefined options match", + "anyOf": [ + { + "$ref": "#/definitions/Record" + }, + { + "type": "object", + "properties": { + "special": { + "allOf": [ + { + "$ref": "#/definitions/Record>" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string" + } + }, + "required": [ + "type" + ] + } + ] + } + }, + "required": [ + "special" + ] + }, + { + "type": "string" + } + ] + }, + "icon": { + "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon\nifunset: do not show an icon next to the \"render\"-value", + "anyOf": [ + { + "type": "object", + "properties": { + "path": { + "description": "The path to the icon\nType: icon", + "type": "string" + }, + "class": { + "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)", + "type": "string" + } + }, + "required": [ + "path" + ] + }, + { + "type": "string" + } + ] + }, + "condition": { + "description": "question: When should this item be shown?\ntype: tag\nifunset: No specific condition set; always show this tagRendering or ask the question if unkown\n\nOnly 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/{and:TagConfigJson[];}" + }, + { + "$ref": "#/definitions/{or:TagConfigJson[];}" + }, + { + "type": "string" + } + ] + }, + "metacondition": { + "description": "question: When should this item be shown (including special conditions)?\ntype: tag\n\nIf 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/{and:TagConfigJson[];}" + }, + { + "$ref": "#/definitions/{or:TagConfigJson[];}" + }, + { + "type": "string" + } + ] + }, + "freeform": { + "description": "question: Should a freeform text field be shown?\nAllow freeform text input from the user\nifunset: Do not add a freeform text field", + "type": "object", + "properties": { + "key": { + "description": "What attribute should be filled out\nIf this key is present in the feature, then 'render' is used to display the value.\nIf this is undefined, the rendering is _always_ shown", + "type": "string" + } + } + }, + "mappings": { + "description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes", + "type": "array", + "items": { + "type": "object", + "properties": { + "if": { + "$ref": "#/definitions/TagConfigJson", + "description": "question: When should this single mapping match?\n\nIf this condition is met, then the text under `then` will be shown.\nIf no value matches, and the user selects this mapping as an option, then these tags will be uploaded to OSM.\n\nFor example: {'if': 'diet:vegetarion=yes', 'then':'A vegetarian option is offered here'}\n\nThis can be an substituting-tag as well, e.g. {'if': 'addr:street:={_calculated_nearby_streetname}', 'then': '{_calculated_nearby_streetname}'}" + }, + "then": { + "description": "question: What text should be shown?\n\nIf the condition `if` is met, the text `then` will be rendered.\nIf not known yet, the user will be presented with `then` as an option\nType: rendered", + "anyOf": [ + { + "$ref": "#/definitions/Record" + }, + { + "type": "string" + } + ] + }, + "icon": { + "description": "question: What icon should be added to this mapping?\nifunset: Do not show an extra icon next to the render value\n\nAn icon supporting this mapping; typically shown pretty small.\nThis can be used to show a 'phone'-icon next to the phone number\ninline: {icon}\nType: icon", + "anyOf": [ + { + "type": "object", + "properties": { + "path": { + "description": "The path to the icon\nType: icon", + "type": "string" + }, + "class": { + "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)", + "type": "string" + } + }, + "required": [ + "path" + ] + }, + { + "type": "string" + } + ] + } + }, + "required": [ + "if", + "then" + ] + } + }, + "description": { + "description": "A human-readable text explaining what this tagRendering does.\nMostly used for the shared tagrenderings", + "anyOf": [ + { + "$ref": "#/definitions/Record" + }, + { + "type": "string" + } + ] + }, + "classes": { + "description": "question: What css-classes should be applied to showing this attribute?\n\nA list of css-classes to apply to the entire tagRendering.\nThese classes are applied in 'answer'-mode, not in question mode\nThis is only for advanced users.\n\nValues are split on ` ` (space)", + "type": "string" + } + }, + "additionalProperties": false + }, + { + "type": "string" + } + ], + "description": "This will be applied to the _container_ containing both the marker and the label\nThe classes should be separated by a space (` `)\nYou can use most Tailwind-css classes, see https://tailwindcss.com/ for more information\nFor example: `center bg-gray-500 mx-2 my-1 rounded-full`" + }, + { + "path": [ + "layers", + "pointRendering", + "cssClasses", + "render" + ], + "required": false, + "hints": { + "typehint": "rendered", + "question": "What text should be rendered?", + "ifunset": "no text is rendered if no predefined options match" + }, + "type": [ + { + "$ref": "#/definitions/Record" + }, + { + "type": "object", + "properties": { + "special": { + "allOf": [ + { + "$ref": "#/definitions/Record>" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string" + } + }, + "required": [ + "type" + ] + } + ] + } + }, + "required": [ + "special" + ] + }, + { + "type": "string" + } + ], + "description": "This piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`" + }, + { + "path": [ + "layers", + "pointRendering", + "cssClasses", + "icon" + ], + "required": false, + "hints": { + "typehint": "icon", + "question": "what icon should be shown next to the 'render' value?", + "ifunset": "do not show an icon next to the \"render\"-value" + }, + "type": [ + { + "type": "object", + "properties": { + "path": { + "description": "The path to the icon\nType: icon", + "type": "string" + }, + "class": { + "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)", + "type": "string" + } + }, + "required": [ + "path" + ] + }, + { + "type": "string" + } + ], + "description": "An icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value" + }, + { + "path": [ + "layers", + "pointRendering", + "cssClasses", + "icon", + "path" + ], + "required": true, + "hints": { + "typehint": "icon" + }, + "type": "string", + "description": "The path to the icon" + }, + { + "path": [ + "layers", + "pointRendering", + "cssClasses", + "icon", + "class" + ], + "required": false, + "hints": {}, + "type": "string", + "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)" + }, + { + "path": [ + "layers", + "pointRendering", + "cssClasses", + "condition" + ], + "required": false, + "hints": { + "typehint": "tag", + "question": "When should this item be shown?", + "ifunset": "No specific condition set; always show this tagRendering or ask the question if unkown" + }, + "type": [ + { + "$ref": "#/definitions/{and:TagConfigJson[];}" + }, + { + "$ref": "#/definitions/{or:TagConfigJson[];}" + }, + { + "type": "string" + } + ], + "description": "Only show this tagrendering (or ask the question) if the selected object also matches the tags specified as `condition`.\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\"`\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": [ + "layers", + "pointRendering", + "cssClasses", + "condition", + "and" + ], + "required": false, + "hints": { + "typehint": "tag" + }, + "type": [ + { + "$ref": "#/definitions/{and:TagConfigJson[];}" + }, + { + "type": "object", + "properties": { + "or": { + "type": "array", + "items": { + "$ref": "#/definitions/TagConfigJson" + } + } + }, + "required": [ + "or" + ] + }, + { + "type": "string" + } + ], + "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" + }, + { + "path": [ + "layers", + "pointRendering", + "cssClasses", + "condition", + "or" + ], + "required": false, + "hints": { + "typehint": "tag" + }, + "type": [ + { + "$ref": "#/definitions/{and:TagConfigJson[];}" + }, + { + "type": "object", + "properties": { + "or": { + "type": "array", + "items": { + "$ref": "#/definitions/TagConfigJson" + } + } + }, + "required": [ + "or" + ] + }, + { + "type": "string" + } + ], + "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" + }, + { + "path": [ + "layers", + "pointRendering", + "cssClasses", + "metacondition" + ], + "required": false, + "hints": { + "typehint": "tag", + "question": "When should this item be shown (including special conditions)?" + }, + "type": [ + { + "$ref": "#/definitions/{and:TagConfigJson[];}" + }, + { + "$ref": "#/definitions/{or:TagConfigJson[];}" + }, + { + "type": "string" + } + ], + "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": [ + "layers", + "pointRendering", + "cssClasses", + "metacondition", + "and" + ], + "required": false, + "hints": { + "typehint": "tag" + }, + "type": [ + { + "$ref": "#/definitions/{and:TagConfigJson[];}" + }, + { + "type": "object", + "properties": { + "or": { + "type": "array", + "items": { + "$ref": "#/definitions/TagConfigJson" + } + } + }, + "required": [ + "or" + ] + }, + { + "type": "string" + } + ], + "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" + }, + { + "path": [ + "layers", + "pointRendering", + "cssClasses", + "metacondition", + "or" + ], + "required": false, + "hints": { + "typehint": "tag" + }, + "type": [ + { + "$ref": "#/definitions/{and:TagConfigJson[];}" + }, + { + "type": "object", + "properties": { + "or": { + "type": "array", + "items": { + "$ref": "#/definitions/TagConfigJson" + } + } + }, + "required": [ + "or" + ] + }, + { + "type": "string" + } + ], + "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" + }, + { + "path": [ + "layers", + "pointRendering", + "cssClasses", + "freeform" + ], + "required": false, + "hints": { + "question": "Should a freeform text field be shown?", + "ifunset": "Do not add a freeform text field" + }, + "type": "object", + "description": "Allow freeform text input from the user" + }, + { + "path": [ + "layers", + "pointRendering", + "cssClasses", + "freeform", + "key" + ], + "required": false, + "hints": {}, + "type": "string", + "description": "What attribute should be filled out\nIf this key is present in the feature, then 'render' is used to display the value.\nIf this is undefined, the rendering is _always_ shown" + }, + { + "path": [ + "layers", + "pointRendering", + "cssClasses", + "mappings" + ], + "required": false, + "hints": {}, + "type": "array", + "description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes" + }, + { + "path": [ + "layers", + "pointRendering", + "cssClasses", + "mappings", + "if" + ], + "required": true, + "hints": { + "typehint": "tag", + "question": "When should this single mapping match?" + }, + "type": [ + { + "$ref": "#/definitions/{and:TagConfigJson[];}" + }, + { + "type": "object", + "properties": { + "or": { + "type": "array", + "items": { + "$ref": "#/definitions/TagConfigJson" + } + } + }, + "required": [ + "or" + ] + }, + { + "type": "string" + } + ], + "description": "If this condition is met, then the text under `then` will be shown.\nIf no value matches, and the user selects this mapping as an option, then these tags will be uploaded to OSM.\nFor example: {'if': 'diet:vegetarion=yes', 'then':'A vegetarian option is offered here'}\nThis can be an substituting-tag as well, e.g. {'if': 'addr:street:={_calculated_nearby_streetname}', 'then': '{_calculated_nearby_streetname}'}" + }, + { + "path": [ + "layers", + "pointRendering", + "cssClasses", + "mappings", + "then" + ], + "required": true, + "hints": { + "typehint": "rendered", + "question": "What text should be shown?" + }, + "type": [ + { + "$ref": "#/definitions/Record" + }, + { + "type": "string" + } + ], + "description": "If the condition `if` is met, the text `then` will be rendered.\nIf not known yet, the user will be presented with `then` as an option" + }, + { + "path": [ + "layers", + "pointRendering", + "cssClasses", + "mappings", + "icon" + ], + "required": false, + "hints": { + "typehint": "icon", + "question": "What icon should be added to this mapping?", + "ifunset": "Do not show an extra icon next to the render value", + "inline": " {icon}" + }, + "type": [ + { + "type": "object", + "properties": { + "path": { + "description": "The path to the icon\nType: icon", + "type": "string" + }, + "class": { + "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)", + "type": "string" + } + }, + "required": [ + "path" + ] + }, + { + "type": "string" + } + ], + "description": "An icon supporting this mapping; typically shown pretty small.\nThis can be used to show a 'phone'-icon next to the phone number" + }, + { + "path": [ + "layers", + "pointRendering", + "cssClasses", + "mappings", + "icon", + "path" + ], + "required": true, + "hints": { + "typehint": "icon" + }, + "type": "string", + "description": "The path to the icon" + }, + { + "path": [ + "layers", + "pointRendering", + "cssClasses", + "mappings", + "icon", + "class" + ], + "required": false, + "hints": {}, + "type": "string", + "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)" + }, + { + "path": [ + "layers", + "pointRendering", + "cssClasses", + "description" + ], + "required": false, + "hints": {}, + "type": [ + { + "$ref": "#/definitions/Record" + }, + { + "type": "string" + } + ], + "description": "A human-readable text explaining what this tagRendering does.\nMostly used for the shared tagrenderings" + }, + { + "path": [ + "layers", + "pointRendering", + "cssClasses", + "classes" + ], + "required": false, + "hints": { + "question": "What css-classes should be applied to showing this attribute?" + }, + "type": "string", + "description": "A list of css-classes to apply to the entire tagRendering.\nThese classes are applied in 'answer'-mode, not in question mode\nThis is only for advanced users.\nValues are split on ` ` (space)" + }, + { + "path": [ + "layers", + "pointRendering", + "pitchAlignment" + ], + "required": false, + "hints": { + "group": "expert", + "question": "If the map is pitched, should the icon stay parallel to the screen or to the groundplane?", + "suggestions": [ + { + "if": "value=canvas", + "then": "The icon will stay upward and not be transformed as if it sticks to the screen" + }, + { + "if": "value=map", + "then": "The icon will be transformed as if it were painted onto the ground. (Automatically sets rotationAlignment)" + } + ] + }, + "type": [ + { + "description": "A TagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nFor an _editable_ tagRendering, use 'QuestionableTagRenderingConfigJson' instead, which extends this one", + "type": "object", + "properties": { + "render": { + "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered\nifunset: no text is rendered if no predefined options match", + "anyOf": [ + { + "$ref": "#/definitions/Record" + }, + { + "type": "object", + "properties": { + "special": { + "allOf": [ + { + "$ref": "#/definitions/Record>" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string" + } + }, + "required": [ + "type" + ] + } + ] + } + }, + "required": [ + "special" + ] + }, + { + "type": "string" + } + ] + }, + "icon": { + "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon\nifunset: do not show an icon next to the \"render\"-value", "anyOf": [ { "type": "object", @@ -9869,7 +9901,8 @@ "required": false, "hints": { "typehint": "rendered", - "question": "What text should be rendered?" + "question": "What text should be rendered?", + "ifunset": "no text is rendered if no predefined options match" }, "type": [ { @@ -9917,7 +9950,8 @@ "required": false, "hints": { "typehint": "icon", - "question": "what icon should be shown next to the 'render' value?" + "question": "what icon should be shown next to the 'render' value?", + "ifunset": "do not show an icon next to the \"render\"-value" }, "type": [ { @@ -10374,6 +10408,7 @@ ], "required": false, "hints": { + "group": "expert", "question": "Should the icon be rotated if the map is rotated?", "ifunset": "Do not rotate or tilt icons. Always keep the icons straight", "suggestions": [ @@ -10393,7 +10428,7 @@ "type": "object", "properties": { "render": { - "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered", + "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered\nifunset: no text is rendered if no predefined options match", "anyOf": [ { "$ref": "#/definitions/Record" @@ -10430,7 +10465,7 @@ ] }, "icon": { - "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon", + "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon\nifunset: do not show an icon next to the \"render\"-value", "anyOf": [ { "type": "object", @@ -10581,7 +10616,8 @@ "required": false, "hints": { "typehint": "rendered", - "question": "What text should be rendered?" + "question": "What text should be rendered?", + "ifunset": "no text is rendered if no predefined options match" }, "type": [ { @@ -10629,7 +10665,8 @@ "required": false, "hints": { "typehint": "icon", - "question": "what icon should be shown next to the 'render' value?" + "question": "what icon should be shown next to the 'render' value?", + "ifunset": "do not show an icon next to the \"render\"-value" }, "type": [ { @@ -12618,7 +12655,7 @@ } }, "render": { - "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered", + "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered\nifunset: no text is rendered if no predefined options match", "anyOf": [ { "$ref": "#/definitions/Record" @@ -12655,7 +12692,7 @@ ] }, "icon": { - "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon", + "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon\nifunset: do not show an icon next to the \"render\"-value", "anyOf": [ { "type": "object", @@ -13632,7 +13669,8 @@ "required": false, "hints": { "typehint": "rendered", - "question": "What text should be rendered?" + "question": "What text should be rendered?", + "ifunset": "no text is rendered if no predefined options match" }, "type": [ { @@ -13679,7 +13717,8 @@ "required": false, "hints": { "typehint": "icon", - "question": "what icon should be shown next to the 'render' value?" + "question": "what icon should be shown next to the 'render' value?", + "ifunset": "do not show an icon next to the \"render\"-value" }, "type": [ { @@ -14837,7 +14876,8 @@ "required": false, "hints": { "typehint": "rendered", - "question": "What text should be rendered?" + "question": "What text should be rendered?", + "ifunset": "no text is rendered if no predefined options match" }, "type": [ { @@ -14885,7 +14925,8 @@ "required": false, "hints": { "typehint": "icon", - "question": "what icon should be shown next to the 'render' value?" + "question": "what icon should be shown next to the 'render' value?", + "ifunset": "do not show an icon next to the \"render\"-value" }, "type": [ { @@ -16063,7 +16104,8 @@ "required": false, "hints": { "typehint": "rendered", - "question": "What text should be rendered?" + "question": "What text should be rendered?", + "ifunset": "no text is rendered if no predefined options match" }, "type": [ { @@ -16111,7 +16153,8 @@ "required": false, "hints": { "typehint": "icon", - "question": "what icon should be shown next to the 'render' value?" + "question": "what icon should be shown next to the 'render' value?", + "ifunset": "do not show an icon next to the \"render\"-value" }, "type": [ { @@ -17313,7 +17356,8 @@ "required": false, "hints": { "typehint": "rendered", - "question": "What text should be rendered?" + "question": "What text should be rendered?", + "ifunset": "no text is rendered if no predefined options match" }, "type": [ { @@ -17362,7 +17406,8 @@ "required": false, "hints": { "typehint": "icon", - "question": "what icon should be shown next to the 'render' value?" + "question": "what icon should be shown next to the 'render' value?", + "ifunset": "do not show an icon next to the \"render\"-value" }, "type": [ { @@ -18884,7 +18929,7 @@ "type": "object", "properties": { "render": { - "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered", + "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered\nifunset: no text is rendered if no predefined options match", "anyOf": [ { "$ref": "#/definitions/Record" @@ -18921,7 +18966,7 @@ ] }, "icon": { - "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon", + "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon\nifunset: do not show an icon next to the \"render\"-value", "anyOf": [ { "type": "object", @@ -19068,7 +19113,8 @@ "required": false, "hints": { "typehint": "rendered", - "question": "What text should be rendered?" + "question": "What text should be rendered?", + "ifunset": "no text is rendered if no predefined options match" }, "type": [ { @@ -19116,7 +19162,8 @@ "required": false, "hints": { "typehint": "icon", - "question": "what icon should be shown next to the 'render' value?" + "question": "what icon should be shown next to the 'render' value?", + "ifunset": "do not show an icon next to the \"render\"-value" }, "type": [ { @@ -19633,7 +19680,8 @@ "required": false, "hints": { "typehint": "rendered", - "question": "What text should be rendered?" + "question": "What text should be rendered?", + "ifunset": "no text is rendered if no predefined options match" }, "type": [ { @@ -19681,7 +19729,8 @@ "required": false, "hints": { "typehint": "icon", - "question": "what icon should be shown next to the 'render' value?" + "question": "what icon should be shown next to the 'render' value?", + "ifunset": "do not show an icon next to the \"render\"-value" }, "type": [ { @@ -20615,7 +20664,9 @@ "iconBadges" ], "required": false, - "hints": {}, + "hints": { + "group": "hidden" + }, "type": "array", "description": "A list of extra badges to show next to the icon as small badge\nThey will be added as a 25% height icon at the bottom right of the icon, with all the badges in a flex layout.\nNote: strings are interpreted as icons, so layering and substituting is supported. You can use `circle:white;./my_icon.svg` to add a background circle" }, @@ -20810,7 +20861,7 @@ "type": "object", "properties": { "render": { - "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered", + "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered\nifunset: no text is rendered if no predefined options match", "anyOf": [ { "$ref": "#/definitions/Record" @@ -20847,7 +20898,7 @@ ] }, "icon": { - "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon", + "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon\nifunset: do not show an icon next to the \"render\"-value", "anyOf": [ { "type": "object", @@ -20995,7 +21046,8 @@ "required": false, "hints": { "typehint": "rendered", - "question": "What text should be rendered?" + "question": "What text should be rendered?", + "ifunset": "no text is rendered if no predefined options match" }, "type": [ { @@ -21044,7 +21096,8 @@ "required": false, "hints": { "typehint": "icon", - "question": "what icon should be shown next to the 'render' value?" + "question": "what icon should be shown next to the 'render' value?", + "ifunset": "do not show an icon next to the \"render\"-value" }, "type": [ { @@ -21551,7 +21604,7 @@ "type": "object", "properties": { "render": { - "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered", + "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered\nifunset: no text is rendered if no predefined options match", "anyOf": [ { "$ref": "#/definitions/Record" @@ -21588,7 +21641,7 @@ ] }, "icon": { - "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon", + "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon\nifunset: do not show an icon next to the \"render\"-value", "anyOf": [ { "type": "object", @@ -21736,7 +21789,8 @@ "required": false, "hints": { "typehint": "rendered", - "question": "What text should be rendered?" + "question": "What text should be rendered?", + "ifunset": "no text is rendered if no predefined options match" }, "type": [ { @@ -21785,7 +21839,8 @@ "required": false, "hints": { "typehint": "icon", - "question": "what icon should be shown next to the 'render' value?" + "question": "what icon should be shown next to the 'render' value?", + "ifunset": "do not show an icon next to the \"render\"-value" }, "type": [ { @@ -22270,7 +22325,7 @@ "type": "object", "properties": { "render": { - "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered", + "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered\nifunset: no text is rendered if no predefined options match", "anyOf": [ { "$ref": "#/definitions/Record" @@ -22307,7 +22362,7 @@ ] }, "icon": { - "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon", + "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon\nifunset: do not show an icon next to the \"render\"-value", "anyOf": [ { "type": "object", @@ -22455,7 +22510,8 @@ "required": false, "hints": { "typehint": "rendered", - "question": "What text should be rendered?" + "question": "What text should be rendered?", + "ifunset": "no text is rendered if no predefined options match" }, "type": [ { @@ -22504,7 +22560,8 @@ "required": false, "hints": { "typehint": "icon", - "question": "what icon should be shown next to the 'render' value?" + "question": "what icon should be shown next to the 'render' value?", + "ifunset": "do not show an icon next to the \"render\"-value" }, "type": [ { @@ -22991,7 +23048,7 @@ "type": "object", "properties": { "render": { - "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered", + "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered\nifunset: no text is rendered if no predefined options match", "anyOf": [ { "$ref": "#/definitions/Record" @@ -23028,7 +23085,7 @@ ] }, "icon": { - "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon", + "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon\nifunset: do not show an icon next to the \"render\"-value", "anyOf": [ { "type": "object", @@ -23176,7 +23233,8 @@ "required": false, "hints": { "typehint": "rendered", - "question": "What text should be rendered?" + "question": "What text should be rendered?", + "ifunset": "no text is rendered if no predefined options match" }, "type": [ { @@ -23225,7 +23283,8 @@ "required": false, "hints": { "typehint": "icon", - "question": "what icon should be shown next to the 'render' value?" + "question": "what icon should be shown next to the 'render' value?", + "ifunset": "do not show an icon next to the \"render\"-value" }, "type": [ { @@ -23692,1448 +23751,6 @@ "type": "string", "description": "A list of css-classes to apply to the entire tagRendering.\nThese classes are applied in 'answer'-mode, not in question mode\nThis is only for advanced users.\nValues are split on ` ` (space)" }, - { - "path": [ - "layers", - "override", - "pointRendering", - "css" - ], - "required": false, - "hints": { - "types": "Dynamic value ; string", - "question": "What CSS should be applied to the entire marker?", - "ifunset": "Do not apply extra CSS element to the entire marker", - "inline": "Apply CSS-style {value} to the _entire marker_" - }, - "type": [ - { - "description": "A TagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nFor an _editable_ tagRendering, use 'QuestionableTagRenderingConfigJson' instead, which extends this one", - "type": "object", - "properties": { - "render": { - "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered", - "anyOf": [ - { - "$ref": "#/definitions/Record" - }, - { - "type": "object", - "properties": { - "special": { - "allOf": [ - { - "$ref": "#/definitions/Record>" - }, - { - "type": "object", - "properties": { - "type": { - "type": "string" - } - }, - "required": [ - "type" - ] - } - ] - } - }, - "required": [ - "special" - ] - }, - { - "type": "string" - } - ] - }, - "icon": { - "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon", - "anyOf": [ - { - "type": "object", - "properties": { - "path": { - "description": "The path to the icon\nType: icon", - "type": "string" - }, - "class": { - "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)", - "type": "string" - } - }, - "required": [ - "path" - ] - }, - { - "type": "string" - } - ] - }, - "condition": { - "description": "question: When should this item be shown?\ntype: tag\nifunset: No specific condition set; always show this tagRendering or ask the question if unkown\n\nOnly 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/{and:TagConfigJson[];}" - }, - { - "$ref": "#/definitions/{or:TagConfigJson[];}" - }, - { - "type": "string" - } - ] - }, - "metacondition": { - "description": "question: When should this item be shown (including special conditions)?\ntype: tag\n\nIf 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/{and:TagConfigJson[];}" - }, - { - "$ref": "#/definitions/{or:TagConfigJson[];}" - }, - { - "type": "string" - } - ] - }, - "freeform": { - "description": "question: Should a freeform text field be shown?\nAllow freeform text input from the user\nifunset: Do not add a freeform text field", - "type": "object", - "properties": { - "key": { - "description": "What attribute should be filled out\nIf this key is present in the feature, then 'render' is used to display the value.\nIf this is undefined, the rendering is _always_ shown", - "type": "string" - } - } - }, - "mappings": { - "description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes", - "type": "array", - "items": { - "type": "object", - "properties": { - "if": { - "$ref": "#/definitions/TagConfigJson", - "description": "question: When should this single mapping match?\n\nIf this condition is met, then the text under `then` will be shown.\nIf no value matches, and the user selects this mapping as an option, then these tags will be uploaded to OSM.\n\nFor example: {'if': 'diet:vegetarion=yes', 'then':'A vegetarian option is offered here'}\n\nThis can be an substituting-tag as well, e.g. {'if': 'addr:street:={_calculated_nearby_streetname}', 'then': '{_calculated_nearby_streetname}'}" - }, - "then": { - "description": "question: What text should be shown?\n\nIf the condition `if` is met, the text `then` will be rendered.\nIf not known yet, the user will be presented with `then` as an option\nType: rendered", - "anyOf": [ - { - "$ref": "#/definitions/Record" - }, - { - "type": "string" - } - ] - }, - "icon": { - "description": "question: What icon should be added to this mapping?\nifunset: Do not show an extra icon next to the render value\n\nAn icon supporting this mapping; typically shown pretty small.\nThis can be used to show a 'phone'-icon next to the phone number\ninline: {icon}\nType: icon", - "anyOf": [ - { - "type": "object", - "properties": { - "path": { - "description": "The path to the icon\nType: icon", - "type": "string" - }, - "class": { - "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)", - "type": "string" - } - }, - "required": [ - "path" - ] - }, - { - "type": "string" - } - ] - } - }, - "required": [ - "if", - "then" - ] - } - }, - "description": { - "description": "A human-readable text explaining what this tagRendering does.\nMostly used for the shared tagrenderings", - "anyOf": [ - { - "$ref": "#/definitions/Record" - }, - { - "type": "string" - } - ] - }, - "classes": { - "description": "question: What css-classes should be applied to showing this attribute?\n\nA list of css-classes to apply to the entire tagRendering.\nThese classes are applied in 'answer'-mode, not in question mode\nThis is only for advanced users.\n\nValues are split on ` ` (space)", - "type": "string" - } - }, - "additionalProperties": false - }, - { - "type": "string" - } - ], - "description": "You can set the css-properties here, e.g. `background: red; font-size: 12px; `\nThis will be applied to the _container_ containing both the marker and the label" - }, - { - "path": [ - "layers", - "override", - "pointRendering", - "css", - "render" - ], - "required": false, - "hints": { - "typehint": "rendered", - "question": "What text should be rendered?" - }, - "type": [ - { - "$ref": "#/definitions/Record" - }, - { - "type": "object", - "properties": { - "special": { - "allOf": [ - { - "$ref": "#/definitions/Record>" - }, - { - "type": "object", - "properties": { - "type": { - "type": "string" - } - }, - "required": [ - "type" - ] - } - ] - } - }, - "required": [ - "special" - ] - }, - { - "type": "string" - } - ], - "description": "This piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`" - }, - { - "path": [ - "layers", - "override", - "pointRendering", - "css", - "icon" - ], - "required": false, - "hints": { - "typehint": "icon", - "question": "what icon should be shown next to the 'render' value?" - }, - "type": [ - { - "type": "object", - "properties": { - "path": { - "description": "The path to the icon\nType: icon", - "type": "string" - }, - "class": { - "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)", - "type": "string" - } - }, - "required": [ - "path" - ] - }, - { - "type": "string" - } - ], - "description": "An icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value" - }, - { - "path": [ - "layers", - "override", - "pointRendering", - "css", - "icon", - "path" - ], - "required": true, - "hints": { - "typehint": "icon" - }, - "type": "string", - "description": "The path to the icon" - }, - { - "path": [ - "layers", - "override", - "pointRendering", - "css", - "icon", - "class" - ], - "required": false, - "hints": {}, - "type": "string", - "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)" - }, - { - "path": [ - "layers", - "override", - "pointRendering", - "css", - "condition" - ], - "required": false, - "hints": { - "typehint": "tag", - "question": "When should this item be shown?", - "ifunset": "No specific condition set; always show this tagRendering or ask the question if unkown" - }, - "type": [ - { - "$ref": "#/definitions/{and:TagConfigJson[];}" - }, - { - "$ref": "#/definitions/{or:TagConfigJson[];}" - }, - { - "type": "string" - } - ], - "description": "Only show this tagrendering (or ask the question) if the selected object also matches the tags specified as `condition`.\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\"`\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": [ - "layers", - "override", - "pointRendering", - "css", - "condition", - "and" - ], - "required": false, - "hints": { - "typehint": "tag" - }, - "type": [ - { - "$ref": "#/definitions/{and:TagConfigJson[];}" - }, - { - "type": "object", - "properties": { - "or": { - "type": "array", - "items": { - "$ref": "#/definitions/TagConfigJson" - } - } - }, - "required": [ - "or" - ] - }, - { - "type": "string" - } - ], - "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" - }, - { - "path": [ - "layers", - "override", - "pointRendering", - "css", - "condition", - "or" - ], - "required": false, - "hints": { - "typehint": "tag" - }, - "type": [ - { - "$ref": "#/definitions/{and:TagConfigJson[];}" - }, - { - "type": "object", - "properties": { - "or": { - "type": "array", - "items": { - "$ref": "#/definitions/TagConfigJson" - } - } - }, - "required": [ - "or" - ] - }, - { - "type": "string" - } - ], - "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" - }, - { - "path": [ - "layers", - "override", - "pointRendering", - "css", - "metacondition" - ], - "required": false, - "hints": { - "typehint": "tag", - "question": "When should this item be shown (including special conditions)?" - }, - "type": [ - { - "$ref": "#/definitions/{and:TagConfigJson[];}" - }, - { - "$ref": "#/definitions/{or:TagConfigJson[];}" - }, - { - "type": "string" - } - ], - "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": [ - "layers", - "override", - "pointRendering", - "css", - "metacondition", - "and" - ], - "required": false, - "hints": { - "typehint": "tag" - }, - "type": [ - { - "$ref": "#/definitions/{and:TagConfigJson[];}" - }, - { - "type": "object", - "properties": { - "or": { - "type": "array", - "items": { - "$ref": "#/definitions/TagConfigJson" - } - } - }, - "required": [ - "or" - ] - }, - { - "type": "string" - } - ], - "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" - }, - { - "path": [ - "layers", - "override", - "pointRendering", - "css", - "metacondition", - "or" - ], - "required": false, - "hints": { - "typehint": "tag" - }, - "type": [ - { - "$ref": "#/definitions/{and:TagConfigJson[];}" - }, - { - "type": "object", - "properties": { - "or": { - "type": "array", - "items": { - "$ref": "#/definitions/TagConfigJson" - } - } - }, - "required": [ - "or" - ] - }, - { - "type": "string" - } - ], - "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" - }, - { - "path": [ - "layers", - "override", - "pointRendering", - "css", - "freeform" - ], - "required": false, - "hints": { - "question": "Should a freeform text field be shown?", - "ifunset": "Do not add a freeform text field" - }, - "type": "object", - "description": "Allow freeform text input from the user" - }, - { - "path": [ - "layers", - "override", - "pointRendering", - "css", - "freeform", - "key" - ], - "required": false, - "hints": {}, - "type": "string", - "description": "What attribute should be filled out\nIf this key is present in the feature, then 'render' is used to display the value.\nIf this is undefined, the rendering is _always_ shown" - }, - { - "path": [ - "layers", - "override", - "pointRendering", - "css", - "mappings" - ], - "required": false, - "hints": {}, - "type": "array", - "description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes" - }, - { - "path": [ - "layers", - "override", - "pointRendering", - "css", - "mappings", - "if" - ], - "required": true, - "hints": { - "typehint": "tag", - "question": "When should this single mapping match?" - }, - "type": [ - { - "$ref": "#/definitions/{and:TagConfigJson[];}" - }, - { - "type": "object", - "properties": { - "or": { - "type": "array", - "items": { - "$ref": "#/definitions/TagConfigJson" - } - } - }, - "required": [ - "or" - ] - }, - { - "type": "string" - } - ], - "description": "If this condition is met, then the text under `then` will be shown.\nIf no value matches, and the user selects this mapping as an option, then these tags will be uploaded to OSM.\nFor example: {'if': 'diet:vegetarion=yes', 'then':'A vegetarian option is offered here'}\nThis can be an substituting-tag as well, e.g. {'if': 'addr:street:={_calculated_nearby_streetname}', 'then': '{_calculated_nearby_streetname}'}" - }, - { - "path": [ - "layers", - "override", - "pointRendering", - "css", - "mappings", - "then" - ], - "required": true, - "hints": { - "typehint": "rendered", - "question": "What text should be shown?" - }, - "type": [ - { - "$ref": "#/definitions/Record" - }, - { - "type": "string" - } - ], - "description": "If the condition `if` is met, the text `then` will be rendered.\nIf not known yet, the user will be presented with `then` as an option" - }, - { - "path": [ - "layers", - "override", - "pointRendering", - "css", - "mappings", - "icon" - ], - "required": false, - "hints": { - "typehint": "icon", - "question": "What icon should be added to this mapping?", - "ifunset": "Do not show an extra icon next to the render value", - "inline": " {icon}" - }, - "type": [ - { - "type": "object", - "properties": { - "path": { - "description": "The path to the icon\nType: icon", - "type": "string" - }, - "class": { - "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)", - "type": "string" - } - }, - "required": [ - "path" - ] - }, - { - "type": "string" - } - ], - "description": "An icon supporting this mapping; typically shown pretty small.\nThis can be used to show a 'phone'-icon next to the phone number" - }, - { - "path": [ - "layers", - "override", - "pointRendering", - "css", - "mappings", - "icon", - "path" - ], - "required": true, - "hints": { - "typehint": "icon" - }, - "type": "string", - "description": "The path to the icon" - }, - { - "path": [ - "layers", - "override", - "pointRendering", - "css", - "mappings", - "icon", - "class" - ], - "required": false, - "hints": {}, - "type": "string", - "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)" - }, - { - "path": [ - "layers", - "override", - "pointRendering", - "css", - "description" - ], - "required": false, - "hints": {}, - "type": [ - { - "$ref": "#/definitions/Record" - }, - { - "type": "string" - } - ], - "description": "A human-readable text explaining what this tagRendering does.\nMostly used for the shared tagrenderings" - }, - { - "path": [ - "layers", - "override", - "pointRendering", - "css", - "classes" - ], - "required": false, - "hints": { - "question": "What css-classes should be applied to showing this attribute?" - }, - "type": "string", - "description": "A list of css-classes to apply to the entire tagRendering.\nThese classes are applied in 'answer'-mode, not in question mode\nThis is only for advanced users.\nValues are split on ` ` (space)" - }, - { - "path": [ - "layers", - "override", - "pointRendering", - "cssClasses" - ], - "required": false, - "hints": { - "types": "Dynamic value ; string", - "question": "Which CSS-classes should be applied to the entire marker?", - "ifunset": "Do not apply extra CSS-classes to the label", - "inline": "Apply CSS-classes {value} to the entire container" - }, - "type": [ - { - "description": "A TagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nFor an _editable_ tagRendering, use 'QuestionableTagRenderingConfigJson' instead, which extends this one", - "type": "object", - "properties": { - "render": { - "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered", - "anyOf": [ - { - "$ref": "#/definitions/Record" - }, - { - "type": "object", - "properties": { - "special": { - "allOf": [ - { - "$ref": "#/definitions/Record>" - }, - { - "type": "object", - "properties": { - "type": { - "type": "string" - } - }, - "required": [ - "type" - ] - } - ] - } - }, - "required": [ - "special" - ] - }, - { - "type": "string" - } - ] - }, - "icon": { - "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon", - "anyOf": [ - { - "type": "object", - "properties": { - "path": { - "description": "The path to the icon\nType: icon", - "type": "string" - }, - "class": { - "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)", - "type": "string" - } - }, - "required": [ - "path" - ] - }, - { - "type": "string" - } - ] - }, - "condition": { - "description": "question: When should this item be shown?\ntype: tag\nifunset: No specific condition set; always show this tagRendering or ask the question if unkown\n\nOnly 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/{and:TagConfigJson[];}" - }, - { - "$ref": "#/definitions/{or:TagConfigJson[];}" - }, - { - "type": "string" - } - ] - }, - "metacondition": { - "description": "question: When should this item be shown (including special conditions)?\ntype: tag\n\nIf 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/{and:TagConfigJson[];}" - }, - { - "$ref": "#/definitions/{or:TagConfigJson[];}" - }, - { - "type": "string" - } - ] - }, - "freeform": { - "description": "question: Should a freeform text field be shown?\nAllow freeform text input from the user\nifunset: Do not add a freeform text field", - "type": "object", - "properties": { - "key": { - "description": "What attribute should be filled out\nIf this key is present in the feature, then 'render' is used to display the value.\nIf this is undefined, the rendering is _always_ shown", - "type": "string" - } - } - }, - "mappings": { - "description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes", - "type": "array", - "items": { - "type": "object", - "properties": { - "if": { - "$ref": "#/definitions/TagConfigJson", - "description": "question: When should this single mapping match?\n\nIf this condition is met, then the text under `then` will be shown.\nIf no value matches, and the user selects this mapping as an option, then these tags will be uploaded to OSM.\n\nFor example: {'if': 'diet:vegetarion=yes', 'then':'A vegetarian option is offered here'}\n\nThis can be an substituting-tag as well, e.g. {'if': 'addr:street:={_calculated_nearby_streetname}', 'then': '{_calculated_nearby_streetname}'}" - }, - "then": { - "description": "question: What text should be shown?\n\nIf the condition `if` is met, the text `then` will be rendered.\nIf not known yet, the user will be presented with `then` as an option\nType: rendered", - "anyOf": [ - { - "$ref": "#/definitions/Record" - }, - { - "type": "string" - } - ] - }, - "icon": { - "description": "question: What icon should be added to this mapping?\nifunset: Do not show an extra icon next to the render value\n\nAn icon supporting this mapping; typically shown pretty small.\nThis can be used to show a 'phone'-icon next to the phone number\ninline: {icon}\nType: icon", - "anyOf": [ - { - "type": "object", - "properties": { - "path": { - "description": "The path to the icon\nType: icon", - "type": "string" - }, - "class": { - "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)", - "type": "string" - } - }, - "required": [ - "path" - ] - }, - { - "type": "string" - } - ] - } - }, - "required": [ - "if", - "then" - ] - } - }, - "description": { - "description": "A human-readable text explaining what this tagRendering does.\nMostly used for the shared tagrenderings", - "anyOf": [ - { - "$ref": "#/definitions/Record" - }, - { - "type": "string" - } - ] - }, - "classes": { - "description": "question: What css-classes should be applied to showing this attribute?\n\nA list of css-classes to apply to the entire tagRendering.\nThese classes are applied in 'answer'-mode, not in question mode\nThis is only for advanced users.\n\nValues are split on ` ` (space)", - "type": "string" - } - }, - "additionalProperties": false - }, - { - "type": "string" - } - ], - "description": "This will be applied to the _container_ containing both the marker and the label\nThe classes should be separated by a space (` `)\nYou can use most Tailwind-css classes, see https://tailwindcss.com/ for more information\nFor example: `center bg-gray-500 mx-2 my-1 rounded-full`" - }, - { - "path": [ - "layers", - "override", - "pointRendering", - "cssClasses", - "render" - ], - "required": false, - "hints": { - "typehint": "rendered", - "question": "What text should be rendered?" - }, - "type": [ - { - "$ref": "#/definitions/Record" - }, - { - "type": "object", - "properties": { - "special": { - "allOf": [ - { - "$ref": "#/definitions/Record>" - }, - { - "type": "object", - "properties": { - "type": { - "type": "string" - } - }, - "required": [ - "type" - ] - } - ] - } - }, - "required": [ - "special" - ] - }, - { - "type": "string" - } - ], - "description": "This piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`" - }, - { - "path": [ - "layers", - "override", - "pointRendering", - "cssClasses", - "icon" - ], - "required": false, - "hints": { - "typehint": "icon", - "question": "what icon should be shown next to the 'render' value?" - }, - "type": [ - { - "type": "object", - "properties": { - "path": { - "description": "The path to the icon\nType: icon", - "type": "string" - }, - "class": { - "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)", - "type": "string" - } - }, - "required": [ - "path" - ] - }, - { - "type": "string" - } - ], - "description": "An icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value" - }, - { - "path": [ - "layers", - "override", - "pointRendering", - "cssClasses", - "icon", - "path" - ], - "required": true, - "hints": { - "typehint": "icon" - }, - "type": "string", - "description": "The path to the icon" - }, - { - "path": [ - "layers", - "override", - "pointRendering", - "cssClasses", - "icon", - "class" - ], - "required": false, - "hints": {}, - "type": "string", - "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)" - }, - { - "path": [ - "layers", - "override", - "pointRendering", - "cssClasses", - "condition" - ], - "required": false, - "hints": { - "typehint": "tag", - "question": "When should this item be shown?", - "ifunset": "No specific condition set; always show this tagRendering or ask the question if unkown" - }, - "type": [ - { - "$ref": "#/definitions/{and:TagConfigJson[];}" - }, - { - "$ref": "#/definitions/{or:TagConfigJson[];}" - }, - { - "type": "string" - } - ], - "description": "Only show this tagrendering (or ask the question) if the selected object also matches the tags specified as `condition`.\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\"`\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": [ - "layers", - "override", - "pointRendering", - "cssClasses", - "condition", - "and" - ], - "required": false, - "hints": { - "typehint": "tag" - }, - "type": [ - { - "$ref": "#/definitions/{and:TagConfigJson[];}" - }, - { - "type": "object", - "properties": { - "or": { - "type": "array", - "items": { - "$ref": "#/definitions/TagConfigJson" - } - } - }, - "required": [ - "or" - ] - }, - { - "type": "string" - } - ], - "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" - }, - { - "path": [ - "layers", - "override", - "pointRendering", - "cssClasses", - "condition", - "or" - ], - "required": false, - "hints": { - "typehint": "tag" - }, - "type": [ - { - "$ref": "#/definitions/{and:TagConfigJson[];}" - }, - { - "type": "object", - "properties": { - "or": { - "type": "array", - "items": { - "$ref": "#/definitions/TagConfigJson" - } - } - }, - "required": [ - "or" - ] - }, - { - "type": "string" - } - ], - "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" - }, - { - "path": [ - "layers", - "override", - "pointRendering", - "cssClasses", - "metacondition" - ], - "required": false, - "hints": { - "typehint": "tag", - "question": "When should this item be shown (including special conditions)?" - }, - "type": [ - { - "$ref": "#/definitions/{and:TagConfigJson[];}" - }, - { - "$ref": "#/definitions/{or:TagConfigJson[];}" - }, - { - "type": "string" - } - ], - "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": [ - "layers", - "override", - "pointRendering", - "cssClasses", - "metacondition", - "and" - ], - "required": false, - "hints": { - "typehint": "tag" - }, - "type": [ - { - "$ref": "#/definitions/{and:TagConfigJson[];}" - }, - { - "type": "object", - "properties": { - "or": { - "type": "array", - "items": { - "$ref": "#/definitions/TagConfigJson" - } - } - }, - "required": [ - "or" - ] - }, - { - "type": "string" - } - ], - "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" - }, - { - "path": [ - "layers", - "override", - "pointRendering", - "cssClasses", - "metacondition", - "or" - ], - "required": false, - "hints": { - "typehint": "tag" - }, - "type": [ - { - "$ref": "#/definitions/{and:TagConfigJson[];}" - }, - { - "type": "object", - "properties": { - "or": { - "type": "array", - "items": { - "$ref": "#/definitions/TagConfigJson" - } - } - }, - "required": [ - "or" - ] - }, - { - "type": "string" - } - ], - "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" - }, - { - "path": [ - "layers", - "override", - "pointRendering", - "cssClasses", - "freeform" - ], - "required": false, - "hints": { - "question": "Should a freeform text field be shown?", - "ifunset": "Do not add a freeform text field" - }, - "type": "object", - "description": "Allow freeform text input from the user" - }, - { - "path": [ - "layers", - "override", - "pointRendering", - "cssClasses", - "freeform", - "key" - ], - "required": false, - "hints": {}, - "type": "string", - "description": "What attribute should be filled out\nIf this key is present in the feature, then 'render' is used to display the value.\nIf this is undefined, the rendering is _always_ shown" - }, - { - "path": [ - "layers", - "override", - "pointRendering", - "cssClasses", - "mappings" - ], - "required": false, - "hints": {}, - "type": "array", - "description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes" - }, - { - "path": [ - "layers", - "override", - "pointRendering", - "cssClasses", - "mappings", - "if" - ], - "required": true, - "hints": { - "typehint": "tag", - "question": "When should this single mapping match?" - }, - "type": [ - { - "$ref": "#/definitions/{and:TagConfigJson[];}" - }, - { - "type": "object", - "properties": { - "or": { - "type": "array", - "items": { - "$ref": "#/definitions/TagConfigJson" - } - } - }, - "required": [ - "or" - ] - }, - { - "type": "string" - } - ], - "description": "If this condition is met, then the text under `then` will be shown.\nIf no value matches, and the user selects this mapping as an option, then these tags will be uploaded to OSM.\nFor example: {'if': 'diet:vegetarion=yes', 'then':'A vegetarian option is offered here'}\nThis can be an substituting-tag as well, e.g. {'if': 'addr:street:={_calculated_nearby_streetname}', 'then': '{_calculated_nearby_streetname}'}" - }, - { - "path": [ - "layers", - "override", - "pointRendering", - "cssClasses", - "mappings", - "then" - ], - "required": true, - "hints": { - "typehint": "rendered", - "question": "What text should be shown?" - }, - "type": [ - { - "$ref": "#/definitions/Record" - }, - { - "type": "string" - } - ], - "description": "If the condition `if` is met, the text `then` will be rendered.\nIf not known yet, the user will be presented with `then` as an option" - }, - { - "path": [ - "layers", - "override", - "pointRendering", - "cssClasses", - "mappings", - "icon" - ], - "required": false, - "hints": { - "typehint": "icon", - "question": "What icon should be added to this mapping?", - "ifunset": "Do not show an extra icon next to the render value", - "inline": " {icon}" - }, - "type": [ - { - "type": "object", - "properties": { - "path": { - "description": "The path to the icon\nType: icon", - "type": "string" - }, - "class": { - "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)", - "type": "string" - } - }, - "required": [ - "path" - ] - }, - { - "type": "string" - } - ], - "description": "An icon supporting this mapping; typically shown pretty small.\nThis can be used to show a 'phone'-icon next to the phone number" - }, - { - "path": [ - "layers", - "override", - "pointRendering", - "cssClasses", - "mappings", - "icon", - "path" - ], - "required": true, - "hints": { - "typehint": "icon" - }, - "type": "string", - "description": "The path to the icon" - }, - { - "path": [ - "layers", - "override", - "pointRendering", - "cssClasses", - "mappings", - "icon", - "class" - ], - "required": false, - "hints": {}, - "type": "string", - "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)" - }, - { - "path": [ - "layers", - "override", - "pointRendering", - "cssClasses", - "description" - ], - "required": false, - "hints": {}, - "type": [ - { - "$ref": "#/definitions/Record" - }, - { - "type": "string" - } - ], - "description": "A human-readable text explaining what this tagRendering does.\nMostly used for the shared tagrenderings" - }, - { - "path": [ - "layers", - "override", - "pointRendering", - "cssClasses", - "classes" - ], - "required": false, - "hints": { - "question": "What css-classes should be applied to showing this attribute?" - }, - "type": "string", - "description": "A list of css-classes to apply to the entire tagRendering.\nThese classes are applied in 'answer'-mode, not in question mode\nThis is only for advanced users.\nValues are split on ` ` (space)" - }, { "path": [ "layers", @@ -25144,6 +23761,7 @@ "required": false, "hints": { "types": "Dynamic value ; string", + "group": "expert", "question": "What CSS should be applied to the label?", "ifunset": "Do not apply extra CSS-labels to the label", "inline": "Apply CSS-style {value} to the label" @@ -25154,7 +23772,7 @@ "type": "object", "properties": { "render": { - "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered", + "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered\nifunset: no text is rendered if no predefined options match", "anyOf": [ { "$ref": "#/definitions/Record" @@ -25191,7 +23809,7 @@ ] }, "icon": { - "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon", + "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon\nifunset: do not show an icon next to the \"render\"-value", "anyOf": [ { "type": "object", @@ -25339,7 +23957,8 @@ "required": false, "hints": { "typehint": "rendered", - "question": "What text should be rendered?" + "question": "What text should be rendered?", + "ifunset": "no text is rendered if no predefined options match" }, "type": [ { @@ -25388,7 +24007,8 @@ "required": false, "hints": { "typehint": "icon", - "question": "what icon should be shown next to the 'render' value?" + "question": "what icon should be shown next to the 'render' value?", + "ifunset": "do not show an icon next to the \"render\"-value" }, "type": [ { @@ -25867,7 +24487,13 @@ "types": "Dynamic value ; string", "question": "Which CSS-classes should be applied to the label?", "ifunset": "Do not apply extra CSS-classes to the label", - "inline": "Apply CSS-classes {value} to the label" + "inline": "Apply CSS-classes {value} to the label", + "suggestions": [ + { + "if": "value=bg-white rounded px-2", + "then": "Draw on a white background" + } + ] }, "type": [ { @@ -25875,7 +24501,7 @@ "type": "object", "properties": { "render": { - "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered", + "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered\nifunset: no text is rendered if no predefined options match", "anyOf": [ { "$ref": "#/definitions/Record" @@ -25912,7 +24538,7 @@ ] }, "icon": { - "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon", + "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon\nifunset: do not show an icon next to the \"render\"-value", "anyOf": [ { "type": "object", @@ -26060,7 +24686,8 @@ "required": false, "hints": { "typehint": "rendered", - "question": "What text should be rendered?" + "question": "What text should be rendered?", + "ifunset": "no text is rendered if no predefined options match" }, "type": [ { @@ -26109,7 +24736,8 @@ "required": false, "hints": { "typehint": "icon", - "question": "what icon should be shown next to the 'render' value?" + "question": "what icon should be shown next to the 'render' value?", + "ifunset": "do not show an icon next to the \"render\"-value" }, "type": [ { @@ -26581,21 +25209,15 @@ "layers", "override", "pointRendering", - "pitchAlignment" + "css" ], "required": false, "hints": { - "question": "If the map is pitched, should the icon stay parallel to the screen or to the groundplane?", - "suggestions": [ - { - "if": "value=canvas", - "then": "The icon will stay upward and not be transformed as if it sticks to the screen" - }, - { - "if": "value=map", - "then": "The icon will be transformed as if it were painted onto the ground. (Automatically sets rotationAlignment)" - } - ] + "types": "Dynamic value ; string", + "group": "expert", + "question": "What CSS should be applied to the entire marker?", + "ifunset": "Do not apply extra CSS element to the entire marker", + "inline": "Apply CSS-style {value} to the _entire marker_" }, "type": [ { @@ -26603,7 +25225,7 @@ "type": "object", "properties": { "render": { - "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered", + "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered\nifunset: no text is rendered if no predefined options match", "anyOf": [ { "$ref": "#/definitions/Record" @@ -26640,7 +25262,1462 @@ ] }, "icon": { - "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon", + "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon\nifunset: do not show an icon next to the \"render\"-value", + "anyOf": [ + { + "type": "object", + "properties": { + "path": { + "description": "The path to the icon\nType: icon", + "type": "string" + }, + "class": { + "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)", + "type": "string" + } + }, + "required": [ + "path" + ] + }, + { + "type": "string" + } + ] + }, + "condition": { + "description": "question: When should this item be shown?\ntype: tag\nifunset: No specific condition set; always show this tagRendering or ask the question if unkown\n\nOnly 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/{and:TagConfigJson[];}" + }, + { + "$ref": "#/definitions/{or:TagConfigJson[];}" + }, + { + "type": "string" + } + ] + }, + "metacondition": { + "description": "question: When should this item be shown (including special conditions)?\ntype: tag\n\nIf 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/{and:TagConfigJson[];}" + }, + { + "$ref": "#/definitions/{or:TagConfigJson[];}" + }, + { + "type": "string" + } + ] + }, + "freeform": { + "description": "question: Should a freeform text field be shown?\nAllow freeform text input from the user\nifunset: Do not add a freeform text field", + "type": "object", + "properties": { + "key": { + "description": "What attribute should be filled out\nIf this key is present in the feature, then 'render' is used to display the value.\nIf this is undefined, the rendering is _always_ shown", + "type": "string" + } + } + }, + "mappings": { + "description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes", + "type": "array", + "items": { + "type": "object", + "properties": { + "if": { + "$ref": "#/definitions/TagConfigJson", + "description": "question: When should this single mapping match?\n\nIf this condition is met, then the text under `then` will be shown.\nIf no value matches, and the user selects this mapping as an option, then these tags will be uploaded to OSM.\n\nFor example: {'if': 'diet:vegetarion=yes', 'then':'A vegetarian option is offered here'}\n\nThis can be an substituting-tag as well, e.g. {'if': 'addr:street:={_calculated_nearby_streetname}', 'then': '{_calculated_nearby_streetname}'}" + }, + "then": { + "description": "question: What text should be shown?\n\nIf the condition `if` is met, the text `then` will be rendered.\nIf not known yet, the user will be presented with `then` as an option\nType: rendered", + "anyOf": [ + { + "$ref": "#/definitions/Record" + }, + { + "type": "string" + } + ] + }, + "icon": { + "description": "question: What icon should be added to this mapping?\nifunset: Do not show an extra icon next to the render value\n\nAn icon supporting this mapping; typically shown pretty small.\nThis can be used to show a 'phone'-icon next to the phone number\ninline: {icon}\nType: icon", + "anyOf": [ + { + "type": "object", + "properties": { + "path": { + "description": "The path to the icon\nType: icon", + "type": "string" + }, + "class": { + "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)", + "type": "string" + } + }, + "required": [ + "path" + ] + }, + { + "type": "string" + } + ] + } + }, + "required": [ + "if", + "then" + ] + } + }, + "description": { + "description": "A human-readable text explaining what this tagRendering does.\nMostly used for the shared tagrenderings", + "anyOf": [ + { + "$ref": "#/definitions/Record" + }, + { + "type": "string" + } + ] + }, + "classes": { + "description": "question: What css-classes should be applied to showing this attribute?\n\nA list of css-classes to apply to the entire tagRendering.\nThese classes are applied in 'answer'-mode, not in question mode\nThis is only for advanced users.\n\nValues are split on ` ` (space)", + "type": "string" + } + }, + "additionalProperties": false + }, + { + "type": "string" + } + ], + "description": "You can set the css-properties here, e.g. `background: red; font-size: 12px; `\nThis will be applied to the _container_ containing both the marker and the label" + }, + { + "path": [ + "layers", + "override", + "pointRendering", + "css", + "render" + ], + "required": false, + "hints": { + "typehint": "rendered", + "question": "What text should be rendered?", + "ifunset": "no text is rendered if no predefined options match" + }, + "type": [ + { + "$ref": "#/definitions/Record" + }, + { + "type": "object", + "properties": { + "special": { + "allOf": [ + { + "$ref": "#/definitions/Record>" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string" + } + }, + "required": [ + "type" + ] + } + ] + } + }, + "required": [ + "special" + ] + }, + { + "type": "string" + } + ], + "description": "This piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`" + }, + { + "path": [ + "layers", + "override", + "pointRendering", + "css", + "icon" + ], + "required": false, + "hints": { + "typehint": "icon", + "question": "what icon should be shown next to the 'render' value?", + "ifunset": "do not show an icon next to the \"render\"-value" + }, + "type": [ + { + "type": "object", + "properties": { + "path": { + "description": "The path to the icon\nType: icon", + "type": "string" + }, + "class": { + "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)", + "type": "string" + } + }, + "required": [ + "path" + ] + }, + { + "type": "string" + } + ], + "description": "An icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value" + }, + { + "path": [ + "layers", + "override", + "pointRendering", + "css", + "icon", + "path" + ], + "required": true, + "hints": { + "typehint": "icon" + }, + "type": "string", + "description": "The path to the icon" + }, + { + "path": [ + "layers", + "override", + "pointRendering", + "css", + "icon", + "class" + ], + "required": false, + "hints": {}, + "type": "string", + "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)" + }, + { + "path": [ + "layers", + "override", + "pointRendering", + "css", + "condition" + ], + "required": false, + "hints": { + "typehint": "tag", + "question": "When should this item be shown?", + "ifunset": "No specific condition set; always show this tagRendering or ask the question if unkown" + }, + "type": [ + { + "$ref": "#/definitions/{and:TagConfigJson[];}" + }, + { + "$ref": "#/definitions/{or:TagConfigJson[];}" + }, + { + "type": "string" + } + ], + "description": "Only show this tagrendering (or ask the question) if the selected object also matches the tags specified as `condition`.\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\"`\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": [ + "layers", + "override", + "pointRendering", + "css", + "condition", + "and" + ], + "required": false, + "hints": { + "typehint": "tag" + }, + "type": [ + { + "$ref": "#/definitions/{and:TagConfigJson[];}" + }, + { + "type": "object", + "properties": { + "or": { + "type": "array", + "items": { + "$ref": "#/definitions/TagConfigJson" + } + } + }, + "required": [ + "or" + ] + }, + { + "type": "string" + } + ], + "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" + }, + { + "path": [ + "layers", + "override", + "pointRendering", + "css", + "condition", + "or" + ], + "required": false, + "hints": { + "typehint": "tag" + }, + "type": [ + { + "$ref": "#/definitions/{and:TagConfigJson[];}" + }, + { + "type": "object", + "properties": { + "or": { + "type": "array", + "items": { + "$ref": "#/definitions/TagConfigJson" + } + } + }, + "required": [ + "or" + ] + }, + { + "type": "string" + } + ], + "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" + }, + { + "path": [ + "layers", + "override", + "pointRendering", + "css", + "metacondition" + ], + "required": false, + "hints": { + "typehint": "tag", + "question": "When should this item be shown (including special conditions)?" + }, + "type": [ + { + "$ref": "#/definitions/{and:TagConfigJson[];}" + }, + { + "$ref": "#/definitions/{or:TagConfigJson[];}" + }, + { + "type": "string" + } + ], + "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": [ + "layers", + "override", + "pointRendering", + "css", + "metacondition", + "and" + ], + "required": false, + "hints": { + "typehint": "tag" + }, + "type": [ + { + "$ref": "#/definitions/{and:TagConfigJson[];}" + }, + { + "type": "object", + "properties": { + "or": { + "type": "array", + "items": { + "$ref": "#/definitions/TagConfigJson" + } + } + }, + "required": [ + "or" + ] + }, + { + "type": "string" + } + ], + "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" + }, + { + "path": [ + "layers", + "override", + "pointRendering", + "css", + "metacondition", + "or" + ], + "required": false, + "hints": { + "typehint": "tag" + }, + "type": [ + { + "$ref": "#/definitions/{and:TagConfigJson[];}" + }, + { + "type": "object", + "properties": { + "or": { + "type": "array", + "items": { + "$ref": "#/definitions/TagConfigJson" + } + } + }, + "required": [ + "or" + ] + }, + { + "type": "string" + } + ], + "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" + }, + { + "path": [ + "layers", + "override", + "pointRendering", + "css", + "freeform" + ], + "required": false, + "hints": { + "question": "Should a freeform text field be shown?", + "ifunset": "Do not add a freeform text field" + }, + "type": "object", + "description": "Allow freeform text input from the user" + }, + { + "path": [ + "layers", + "override", + "pointRendering", + "css", + "freeform", + "key" + ], + "required": false, + "hints": {}, + "type": "string", + "description": "What attribute should be filled out\nIf this key is present in the feature, then 'render' is used to display the value.\nIf this is undefined, the rendering is _always_ shown" + }, + { + "path": [ + "layers", + "override", + "pointRendering", + "css", + "mappings" + ], + "required": false, + "hints": {}, + "type": "array", + "description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes" + }, + { + "path": [ + "layers", + "override", + "pointRendering", + "css", + "mappings", + "if" + ], + "required": true, + "hints": { + "typehint": "tag", + "question": "When should this single mapping match?" + }, + "type": [ + { + "$ref": "#/definitions/{and:TagConfigJson[];}" + }, + { + "type": "object", + "properties": { + "or": { + "type": "array", + "items": { + "$ref": "#/definitions/TagConfigJson" + } + } + }, + "required": [ + "or" + ] + }, + { + "type": "string" + } + ], + "description": "If this condition is met, then the text under `then` will be shown.\nIf no value matches, and the user selects this mapping as an option, then these tags will be uploaded to OSM.\nFor example: {'if': 'diet:vegetarion=yes', 'then':'A vegetarian option is offered here'}\nThis can be an substituting-tag as well, e.g. {'if': 'addr:street:={_calculated_nearby_streetname}', 'then': '{_calculated_nearby_streetname}'}" + }, + { + "path": [ + "layers", + "override", + "pointRendering", + "css", + "mappings", + "then" + ], + "required": true, + "hints": { + "typehint": "rendered", + "question": "What text should be shown?" + }, + "type": [ + { + "$ref": "#/definitions/Record" + }, + { + "type": "string" + } + ], + "description": "If the condition `if` is met, the text `then` will be rendered.\nIf not known yet, the user will be presented with `then` as an option" + }, + { + "path": [ + "layers", + "override", + "pointRendering", + "css", + "mappings", + "icon" + ], + "required": false, + "hints": { + "typehint": "icon", + "question": "What icon should be added to this mapping?", + "ifunset": "Do not show an extra icon next to the render value", + "inline": " {icon}" + }, + "type": [ + { + "type": "object", + "properties": { + "path": { + "description": "The path to the icon\nType: icon", + "type": "string" + }, + "class": { + "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)", + "type": "string" + } + }, + "required": [ + "path" + ] + }, + { + "type": "string" + } + ], + "description": "An icon supporting this mapping; typically shown pretty small.\nThis can be used to show a 'phone'-icon next to the phone number" + }, + { + "path": [ + "layers", + "override", + "pointRendering", + "css", + "mappings", + "icon", + "path" + ], + "required": true, + "hints": { + "typehint": "icon" + }, + "type": "string", + "description": "The path to the icon" + }, + { + "path": [ + "layers", + "override", + "pointRendering", + "css", + "mappings", + "icon", + "class" + ], + "required": false, + "hints": {}, + "type": "string", + "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)" + }, + { + "path": [ + "layers", + "override", + "pointRendering", + "css", + "description" + ], + "required": false, + "hints": {}, + "type": [ + { + "$ref": "#/definitions/Record" + }, + { + "type": "string" + } + ], + "description": "A human-readable text explaining what this tagRendering does.\nMostly used for the shared tagrenderings" + }, + { + "path": [ + "layers", + "override", + "pointRendering", + "css", + "classes" + ], + "required": false, + "hints": { + "question": "What css-classes should be applied to showing this attribute?" + }, + "type": "string", + "description": "A list of css-classes to apply to the entire tagRendering.\nThese classes are applied in 'answer'-mode, not in question mode\nThis is only for advanced users.\nValues are split on ` ` (space)" + }, + { + "path": [ + "layers", + "override", + "pointRendering", + "cssClasses" + ], + "required": false, + "hints": { + "types": "Dynamic value ; string", + "group": "expert", + "question": "Which CSS-classes should be applied to the entire marker?", + "ifunset": "Do not apply extra CSS-classes to the label", + "inline": "Apply CSS-classes {value} to the entire container" + }, + "type": [ + { + "description": "A TagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nFor an _editable_ tagRendering, use 'QuestionableTagRenderingConfigJson' instead, which extends this one", + "type": "object", + "properties": { + "render": { + "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered\nifunset: no text is rendered if no predefined options match", + "anyOf": [ + { + "$ref": "#/definitions/Record" + }, + { + "type": "object", + "properties": { + "special": { + "allOf": [ + { + "$ref": "#/definitions/Record>" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string" + } + }, + "required": [ + "type" + ] + } + ] + } + }, + "required": [ + "special" + ] + }, + { + "type": "string" + } + ] + }, + "icon": { + "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon\nifunset: do not show an icon next to the \"render\"-value", + "anyOf": [ + { + "type": "object", + "properties": { + "path": { + "description": "The path to the icon\nType: icon", + "type": "string" + }, + "class": { + "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)", + "type": "string" + } + }, + "required": [ + "path" + ] + }, + { + "type": "string" + } + ] + }, + "condition": { + "description": "question: When should this item be shown?\ntype: tag\nifunset: No specific condition set; always show this tagRendering or ask the question if unkown\n\nOnly 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/{and:TagConfigJson[];}" + }, + { + "$ref": "#/definitions/{or:TagConfigJson[];}" + }, + { + "type": "string" + } + ] + }, + "metacondition": { + "description": "question: When should this item be shown (including special conditions)?\ntype: tag\n\nIf 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/{and:TagConfigJson[];}" + }, + { + "$ref": "#/definitions/{or:TagConfigJson[];}" + }, + { + "type": "string" + } + ] + }, + "freeform": { + "description": "question: Should a freeform text field be shown?\nAllow freeform text input from the user\nifunset: Do not add a freeform text field", + "type": "object", + "properties": { + "key": { + "description": "What attribute should be filled out\nIf this key is present in the feature, then 'render' is used to display the value.\nIf this is undefined, the rendering is _always_ shown", + "type": "string" + } + } + }, + "mappings": { + "description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes", + "type": "array", + "items": { + "type": "object", + "properties": { + "if": { + "$ref": "#/definitions/TagConfigJson", + "description": "question: When should this single mapping match?\n\nIf this condition is met, then the text under `then` will be shown.\nIf no value matches, and the user selects this mapping as an option, then these tags will be uploaded to OSM.\n\nFor example: {'if': 'diet:vegetarion=yes', 'then':'A vegetarian option is offered here'}\n\nThis can be an substituting-tag as well, e.g. {'if': 'addr:street:={_calculated_nearby_streetname}', 'then': '{_calculated_nearby_streetname}'}" + }, + "then": { + "description": "question: What text should be shown?\n\nIf the condition `if` is met, the text `then` will be rendered.\nIf not known yet, the user will be presented with `then` as an option\nType: rendered", + "anyOf": [ + { + "$ref": "#/definitions/Record" + }, + { + "type": "string" + } + ] + }, + "icon": { + "description": "question: What icon should be added to this mapping?\nifunset: Do not show an extra icon next to the render value\n\nAn icon supporting this mapping; typically shown pretty small.\nThis can be used to show a 'phone'-icon next to the phone number\ninline: {icon}\nType: icon", + "anyOf": [ + { + "type": "object", + "properties": { + "path": { + "description": "The path to the icon\nType: icon", + "type": "string" + }, + "class": { + "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)", + "type": "string" + } + }, + "required": [ + "path" + ] + }, + { + "type": "string" + } + ] + } + }, + "required": [ + "if", + "then" + ] + } + }, + "description": { + "description": "A human-readable text explaining what this tagRendering does.\nMostly used for the shared tagrenderings", + "anyOf": [ + { + "$ref": "#/definitions/Record" + }, + { + "type": "string" + } + ] + }, + "classes": { + "description": "question: What css-classes should be applied to showing this attribute?\n\nA list of css-classes to apply to the entire tagRendering.\nThese classes are applied in 'answer'-mode, not in question mode\nThis is only for advanced users.\n\nValues are split on ` ` (space)", + "type": "string" + } + }, + "additionalProperties": false + }, + { + "type": "string" + } + ], + "description": "This will be applied to the _container_ containing both the marker and the label\nThe classes should be separated by a space (` `)\nYou can use most Tailwind-css classes, see https://tailwindcss.com/ for more information\nFor example: `center bg-gray-500 mx-2 my-1 rounded-full`" + }, + { + "path": [ + "layers", + "override", + "pointRendering", + "cssClasses", + "render" + ], + "required": false, + "hints": { + "typehint": "rendered", + "question": "What text should be rendered?", + "ifunset": "no text is rendered if no predefined options match" + }, + "type": [ + { + "$ref": "#/definitions/Record" + }, + { + "type": "object", + "properties": { + "special": { + "allOf": [ + { + "$ref": "#/definitions/Record>" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string" + } + }, + "required": [ + "type" + ] + } + ] + } + }, + "required": [ + "special" + ] + }, + { + "type": "string" + } + ], + "description": "This piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`" + }, + { + "path": [ + "layers", + "override", + "pointRendering", + "cssClasses", + "icon" + ], + "required": false, + "hints": { + "typehint": "icon", + "question": "what icon should be shown next to the 'render' value?", + "ifunset": "do not show an icon next to the \"render\"-value" + }, + "type": [ + { + "type": "object", + "properties": { + "path": { + "description": "The path to the icon\nType: icon", + "type": "string" + }, + "class": { + "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)", + "type": "string" + } + }, + "required": [ + "path" + ] + }, + { + "type": "string" + } + ], + "description": "An icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value" + }, + { + "path": [ + "layers", + "override", + "pointRendering", + "cssClasses", + "icon", + "path" + ], + "required": true, + "hints": { + "typehint": "icon" + }, + "type": "string", + "description": "The path to the icon" + }, + { + "path": [ + "layers", + "override", + "pointRendering", + "cssClasses", + "icon", + "class" + ], + "required": false, + "hints": {}, + "type": "string", + "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)" + }, + { + "path": [ + "layers", + "override", + "pointRendering", + "cssClasses", + "condition" + ], + "required": false, + "hints": { + "typehint": "tag", + "question": "When should this item be shown?", + "ifunset": "No specific condition set; always show this tagRendering or ask the question if unkown" + }, + "type": [ + { + "$ref": "#/definitions/{and:TagConfigJson[];}" + }, + { + "$ref": "#/definitions/{or:TagConfigJson[];}" + }, + { + "type": "string" + } + ], + "description": "Only show this tagrendering (or ask the question) if the selected object also matches the tags specified as `condition`.\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\"`\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": [ + "layers", + "override", + "pointRendering", + "cssClasses", + "condition", + "and" + ], + "required": false, + "hints": { + "typehint": "tag" + }, + "type": [ + { + "$ref": "#/definitions/{and:TagConfigJson[];}" + }, + { + "type": "object", + "properties": { + "or": { + "type": "array", + "items": { + "$ref": "#/definitions/TagConfigJson" + } + } + }, + "required": [ + "or" + ] + }, + { + "type": "string" + } + ], + "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" + }, + { + "path": [ + "layers", + "override", + "pointRendering", + "cssClasses", + "condition", + "or" + ], + "required": false, + "hints": { + "typehint": "tag" + }, + "type": [ + { + "$ref": "#/definitions/{and:TagConfigJson[];}" + }, + { + "type": "object", + "properties": { + "or": { + "type": "array", + "items": { + "$ref": "#/definitions/TagConfigJson" + } + } + }, + "required": [ + "or" + ] + }, + { + "type": "string" + } + ], + "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" + }, + { + "path": [ + "layers", + "override", + "pointRendering", + "cssClasses", + "metacondition" + ], + "required": false, + "hints": { + "typehint": "tag", + "question": "When should this item be shown (including special conditions)?" + }, + "type": [ + { + "$ref": "#/definitions/{and:TagConfigJson[];}" + }, + { + "$ref": "#/definitions/{or:TagConfigJson[];}" + }, + { + "type": "string" + } + ], + "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": [ + "layers", + "override", + "pointRendering", + "cssClasses", + "metacondition", + "and" + ], + "required": false, + "hints": { + "typehint": "tag" + }, + "type": [ + { + "$ref": "#/definitions/{and:TagConfigJson[];}" + }, + { + "type": "object", + "properties": { + "or": { + "type": "array", + "items": { + "$ref": "#/definitions/TagConfigJson" + } + } + }, + "required": [ + "or" + ] + }, + { + "type": "string" + } + ], + "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" + }, + { + "path": [ + "layers", + "override", + "pointRendering", + "cssClasses", + "metacondition", + "or" + ], + "required": false, + "hints": { + "typehint": "tag" + }, + "type": [ + { + "$ref": "#/definitions/{and:TagConfigJson[];}" + }, + { + "type": "object", + "properties": { + "or": { + "type": "array", + "items": { + "$ref": "#/definitions/TagConfigJson" + } + } + }, + "required": [ + "or" + ] + }, + { + "type": "string" + } + ], + "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" + }, + { + "path": [ + "layers", + "override", + "pointRendering", + "cssClasses", + "freeform" + ], + "required": false, + "hints": { + "question": "Should a freeform text field be shown?", + "ifunset": "Do not add a freeform text field" + }, + "type": "object", + "description": "Allow freeform text input from the user" + }, + { + "path": [ + "layers", + "override", + "pointRendering", + "cssClasses", + "freeform", + "key" + ], + "required": false, + "hints": {}, + "type": "string", + "description": "What attribute should be filled out\nIf this key is present in the feature, then 'render' is used to display the value.\nIf this is undefined, the rendering is _always_ shown" + }, + { + "path": [ + "layers", + "override", + "pointRendering", + "cssClasses", + "mappings" + ], + "required": false, + "hints": {}, + "type": "array", + "description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes" + }, + { + "path": [ + "layers", + "override", + "pointRendering", + "cssClasses", + "mappings", + "if" + ], + "required": true, + "hints": { + "typehint": "tag", + "question": "When should this single mapping match?" + }, + "type": [ + { + "$ref": "#/definitions/{and:TagConfigJson[];}" + }, + { + "type": "object", + "properties": { + "or": { + "type": "array", + "items": { + "$ref": "#/definitions/TagConfigJson" + } + } + }, + "required": [ + "or" + ] + }, + { + "type": "string" + } + ], + "description": "If this condition is met, then the text under `then` will be shown.\nIf no value matches, and the user selects this mapping as an option, then these tags will be uploaded to OSM.\nFor example: {'if': 'diet:vegetarion=yes', 'then':'A vegetarian option is offered here'}\nThis can be an substituting-tag as well, e.g. {'if': 'addr:street:={_calculated_nearby_streetname}', 'then': '{_calculated_nearby_streetname}'}" + }, + { + "path": [ + "layers", + "override", + "pointRendering", + "cssClasses", + "mappings", + "then" + ], + "required": true, + "hints": { + "typehint": "rendered", + "question": "What text should be shown?" + }, + "type": [ + { + "$ref": "#/definitions/Record" + }, + { + "type": "string" + } + ], + "description": "If the condition `if` is met, the text `then` will be rendered.\nIf not known yet, the user will be presented with `then` as an option" + }, + { + "path": [ + "layers", + "override", + "pointRendering", + "cssClasses", + "mappings", + "icon" + ], + "required": false, + "hints": { + "typehint": "icon", + "question": "What icon should be added to this mapping?", + "ifunset": "Do not show an extra icon next to the render value", + "inline": " {icon}" + }, + "type": [ + { + "type": "object", + "properties": { + "path": { + "description": "The path to the icon\nType: icon", + "type": "string" + }, + "class": { + "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)", + "type": "string" + } + }, + "required": [ + "path" + ] + }, + { + "type": "string" + } + ], + "description": "An icon supporting this mapping; typically shown pretty small.\nThis can be used to show a 'phone'-icon next to the phone number" + }, + { + "path": [ + "layers", + "override", + "pointRendering", + "cssClasses", + "mappings", + "icon", + "path" + ], + "required": true, + "hints": { + "typehint": "icon" + }, + "type": "string", + "description": "The path to the icon" + }, + { + "path": [ + "layers", + "override", + "pointRendering", + "cssClasses", + "mappings", + "icon", + "class" + ], + "required": false, + "hints": {}, + "type": "string", + "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)" + }, + { + "path": [ + "layers", + "override", + "pointRendering", + "cssClasses", + "description" + ], + "required": false, + "hints": {}, + "type": [ + { + "$ref": "#/definitions/Record" + }, + { + "type": "string" + } + ], + "description": "A human-readable text explaining what this tagRendering does.\nMostly used for the shared tagrenderings" + }, + { + "path": [ + "layers", + "override", + "pointRendering", + "cssClasses", + "classes" + ], + "required": false, + "hints": { + "question": "What css-classes should be applied to showing this attribute?" + }, + "type": "string", + "description": "A list of css-classes to apply to the entire tagRendering.\nThese classes are applied in 'answer'-mode, not in question mode\nThis is only for advanced users.\nValues are split on ` ` (space)" + }, + { + "path": [ + "layers", + "override", + "pointRendering", + "pitchAlignment" + ], + "required": false, + "hints": { + "group": "expert", + "question": "If the map is pitched, should the icon stay parallel to the screen or to the groundplane?", + "suggestions": [ + { + "if": "value=canvas", + "then": "The icon will stay upward and not be transformed as if it sticks to the screen" + }, + { + "if": "value=map", + "then": "The icon will be transformed as if it were painted onto the ground. (Automatically sets rotationAlignment)" + } + ] + }, + "type": [ + { + "description": "A TagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nFor an _editable_ tagRendering, use 'QuestionableTagRenderingConfigJson' instead, which extends this one", + "type": "object", + "properties": { + "render": { + "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered\nifunset: no text is rendered if no predefined options match", + "anyOf": [ + { + "$ref": "#/definitions/Record" + }, + { + "type": "object", + "properties": { + "special": { + "allOf": [ + { + "$ref": "#/definitions/Record>" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string" + } + }, + "required": [ + "type" + ] + } + ] + } + }, + "required": [ + "special" + ] + }, + { + "type": "string" + } + ] + }, + "icon": { + "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon\nifunset: do not show an icon next to the \"render\"-value", "anyOf": [ { "type": "object", @@ -26792,7 +26869,8 @@ "required": false, "hints": { "typehint": "rendered", - "question": "What text should be rendered?" + "question": "What text should be rendered?", + "ifunset": "no text is rendered if no predefined options match" }, "type": [ { @@ -26841,7 +26919,8 @@ "required": false, "hints": { "typehint": "icon", - "question": "what icon should be shown next to the 'render' value?" + "question": "what icon should be shown next to the 'render' value?", + "ifunset": "do not show an icon next to the \"render\"-value" }, "type": [ { @@ -27317,6 +27396,7 @@ ], "required": false, "hints": { + "group": "expert", "question": "Should the icon be rotated if the map is rotated?", "ifunset": "Do not rotate or tilt icons. Always keep the icons straight", "suggestions": [ @@ -27336,7 +27416,7 @@ "type": "object", "properties": { "render": { - "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered", + "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered\nifunset: no text is rendered if no predefined options match", "anyOf": [ { "$ref": "#/definitions/Record" @@ -27373,7 +27453,7 @@ ] }, "icon": { - "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon", + "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon\nifunset: do not show an icon next to the \"render\"-value", "anyOf": [ { "type": "object", @@ -27525,7 +27605,8 @@ "required": false, "hints": { "typehint": "rendered", - "question": "What text should be rendered?" + "question": "What text should be rendered?", + "ifunset": "no text is rendered if no predefined options match" }, "type": [ { @@ -27574,7 +27655,8 @@ "required": false, "hints": { "typehint": "icon", - "question": "what icon should be shown next to the 'render' value?" + "question": "what icon should be shown next to the 'render' value?", + "ifunset": "do not show an icon next to the \"render\"-value" }, "type": [ { @@ -29620,7 +29702,7 @@ } }, "render": { - "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered", + "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nIn this text, values within braces (such as {braced(key)}) are replaced by the corresponding `value` in the object.\nFor example, if the object contains tags `amenity=school; name=Windy Hill School`, the render string `This school is named {name}` will be shown to the user as `This school is named Windy Hill School`\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered\nifunset: no text is rendered if no predefined options match", "anyOf": [ { "$ref": "#/definitions/Record" @@ -29657,7 +29739,7 @@ ] }, "icon": { - "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon", + "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon\nifunset: do not show an icon next to the \"render\"-value", "anyOf": [ { "type": "object", @@ -30668,7 +30750,8 @@ "required": false, "hints": { "typehint": "rendered", - "question": "What text should be rendered?" + "question": "What text should be rendered?", + "ifunset": "no text is rendered if no predefined options match" }, "type": [ { @@ -30716,7 +30799,8 @@ "required": false, "hints": { "typehint": "icon", - "question": "what icon should be shown next to the 'render' value?" + "question": "what icon should be shown next to the 'render' value?", + "ifunset": "do not show an icon next to the \"render\"-value" }, "type": [ { @@ -31918,7 +32002,8 @@ "required": false, "hints": { "typehint": "rendered", - "question": "What text should be rendered?" + "question": "What text should be rendered?", + "ifunset": "no text is rendered if no predefined options match" }, "type": [ { @@ -31967,7 +32052,8 @@ "required": false, "hints": { "typehint": "icon", - "question": "what icon should be shown next to the 'render' value?" + "question": "what icon should be shown next to the 'render' value?", + "ifunset": "do not show an icon next to the \"render\"-value" }, "type": [ { @@ -33190,7 +33276,8 @@ "required": false, "hints": { "typehint": "rendered", - "question": "What text should be rendered?" + "question": "What text should be rendered?", + "ifunset": "no text is rendered if no predefined options match" }, "type": [ { @@ -33239,7 +33326,8 @@ "required": false, "hints": { "typehint": "icon", - "question": "what icon should be shown next to the 'render' value?" + "question": "what icon should be shown next to the 'render' value?", + "ifunset": "do not show an icon next to the \"render\"-value" }, "type": [ { @@ -34485,7 +34573,8 @@ "required": false, "hints": { "typehint": "rendered", - "question": "What text should be rendered?" + "question": "What text should be rendered?", + "ifunset": "no text is rendered if no predefined options match" }, "type": [ { @@ -34535,7 +34624,8 @@ "required": false, "hints": { "typehint": "icon", - "question": "what icon should be shown next to the 'render' value?" + "question": "what icon should be shown next to the 'render' value?", + "ifunset": "do not show an icon next to the \"render\"-value" }, "type": [ { diff --git a/src/assets/schemas/questionabletagrenderingconfigmeta.json b/src/assets/schemas/questionabletagrenderingconfigmeta.json index 78fe8dc54..1f2fab96f 100644 --- a/src/assets/schemas/questionabletagrenderingconfigmeta.json +++ b/src/assets/schemas/questionabletagrenderingconfigmeta.json @@ -791,7 +791,8 @@ "required": false, "hints": { "typehint": "rendered", - "question": "What text should be rendered?" + "question": "What text should be rendered?", + "ifunset": "no text is rendered if no predefined options match" }, "type": [ { @@ -836,7 +837,8 @@ "required": false, "hints": { "typehint": "icon", - "question": "what icon should be shown next to the 'render' value?" + "question": "what icon should be shown next to the 'render' value?", + "ifunset": "do not show an icon next to the \"render\"-value" }, "type": [ { diff --git a/src/assets/schemas/tagrenderingconfigmeta.json b/src/assets/schemas/tagrenderingconfigmeta.json index 2107eb950..9b4bc08a4 100644 --- a/src/assets/schemas/tagrenderingconfigmeta.json +++ b/src/assets/schemas/tagrenderingconfigmeta.json @@ -13,7 +13,8 @@ "required": false, "hints": { "typehint": "rendered", - "question": "What text should be rendered?" + "question": "What text should be rendered?", + "ifunset": "no text is rendered if no predefined options match" }, "type": [ { @@ -58,7 +59,8 @@ "required": false, "hints": { "typehint": "icon", - "question": "what icon should be shown next to the 'render' value?" + "question": "what icon should be shown next to the 'render' value?", + "ifunset": "do not show an icon next to the \"render\"-value" }, "type": [ {