Themes: add validation check if a mapping does not erase another mapping completely
This commit is contained in:
parent
7d43bb5983
commit
556f6d0b93
43 changed files with 5015 additions and 4778 deletions
|
@ -619,7 +619,7 @@
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"render": {
|
"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": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/Record<string,string>"
|
"$ref": "#/definitions/Record<string,string>"
|
||||||
|
@ -656,7 +656,7 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"icon": {
|
"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": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"type": "object",
|
"type": "object",
|
||||||
|
@ -923,7 +923,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"iconBadges": {
|
"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",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
"type": "object",
|
"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 <b>{value}</b> 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 <b>{value}</b> 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": {
|
"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 <b>{value}</b> 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 <b>{value}</b> to the label\ntypes: Dynamic value ; string\nifunset: Do not apply extra CSS-labels to the label\ngroup: expert",
|
||||||
"anyOf": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||||
|
@ -1028,7 +1006,29 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"labelCssClasses": {
|
"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 <b>{value}</b> 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 <b>{value}</b> 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 <b>{value}</b> 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 <b>{value}</b> 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": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||||
|
@ -1039,7 +1039,7 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"pitchAlignment": {
|
"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": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||||
|
@ -1054,7 +1054,7 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"rotationAlignment": {
|
"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": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||||
|
@ -1250,7 +1250,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"render": {
|
"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": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/Record<string,string>"
|
"$ref": "#/definitions/Record<string,string>"
|
||||||
|
@ -1287,7 +1287,7 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"icon": {
|
"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": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"type": "object",
|
"type": "object",
|
||||||
|
@ -1465,7 +1465,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"render": {
|
"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": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/Record<string,string>"
|
"$ref": "#/definitions/Record<string,string>"
|
||||||
|
@ -1502,7 +1502,7 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"icon": {
|
"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": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"type": "object",
|
"type": "object",
|
||||||
|
|
|
@ -612,7 +612,7 @@ export default {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"render": {
|
"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": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/Record<string,string>"
|
"$ref": "#/definitions/Record<string,string>"
|
||||||
|
@ -649,7 +649,7 @@ export default {
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"icon": {
|
"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": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"type": "object",
|
"type": "object",
|
||||||
|
@ -912,7 +912,7 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"iconBadges": {
|
"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",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
"type": "object",
|
"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 <b>{value}</b> 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 <b>{value}</b> 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": {
|
"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 <b>{value}</b> 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 <b>{value}</b> to the label\ntypes: Dynamic value ; string\nifunset: Do not apply extra CSS-labels to the label\ngroup: expert",
|
||||||
"anyOf": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||||
|
@ -1017,7 +995,29 @@ export default {
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"labelCssClasses": {
|
"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 <b>{value}</b> 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 <b>{value}</b> 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 <b>{value}</b> 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 <b>{value}</b> 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": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||||
|
@ -1028,7 +1028,7 @@ export default {
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"pitchAlignment": {
|
"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": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||||
|
@ -1043,7 +1043,7 @@ export default {
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"rotationAlignment": {
|
"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": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||||
|
@ -1237,7 +1237,7 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"render": {
|
"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": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/Record<string,string>"
|
"$ref": "#/definitions/Record<string,string>"
|
||||||
|
@ -1274,7 +1274,7 @@ export default {
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"icon": {
|
"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": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"type": "object",
|
"type": "object",
|
||||||
|
@ -1451,7 +1451,7 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"render": {
|
"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": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/Record<string,string>"
|
"$ref": "#/definitions/Record<string,string>"
|
||||||
|
@ -1488,7 +1488,7 @@ export default {
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"icon": {
|
"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": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"type": "object",
|
"type": "object",
|
||||||
|
|
|
@ -304,9 +304,6 @@
|
||||||
"icon",
|
"icon",
|
||||||
"id",
|
"id",
|
||||||
"layers",
|
"layers",
|
||||||
"startLat",
|
|
||||||
"startLon",
|
|
||||||
"startZoom",
|
|
||||||
"title"
|
"title"
|
||||||
],
|
],
|
||||||
"definitions": {
|
"definitions": {
|
||||||
|
@ -531,7 +528,7 @@
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"render": {
|
"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": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/Record<string,string>"
|
"$ref": "#/definitions/Record<string,string>"
|
||||||
|
@ -568,7 +565,7 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"icon": {
|
"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": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"type": "object",
|
"type": "object",
|
||||||
|
@ -835,7 +832,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"iconBadges": {
|
"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",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
"type": "object",
|
"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 <b>{value}</b> 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 <b>{value}</b> 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": {
|
"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 <b>{value}</b> 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 <b>{value}</b> to the label\ntypes: Dynamic value ; string\nifunset: Do not apply extra CSS-labels to the label\ngroup: expert",
|
||||||
"anyOf": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||||
|
@ -940,7 +915,29 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"labelCssClasses": {
|
"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 <b>{value}</b> 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 <b>{value}</b> 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 <b>{value}</b> 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 <b>{value}</b> 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": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||||
|
@ -951,7 +948,7 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"pitchAlignment": {
|
"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": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||||
|
@ -966,7 +963,7 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"rotationAlignment": {
|
"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": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||||
|
@ -1162,7 +1159,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"render": {
|
"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": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/Record<string,string>"
|
"$ref": "#/definitions/Record<string,string>"
|
||||||
|
@ -1199,7 +1196,7 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"icon": {
|
"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": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"type": "object",
|
"type": "object",
|
||||||
|
@ -1377,7 +1374,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"render": {
|
"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": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/Record<string,string>"
|
"$ref": "#/definitions/Record<string,string>"
|
||||||
|
@ -1414,7 +1411,7 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"icon": {
|
"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": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"type": "object",
|
"type": "object",
|
||||||
|
|
|
@ -304,9 +304,6 @@ export default {
|
||||||
"icon",
|
"icon",
|
||||||
"id",
|
"id",
|
||||||
"layers",
|
"layers",
|
||||||
"startLat",
|
|
||||||
"startLon",
|
|
||||||
"startZoom",
|
|
||||||
"title"
|
"title"
|
||||||
],
|
],
|
||||||
"definitions": {
|
"definitions": {
|
||||||
|
@ -524,7 +521,7 @@ export default {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"render": {
|
"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": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/Record<string,string>"
|
"$ref": "#/definitions/Record<string,string>"
|
||||||
|
@ -561,7 +558,7 @@ export default {
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"icon": {
|
"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": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"type": "object",
|
"type": "object",
|
||||||
|
@ -824,7 +821,7 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"iconBadges": {
|
"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",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
"type": "object",
|
"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 <b>{value}</b> 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 <b>{value}</b> 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": {
|
"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 <b>{value}</b> 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 <b>{value}</b> to the label\ntypes: Dynamic value ; string\nifunset: Do not apply extra CSS-labels to the label\ngroup: expert",
|
||||||
"anyOf": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||||
|
@ -929,7 +904,29 @@ export default {
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"labelCssClasses": {
|
"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 <b>{value}</b> 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 <b>{value}</b> 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 <b>{value}</b> 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 <b>{value}</b> 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": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||||
|
@ -940,7 +937,7 @@ export default {
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"pitchAlignment": {
|
"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": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||||
|
@ -955,7 +952,7 @@ export default {
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"rotationAlignment": {
|
"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": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||||
|
@ -1149,7 +1146,7 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"render": {
|
"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": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/Record<string,string>"
|
"$ref": "#/definitions/Record<string,string>"
|
||||||
|
@ -1186,7 +1183,7 @@ export default {
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"icon": {
|
"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": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"type": "object",
|
"type": "object",
|
||||||
|
@ -1363,7 +1360,7 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"render": {
|
"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": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/Record<string,string>"
|
"$ref": "#/definitions/Record<string,string>"
|
||||||
|
@ -1400,7 +1397,7 @@ export default {
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"icon": {
|
"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": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"type": "object",
|
"type": "object",
|
||||||
|
|
|
@ -287,7 +287,7 @@
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"render": {
|
"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": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/Record<string,string>"
|
"$ref": "#/definitions/Record<string,string>"
|
||||||
|
@ -324,7 +324,7 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"icon": {
|
"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": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"type": "object",
|
"type": "object",
|
||||||
|
|
|
@ -280,7 +280,7 @@ export default {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"render": {
|
"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": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/Record<string,string>"
|
"$ref": "#/definitions/Record<string,string>"
|
||||||
|
@ -317,7 +317,7 @@ export default {
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"icon": {
|
"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": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"type": "object",
|
"type": "object",
|
||||||
|
|
|
@ -327,7 +327,7 @@
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"render": {
|
"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": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/Record<string,string>"
|
"$ref": "#/definitions/Record<string,string>"
|
||||||
|
@ -364,7 +364,7 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"icon": {
|
"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": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"type": "object",
|
"type": "object",
|
||||||
|
|
|
@ -320,7 +320,7 @@ export default {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"render": {
|
"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": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/Record<string,string>"
|
"$ref": "#/definitions/Record<string,string>"
|
||||||
|
@ -357,7 +357,7 @@ export default {
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"icon": {
|
"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": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"type": "object",
|
"type": "object",
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"iconBadges": {
|
"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",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
"type": "object",
|
"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 <b>{value}</b> 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 <b>{value}</b> 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": {
|
"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 <b>{value}</b> 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 <b>{value}</b> to the label\ntypes: Dynamic value ; string\nifunset: Do not apply extra CSS-labels to the label\ngroup: expert",
|
||||||
"anyOf": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||||
|
@ -122,7 +100,29 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"labelCssClasses": {
|
"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 <b>{value}</b> 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 <b>{value}</b> 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 <b>{value}</b> 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 <b>{value}</b> 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": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||||
|
@ -133,7 +133,7 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"pitchAlignment": {
|
"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": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||||
|
@ -148,7 +148,7 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"rotationAlignment": {
|
"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": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||||
|
@ -388,7 +388,7 @@
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"render": {
|
"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": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/Record<string,string>"
|
"$ref": "#/definitions/Record<string,string>"
|
||||||
|
@ -425,7 +425,7 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"icon": {
|
"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": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"type": "object",
|
"type": "object",
|
||||||
|
|
|
@ -17,7 +17,7 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"iconBadges": {
|
"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",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
"type": "object",
|
"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 <b>{value}</b> 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 <b>{value}</b> 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": {
|
"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 <b>{value}</b> 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 <b>{value}</b> to the label\ntypes: Dynamic value ; string\nifunset: Do not apply extra CSS-labels to the label\ngroup: expert",
|
||||||
"anyOf": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||||
|
@ -122,7 +100,29 @@ export default {
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"labelCssClasses": {
|
"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 <b>{value}</b> 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 <b>{value}</b> 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 <b>{value}</b> 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 <b>{value}</b> 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": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||||
|
@ -133,7 +133,7 @@ export default {
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"pitchAlignment": {
|
"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": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||||
|
@ -148,7 +148,7 @@ export default {
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"rotationAlignment": {
|
"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": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||||
|
@ -381,7 +381,7 @@ export default {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"render": {
|
"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": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/Record<string,string>"
|
"$ref": "#/definitions/Record<string,string>"
|
||||||
|
@ -418,7 +418,7 @@ export default {
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"icon": {
|
"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": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"type": "object",
|
"type": "object",
|
||||||
|
|
|
@ -105,7 +105,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"render": {
|
"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": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/Record<string,string>"
|
"$ref": "#/definitions/Record<string,string>"
|
||||||
|
@ -142,7 +142,7 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"icon": {
|
"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": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"type": "object",
|
"type": "object",
|
||||||
|
@ -434,7 +434,7 @@
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"render": {
|
"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": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/Record<string,string>"
|
"$ref": "#/definitions/Record<string,string>"
|
||||||
|
@ -471,7 +471,7 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"icon": {
|
"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": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"type": "object",
|
"type": "object",
|
||||||
|
|
|
@ -105,7 +105,7 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"render": {
|
"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": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/Record<string,string>"
|
"$ref": "#/definitions/Record<string,string>"
|
||||||
|
@ -142,7 +142,7 @@ export default {
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"icon": {
|
"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": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"type": "object",
|
"type": "object",
|
||||||
|
@ -427,7 +427,7 @@ export default {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"render": {
|
"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": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/Record<string,string>"
|
"$ref": "#/definitions/Record<string,string>"
|
||||||
|
@ -464,7 +464,7 @@ export default {
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"icon": {
|
"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": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"type": "object",
|
"type": "object",
|
||||||
|
|
|
@ -254,7 +254,7 @@
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"render": {
|
"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": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/Record<string,string>"
|
"$ref": "#/definitions/Record<string,string>"
|
||||||
|
@ -291,7 +291,7 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"icon": {
|
"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": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"type": "object",
|
"type": "object",
|
||||||
|
|
|
@ -247,7 +247,7 @@ export default {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"render": {
|
"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": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/Record<string,string>"
|
"$ref": "#/definitions/Record<string,string>"
|
||||||
|
@ -284,7 +284,7 @@ export default {
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"icon": {
|
"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": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"type": "object",
|
"type": "object",
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"render": {
|
"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": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/Record<string,string>"
|
"$ref": "#/definitions/Record<string,string>"
|
||||||
|
@ -40,7 +40,7 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"icon": {
|
"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": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"type": "object",
|
"type": "object",
|
||||||
|
|
|
@ -3,7 +3,7 @@ export default {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"render": {
|
"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": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/Record<string,string>"
|
"$ref": "#/definitions/Record<string,string>"
|
||||||
|
@ -40,7 +40,7 @@ export default {
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"icon": {
|
"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": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"type": "object",
|
"type": "object",
|
||||||
|
|
|
@ -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
|
- [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
|
- [ ] 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
|
- [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] 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] 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] 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] The questionHints take too much space and should be unstickied
|
||||||
- [x] There should be some space for the 'close'-button in the tagRendering
|
- [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"
|
- [x] Changing the icon: the term 'icon badge' is misunderstood and interpreted as "the logo"
|
||||||
- [ ] Trying to change the 'iconBadges' does not work
|
- [x] Trying to change the 'iconBadges' does not work
|
||||||
- [ ] Creating a preset: initially very unclear
|
- [ ] Creating a preset: initially very unclear
|
||||||
|
|
|
@ -201,6 +201,7 @@
|
||||||
"nohousenumber=yes"
|
"nohousenumber=yes"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"addExtraTags": ["addr:housenumber="],
|
||||||
"then": {
|
"then": {
|
||||||
"en": "This building has no house number",
|
"en": "This building has no house number",
|
||||||
"nl": "Dit gebouw heeft geen huisnummer",
|
"nl": "Dit gebouw heeft geen huisnummer",
|
||||||
|
|
|
@ -1122,7 +1122,8 @@
|
||||||
"pl": "To jest lampa neonowa",
|
"pl": "To jest lampa neonowa",
|
||||||
"pt_BR": "Isso é uma luz de neon"
|
"pt_BR": "Isso é uma luz de neon"
|
||||||
},
|
},
|
||||||
"hideInAnswer": "advertising!=sign"
|
"hideInAnswer": "advertising!=sign",
|
||||||
|
"addExtraTags": ["lit=no"]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"condition": {
|
"condition": {
|
||||||
|
|
|
@ -180,6 +180,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"if": "backrest=no",
|
"if": "backrest=no",
|
||||||
|
"addExtraTags": ["two_sided="],
|
||||||
"then": {
|
"then": {
|
||||||
"en": "Does <b>not</b> have a backrest",
|
"en": "Does <b>not</b> have a backrest",
|
||||||
"de": "Die Sitzbank hat <b>keine</b> Rückenlehne",
|
"de": "Die Sitzbank hat <b>keine</b> Rückenlehne",
|
||||||
|
@ -253,7 +254,8 @@
|
||||||
},
|
},
|
||||||
"freeform": {
|
"freeform": {
|
||||||
"key": "seats",
|
"key": "seats",
|
||||||
"type": "nat"
|
"type": "nat",
|
||||||
|
"addExtraTags": ["seats:separated="]
|
||||||
},
|
},
|
||||||
"question": {
|
"question": {
|
||||||
"en": "How many seats does this bench have?",
|
"en": "How many seats does this bench have?",
|
||||||
|
@ -282,6 +284,7 @@
|
||||||
"mappings": [
|
"mappings": [
|
||||||
{
|
{
|
||||||
"if": "seats:separated=no",
|
"if": "seats:separated=no",
|
||||||
|
"addExtraTags": ["seats="],
|
||||||
"then": {
|
"then": {
|
||||||
"en": "This bench does not have separated seats",
|
"en": "This bench does not have separated seats",
|
||||||
"nl": "Deze bank is niet ingedeeld in aparte zitplaatsen",
|
"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"
|
"pt_BR": "Esse banco é um memorial para alguém ou alguma coisa"
|
||||||
},
|
},
|
||||||
"addExtraTags": [
|
"addExtraTags": [
|
||||||
"memorial=bench"
|
"memorial=bench",
|
||||||
|
"not:historic="
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -178,6 +178,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"if": "shop=rental",
|
"if": "shop=rental",
|
||||||
|
|
||||||
"then": {
|
"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",
|
"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",
|
"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",
|
"if": "bicycle_rental=docking_station",
|
||||||
|
"addExtraTags": ["service:bicycle:rental="],
|
||||||
"then": {
|
"then": {
|
||||||
"en": "This is an automated docking station, where a bicycle is mechanically locked to a structure",
|
"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",
|
"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",
|
"if": "bicycle_rental=key_dispensing_machine",
|
||||||
|
"addExtraTags": ["service:bicycle:rental="],
|
||||||
"then": {
|
"then": {
|
||||||
"en": "A machine is present which dispenses and accepts keys, eventually after authentication and/or payment. The bicycles are parked nearby",
|
"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",
|
"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",
|
"if": "bicycle_rental=dropoff_point",
|
||||||
|
"addExtraTags": ["service:bicycle:rental="],
|
||||||
"then": {
|
"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",
|
"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",
|
"nl": "Dit is een dropzone, bv. een fietsparkeerplaats die is voorbehouden voor fietsverhuur",
|
||||||
|
|
|
@ -95,6 +95,7 @@
|
||||||
"freeform": {
|
"freeform": {
|
||||||
"key": "name",
|
"key": "name",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
|
"addExtraTags": ["noname="],
|
||||||
"placeholder": {
|
"placeholder": {
|
||||||
"en": "Name of the car rental",
|
"en": "Name of the car rental",
|
||||||
"nl": "Naam van de autoverhuur",
|
"nl": "Naam van de autoverhuur",
|
||||||
|
@ -117,6 +118,7 @@
|
||||||
"mappings": [
|
"mappings": [
|
||||||
{
|
{
|
||||||
"if": "noname=yes",
|
"if": "noname=yes",
|
||||||
|
"addExtraTags": ["name="],
|
||||||
"then": {
|
"then": {
|
||||||
"en": "This car rental has no name",
|
"en": "This car rental has no name",
|
||||||
"nl": "Deze autoverhuur heeft geen naam",
|
"nl": "Deze autoverhuur heeft geen naam",
|
||||||
|
|
|
@ -581,6 +581,7 @@
|
||||||
"mappings": [
|
"mappings": [
|
||||||
{
|
{
|
||||||
"if": "recycling_type=container",
|
"if": "recycling_type=container",
|
||||||
|
"addExtraTags": ["amenity=recycling"],
|
||||||
"then": {
|
"then": {
|
||||||
"en": "This is a recycling container",
|
"en": "This is a recycling container",
|
||||||
"nl": "Dit is een recyclingcontainer",
|
"nl": "Dit is een recyclingcontainer",
|
||||||
|
@ -594,6 +595,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"if": "recycling_type=centre",
|
"if": "recycling_type=centre",
|
||||||
|
"addExtraTags": ["amenity=recycling"],
|
||||||
"then": {
|
"then": {
|
||||||
"en": "This is a recycling centre",
|
"en": "This is a recycling centre",
|
||||||
"nl": "Dit is een recyclingcentrum",
|
"nl": "Dit is een recyclingcentrum",
|
||||||
|
@ -644,6 +646,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"if": "recycling_type=pickup_point",
|
"if": "recycling_type=pickup_point",
|
||||||
|
"addExtraTags": ["amenity=recycling"],
|
||||||
"then": {
|
"then": {
|
||||||
"en": "This is a pickup point. The waste material is placed here without placing it in a dedicated container.",
|
"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.",
|
"nl": "Dit is een verzamelplaats zonder container waar het afval later opgepikt wordt.",
|
||||||
|
@ -655,6 +658,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"if": "recycling_type=dump",
|
"if": "recycling_type=dump",
|
||||||
|
"addExtraTags": ["amenity=recycling"],
|
||||||
"then": {
|
"then": {
|
||||||
"en": "This is a dump where the waste material is stacked.",
|
"en": "This is a dump where the waste material is stacked.",
|
||||||
"nl": "Dit is een afvalhoop waar het afvalmateriaal bovenop elkaar gestapeld wordt.",
|
"nl": "Dit is een afvalhoop waar het afvalmateriaal bovenop elkaar gestapeld wordt.",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "mapcomplete",
|
"name": "mapcomplete",
|
||||||
"version": "0.34.3",
|
"version": "0.34.4",
|
||||||
"repository": "https://github.com/pietervdvn/MapComplete",
|
"repository": "https://github.com/pietervdvn/MapComplete",
|
||||||
"description": "A small website to edit OSM easily",
|
"description": "A small website to edit OSM easily",
|
||||||
"bugs": "https://github.com/pietervdvn/MapComplete/issues",
|
"bugs": "https://github.com/pietervdvn/MapComplete/issues",
|
||||||
|
|
|
@ -1650,6 +1650,11 @@ video {
|
||||||
background-color: rgb(107 114 128 / var(--tw-bg-opacity));
|
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 {
|
.bg-red-400 {
|
||||||
--tw-bg-opacity: 1;
|
--tw-bg-opacity: 1;
|
||||||
background-color: rgb(248 113 113 / var(--tw-bg-opacity));
|
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));
|
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 {
|
.bg-gray-200 {
|
||||||
--tw-bg-opacity: 1;
|
--tw-bg-opacity: 1;
|
||||||
background-color: rgb(229 231 235 / var(--tw-bg-opacity));
|
background-color: rgb(229 231 235 / var(--tw-bg-opacity));
|
||||||
|
@ -1712,6 +1712,11 @@ video {
|
||||||
padding: 3rem;
|
padding: 3rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.px-2 {
|
||||||
|
padding-left: 0.5rem;
|
||||||
|
padding-right: 0.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
.px-1 {
|
.px-1 {
|
||||||
padding-left: 0.25rem;
|
padding-left: 0.25rem;
|
||||||
padding-right: 0.25rem;
|
padding-right: 0.25rem;
|
||||||
|
@ -1727,11 +1732,6 @@ video {
|
||||||
padding-right: 0.75rem;
|
padding-right: 0.75rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.px-2 {
|
|
||||||
padding-left: 0.5rem;
|
|
||||||
padding-right: 0.5rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.pr-12 {
|
.pr-12 {
|
||||||
padding-right: 3rem;
|
padding-right: 3rem;
|
||||||
}
|
}
|
||||||
|
|
|
@ -452,11 +452,16 @@ class LayerOverviewUtils extends Script {
|
||||||
): {
|
): {
|
||||||
raw: LayerConfigJson
|
raw: LayerConfigJson
|
||||||
parsed: LayerConfig
|
parsed: LayerConfig
|
||||||
|
context: ConversionContext
|
||||||
} {
|
} {
|
||||||
const parser = new ParseLayer(prepLayer, doesImageExist)
|
const parser = new ParseLayer(prepLayer, doesImageExist)
|
||||||
const context = ConversionContext.construct([sharedLayerPath], ["ParseLayer"])
|
const context = ConversionContext.construct([sharedLayerPath], ["ParseLayer"])
|
||||||
const parsed = parser.convertStrict(sharedLayerPath, context)
|
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(
|
private buildLayerIndex(
|
||||||
|
@ -477,6 +482,7 @@ class LayerOverviewUtils extends Script {
|
||||||
const prepLayer = new PrepareLayer(state)
|
const prepLayer = new PrepareLayer(state)
|
||||||
const skippedLayers: string[] = []
|
const skippedLayers: string[] = []
|
||||||
const recompiledLayers: string[] = []
|
const recompiledLayers: string[] = []
|
||||||
|
let warningCount = 0
|
||||||
for (const sharedLayerPath of ScriptUtils.getLayerPaths()) {
|
for (const sharedLayerPath of ScriptUtils.getLayerPaths()) {
|
||||||
{
|
{
|
||||||
const targetPath =
|
const targetPath =
|
||||||
|
@ -492,6 +498,7 @@ class LayerOverviewUtils extends Script {
|
||||||
}
|
}
|
||||||
|
|
||||||
const parsed = this.parseLayer(doesImageExist, prepLayer, sharedLayerPath)
|
const parsed = this.parseLayer(doesImageExist, prepLayer, sharedLayerPath)
|
||||||
|
warningCount += parsed.context.getAll("warning").length
|
||||||
const fixed = parsed.raw
|
const fixed = parsed.raw
|
||||||
if (sharedLayers.has(fixed.id)) {
|
if (sharedLayers.has(fixed.id)) {
|
||||||
throw "There are multiple layers with the id " + fixed.id + ", " + sharedLayerPath
|
throw "There are multiple layers with the id " + fixed.id + ", " + sharedLayerPath
|
||||||
|
@ -508,7 +515,9 @@ class LayerOverviewUtils extends Script {
|
||||||
recompiledLayers.join(", ") +
|
recompiledLayers.join(", ") +
|
||||||
" and skipped " +
|
" and skipped " +
|
||||||
skippedLayers.length +
|
skippedLayers.length +
|
||||||
" layers"
|
" layers. Detected " +
|
||||||
|
warningCount +
|
||||||
|
" warnings"
|
||||||
)
|
)
|
||||||
// We always need the calculated tags of 'usersettings', so we export them separately
|
// We always need the calculated tags of 'usersettings', so we export them separately
|
||||||
this.extractJavascriptCodeForLayer(
|
this.extractJavascriptCodeForLayer(
|
||||||
|
|
|
@ -357,7 +357,7 @@ export class PrevalidateTheme extends Fuse<LayoutConfigJson> {
|
||||||
export class DetectConflictingAddExtraTags extends DesugaringStep<TagRenderingConfigJson> {
|
export class DetectConflictingAddExtraTags extends DesugaringStep<TagRenderingConfigJson> {
|
||||||
constructor() {
|
constructor() {
|
||||||
super(
|
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"
|
"DetectConflictingAddExtraTags"
|
||||||
)
|
)
|
||||||
|
@ -399,6 +399,100 @@ export class DetectConflictingAddExtraTags extends DesugaringStep<TagRenderingCo
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export class DetectNonErasedKeysInMappings extends DesugaringStep<QuestionableTagRenderingConfigJson> {
|
||||||
|
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<string>) {
|
||||||
|
keys?.forEach((k) => addTo.add(k))
|
||||||
|
}
|
||||||
|
|
||||||
|
const freeformKeys: Set<string> = 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<string>[] = []
|
||||||
|
for (const mapping of json.mappings ?? []) {
|
||||||
|
if (mapping.hideInAnswer === true) {
|
||||||
|
mappingKeys.push(undefined)
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
const thisMappingKeys: Set<string> = new Set<string>()
|
||||||
|
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<string>()
|
||||||
|
|
||||||
|
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<TagRenderingConfigJson> {
|
export class DetectShadowedMappings extends DesugaringStep<TagRenderingConfigJson> {
|
||||||
private readonly _calculatedTagNames: string[]
|
private readonly _calculatedTagNames: string[]
|
||||||
|
|
||||||
|
@ -874,6 +968,7 @@ export class ValidateTagRenderings extends Fuse<TagRenderingConfigJson> {
|
||||||
"Various validation on tagRenderingConfigs",
|
"Various validation on tagRenderingConfigs",
|
||||||
new DetectShadowedMappings(layerConfig),
|
new DetectShadowedMappings(layerConfig),
|
||||||
new DetectConflictingAddExtraTags(),
|
new DetectConflictingAddExtraTags(),
|
||||||
|
new DetectNonErasedKeysInMappings(),
|
||||||
new DetectMappingsWithImages(doesImageExist),
|
new DetectMappingsWithImages(doesImageExist),
|
||||||
new On("render", new ValidatePossibleLinks()),
|
new On("render", new ValidatePossibleLinks()),
|
||||||
new On("question", new ValidatePossibleLinks()),
|
new On("question", new ValidatePossibleLinks()),
|
||||||
|
@ -1195,6 +1290,10 @@ export class PrevalidateLayer extends DesugaringStep<LayerConfigJson> {
|
||||||
const baseTags = TagUtils.Tag(json.source["osmTags"])
|
const baseTags = TagUtils.Tag(json.source["osmTags"])
|
||||||
for (let i = 0; i < json.presets.length; i++) {
|
for (let i = 0; i < json.presets.length; i++) {
|
||||||
const preset = json.presets[i]
|
const preset = json.presets[i]
|
||||||
|
if (!preset) {
|
||||||
|
context.enters("presets", i).err("This preset is undefined")
|
||||||
|
continue
|
||||||
|
}
|
||||||
if (!preset.tags) {
|
if (!preset.tags) {
|
||||||
context.enters("presets", i, "tags").err("No tags defined for this preset")
|
context.enters("presets", i, "tags").err("No tags defined for this preset")
|
||||||
continue
|
continue
|
||||||
|
|
|
@ -116,7 +116,7 @@ export interface LayoutConfigJson {
|
||||||
* type: float
|
* type: float
|
||||||
* group: start_location
|
* group: start_location
|
||||||
*/
|
*/
|
||||||
startZoom: number
|
startZoom?: number
|
||||||
/**
|
/**
|
||||||
* question: At what start latitude should this theme open?
|
* question: At what start latitude should this theme open?
|
||||||
* Default location and zoom to start.
|
* Default location and zoom to start.
|
||||||
|
@ -125,7 +125,7 @@ export interface LayoutConfigJson {
|
||||||
* type: float
|
* type: float
|
||||||
* group: start_location
|
* group: start_location
|
||||||
*/
|
*/
|
||||||
startLat: number
|
startLat?: number
|
||||||
/**
|
/**
|
||||||
* question: At what start longitude should this theme open?
|
* question: At what start longitude should this theme open?
|
||||||
* Default location and zoom to start.
|
* Default location and zoom to start.
|
||||||
|
@ -134,7 +134,7 @@ export interface LayoutConfigJson {
|
||||||
* type: float
|
* type: float
|
||||||
* group: start_location
|
* group: start_location
|
||||||
*/
|
*/
|
||||||
startLon: number
|
startLon?: number
|
||||||
/**
|
/**
|
||||||
* The id of the default background. BY default: vanilla OSM
|
* The id of the default background. BY default: vanilla OSM
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -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.
|
* 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
|
* 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?: {
|
iconBadges?: {
|
||||||
if: TagConfigJson
|
if: TagConfigJson
|
||||||
|
@ -95,6 +96,29 @@ export default interface PointRenderingConfigJson {
|
||||||
*/
|
*/
|
||||||
label?: string | TagRenderingConfigJson
|
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 <b>{value}</b> 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 <b>{value}</b> 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?
|
* question: What CSS should be applied to the entire marker?
|
||||||
* You can set the css-properties here, e.g. `background: red; font-size: 12px; `
|
* 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 <b>{value}</b> to the _entire marker_
|
* inline: Apply CSS-style <b>{value}</b> to the _entire marker_
|
||||||
* types: Dynamic value ; string
|
* types: Dynamic value ; string
|
||||||
* ifunset: Do not apply extra CSS element to the entire marker
|
* ifunset: Do not apply extra CSS element to the entire marker
|
||||||
*
|
* group: expert
|
||||||
*/
|
*/
|
||||||
css?: string | TagRenderingConfigJson
|
css?: string | TagRenderingConfigJson
|
||||||
|
|
||||||
|
@ -117,34 +141,14 @@ export default interface PointRenderingConfigJson {
|
||||||
* ifunset: Do not apply extra CSS-classes to the label
|
* ifunset: Do not apply extra CSS-classes to the label
|
||||||
* types: Dynamic value ; string
|
* types: Dynamic value ; string
|
||||||
* ifunset: Do not apply extra CSS-classes to the entire marker
|
* ifunset: Do not apply extra CSS-classes to the entire marker
|
||||||
|
* group: expert
|
||||||
*/
|
*/
|
||||||
cssClasses?: string | TagRenderingConfigJson
|
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 <b>{value}</b> 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 <b>{value}</b> 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?
|
* 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)"}]
|
* 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
|
pitchAlignment?: "canvas" | "map" | TagRenderingConfigJson
|
||||||
|
|
||||||
|
@ -152,6 +156,7 @@ export default interface PointRenderingConfigJson {
|
||||||
* question: Should the icon be rotated if the map is rotated?
|
* question: Should the icon be rotated if the map is rotated?
|
||||||
* ifunset: Do not rotate or tilt icons. Always keep the icons straight
|
* 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."}]
|
* 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
|
rotationAlignment?: "map" | "canvas" | TagRenderingConfigJson
|
||||||
}
|
}
|
||||||
|
|
|
@ -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' />`
|
* 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
|
* type: rendered
|
||||||
|
* ifunset: no text is rendered if no predefined options match
|
||||||
*/
|
*/
|
||||||
render?:
|
render?:
|
||||||
| Translatable
|
| Translatable
|
||||||
|
@ -66,6 +67,7 @@ export interface TagRenderingConfigJson {
|
||||||
* An icon shown next to the rendering; typically shown pretty small
|
* An icon shown next to the rendering; typically shown pretty small
|
||||||
* This is only shown next to the "render" value
|
* This is only shown next to the "render" value
|
||||||
* Type: icon
|
* Type: icon
|
||||||
|
* ifunset: do not show an icon next to the "render"-value
|
||||||
*/
|
*/
|
||||||
icon?:
|
icon?:
|
||||||
| string
|
| string
|
||||||
|
|
|
@ -32,7 +32,6 @@
|
||||||
{#each layer.tagRenderings as config (config.id)}
|
{#each layer.tagRenderings as config (config.id)}
|
||||||
{#if (config.condition?.matchesProperties($tags) ?? true) && config.metacondition?.matchesProperties({ ...$tags, ..._metatags } ?? true)}
|
{#if (config.condition?.matchesProperties($tags) ?? true) && config.metacondition?.matchesProperties({ ...$tags, ..._metatags } ?? true)}
|
||||||
{#if config.IsKnown($tags)}
|
{#if config.IsKnown($tags)}
|
||||||
{config.id}
|
|
||||||
<TagRenderingEditable
|
<TagRenderingEditable
|
||||||
{tags}
|
{tags}
|
||||||
{config}
|
{config}
|
||||||
|
|
|
@ -110,10 +110,6 @@ export abstract class EditJsonState<T> {
|
||||||
public getStoreFor<T>(path: ReadonlyArray<string | number>): UIEventSource<T | undefined> {
|
public getStoreFor<T>(path: ReadonlyArray<string | number>): UIEventSource<T | undefined> {
|
||||||
const key = path.join(".")
|
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<any>(this.getCurrentValueFor(path))
|
const store = new UIEventSource<any>(this.getCurrentValueFor(path))
|
||||||
store.addCallback((v) => {
|
store.addCallback((v) => {
|
||||||
this.setValueAt(path, v)
|
this.setValueAt(path, v)
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
|
|
||||||
let thenText: UIEventSource<Record<string, string>> = state.getStoreFor([...path, "then"])
|
let thenText: UIEventSource<Record<string, string>> = state.getStoreFor([...path, "then"])
|
||||||
let thenTextEn = thenText .mapD(translation => typeof translation === "string" ? translation : translation["en"] )
|
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")
|
let mappingConfigs: ConfigMeta[] = configs.filter(c => c.path[0] === "mappings")
|
||||||
.map(c => <ConfigMeta>Utils.Clone(c))
|
.map(c => <ConfigMeta>Utils.Clone(c))
|
||||||
|
|
|
@ -13,7 +13,8 @@ export let title: string | undefined = undefined;
|
||||||
export let path: (string | number)[] = [];
|
export let path: (string | number)[] = [];
|
||||||
|
|
||||||
let expertMode = state.expertMode
|
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")
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
{#if configs === undefined}
|
{#if configs === undefined}
|
||||||
|
|
|
@ -6,7 +6,6 @@
|
||||||
import SchemaBasedField from "./SchemaBasedField.svelte";
|
import SchemaBasedField from "./SchemaBasedField.svelte";
|
||||||
import { TrashIcon } from "@babeard/svelte-heroicons/mini";
|
import { TrashIcon } from "@babeard/svelte-heroicons/mini";
|
||||||
import QuestionPreview from "./QuestionPreview.svelte";
|
import QuestionPreview from "./QuestionPreview.svelte";
|
||||||
import { Utils } from "../../Utils";
|
|
||||||
import SchemaBasedMultiType from "./SchemaBasedMultiType.svelte";
|
import SchemaBasedMultiType from "./SchemaBasedMultiType.svelte";
|
||||||
import ShowConversionMessage from "./ShowConversionMessage.svelte";
|
import ShowConversionMessage from "./ShowConversionMessage.svelte";
|
||||||
|
|
||||||
|
@ -24,6 +23,7 @@
|
||||||
article = "an";
|
article = "an";
|
||||||
}
|
}
|
||||||
export let path: (string | number)[] = [];
|
export let path: (string | number)[] = [];
|
||||||
|
|
||||||
const isTagRenderingBlock = path.length === 1 && path[0] === "tagRenderings";
|
const isTagRenderingBlock = path.length === 1 && path[0] === "tagRenderings";
|
||||||
|
|
||||||
if (isTagRenderingBlock) {
|
if (isTagRenderingBlock) {
|
||||||
|
@ -33,37 +33,24 @@
|
||||||
|
|
||||||
const subparts: ConfigMeta = state.getSchemaStartingWith(schema.path)
|
const subparts: ConfigMeta = state.getSchemaStartingWith(schema.path)
|
||||||
.filter(part => part.path.length - 1 === schema.path.length);
|
.filter(part => part.path.length - 1 === schema.path.length);
|
||||||
/**
|
|
||||||
* Store the _indices_
|
|
||||||
*/
|
|
||||||
export let values: UIEventSource<number[]> = new UIEventSource<number[]>([]);
|
|
||||||
|
|
||||||
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)
|
let messages = state.messagesFor(path)
|
||||||
|
|
||||||
|
|
||||||
|
const currentValue : UIEventSource<any[]> = state.getStoreFor(path);
|
||||||
|
if(currentValue.data === undefined){
|
||||||
|
currentValue.setData([])
|
||||||
|
}
|
||||||
|
|
||||||
function createItem(valueToSet?: any) {
|
function createItem(valueToSet?: any) {
|
||||||
values.data.push(createdItems);
|
if(currentValue.data === undefined){
|
||||||
if (valueToSet) {
|
currentValue.setData([])
|
||||||
state.getStoreFor([...path, createdItems]).setData(valueToSet);
|
|
||||||
}
|
}
|
||||||
createdItems++;
|
currentValue.data.push(valueToSet)
|
||||||
values.ping();
|
currentValue.ping()
|
||||||
|
|
||||||
if(isTagRenderingBlock){
|
if(isTagRenderingBlock){
|
||||||
if(typeof valueToSet === "string"){
|
state.highlightedItem.setData({path: [...path, currentValue.data.length - 1], schema})
|
||||||
// THis is very broken state.highlightedItem.setData({path: [...path, createdItems], schema})
|
|
||||||
}else{
|
|
||||||
state.highlightedItem.setData({path: [...path, createdItems], schema})
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -73,54 +60,40 @@
|
||||||
for (const part of path) {
|
for (const part of path) {
|
||||||
if (toAdd[0] === part) {
|
if (toAdd[0] === part) {
|
||||||
toAdd.splice(0, 1);
|
toAdd.splice(0, 1);
|
||||||
|
}else{
|
||||||
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
newPath.push(...toAdd);
|
newPath.push(...toAdd);
|
||||||
|
console.log({newPath})
|
||||||
return newPath;
|
return newPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
function del(i) {
|
|
||||||
const index = i;
|
|
||||||
console.log("Deleting", index);
|
|
||||||
values.data.splice(index, 1);
|
|
||||||
values.ping();
|
|
||||||
|
|
||||||
const store = <UIEventSource<[]>>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 = <UIEventSource<[]>>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() {
|
function schemaForMultitype() {
|
||||||
const sch = {...schema}
|
const sch = {...schema}
|
||||||
sch.hints.typehint = undefined
|
sch.hints.typehint = undefined
|
||||||
return sch
|
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()
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
@ -132,8 +105,9 @@
|
||||||
{schema.description}
|
{schema.description}
|
||||||
</span>
|
</span>
|
||||||
{/if}
|
{/if}
|
||||||
|
{#if $currentValue === undefined}
|
||||||
{#if $values.length === 0}
|
No array defined
|
||||||
|
{:else if $currentValue.length === 0}
|
||||||
No values are defined
|
No values are defined
|
||||||
{#if $messages.length > 0}
|
{#if $messages.length > 0}
|
||||||
{#each $messages as message}
|
{#each $messages as message}
|
||||||
|
@ -142,9 +116,9 @@
|
||||||
{/if}
|
{/if}
|
||||||
{:else if subparts.length === 0}
|
{:else if subparts.length === 0}
|
||||||
<!-- We need an array of values, so we use the typehint of the _parent_ element as field -->
|
<!-- We need an array of values, so we use the typehint of the _parent_ element as field -->
|
||||||
{#each $values as value, i (value)}
|
{#each $currentValue as value, i}
|
||||||
<div class="flex w-full">
|
<div class="flex w-full">
|
||||||
<SchemaBasedField {state} {schema} path={[...path, value]} />
|
<SchemaBasedField {state} {schema} path={[...path, i]} />
|
||||||
<button class="border-black border rounded-full p-1 w-fit h-fit"
|
<button class="border-black border rounded-full p-1 w-fit h-fit"
|
||||||
on:click={() => {del(i)}}>
|
on:click={() => {del(i)}}>
|
||||||
<TrashIcon class="w-4 h-4" />
|
<TrashIcon class="w-4 h-4" />
|
||||||
|
@ -152,11 +126,10 @@
|
||||||
</div>
|
</div>
|
||||||
{/each}
|
{/each}
|
||||||
{:else}
|
{:else}
|
||||||
{#each $values as value, i (value)}
|
{#each $currentValue as value, i}
|
||||||
|
|
||||||
{#if !isTagRenderingBlock}
|
{#if !isTagRenderingBlock}
|
||||||
<div class="flex justify-between items-center">
|
<div class="flex justify-between items-center">
|
||||||
<h3 class="m-0">{singular} {value}</h3>
|
<h3 class="m-0">{singular} {i}</h3>
|
||||||
<button class="border-black border rounded-full p-1 w-fit h-fit"
|
<button class="border-black border rounded-full p-1 w-fit h-fit"
|
||||||
on:click={() => {del(i)}}>
|
on:click={() => {del(i)}}>
|
||||||
<TrashIcon class="w-4 h-4" />
|
<TrashIcon class="w-4 h-4" />
|
||||||
|
@ -165,7 +138,7 @@
|
||||||
{/if}
|
{/if}
|
||||||
<div class="border border-black">
|
<div class="border border-black">
|
||||||
{#if isTagRenderingBlock}
|
{#if isTagRenderingBlock}
|
||||||
<QuestionPreview {state} path={[...path, value]} {schema}>
|
<QuestionPreview {state} path={[...path, i]} {schema}>
|
||||||
<button on:click={() => {del(i)}}>
|
<button on:click={() => {del(i)}}>
|
||||||
<TrashIcon class="w-4 h-4" />
|
<TrashIcon class="w-4 h-4" />
|
||||||
Delete this question
|
Delete this question
|
||||||
|
@ -180,21 +153,21 @@
|
||||||
Move up
|
Move up
|
||||||
</button>
|
</button>
|
||||||
{/if}
|
{/if}
|
||||||
{#if i + 1 < $values.length}
|
{#if i + 1 < $currentValue.length}
|
||||||
<button on:click={() => {swap(i, i+1)}}>
|
<button on:click={() => {swap(i, i+1)}}>
|
||||||
Move down
|
Move down
|
||||||
</button>
|
</button>
|
||||||
<button on:click={() => {moveTo(i, $values.length-1)}}>
|
<button on:click={() => {moveTo(i, $currentValue.length-1)}}>
|
||||||
Move to back
|
Move to back
|
||||||
</button>
|
</button>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
</QuestionPreview>
|
</QuestionPreview>
|
||||||
{:else if schema.hints.types}
|
{:else if schema.hints.types}
|
||||||
<SchemaBasedMultiType {state} path={fusePath(value, [])} schema={schemaForMultitype()}/>
|
<SchemaBasedMultiType {state} path={fusePath(i, [])} schema={schemaForMultitype()}/>
|
||||||
{:else}
|
{:else}
|
||||||
{#each subparts as subpart}
|
{#each subparts as subpart}
|
||||||
<SchemaBasedInput {state} path={fusePath(value, subpart.path)} schema={subpart} />
|
<SchemaBasedInput {state} path={fusePath(i, subpart.path)} schema={subpart} />
|
||||||
{/each}
|
{/each}
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -17,21 +17,21 @@
|
||||||
export let state: EditLayerState;
|
export let state: EditLayerState;
|
||||||
export let path: (string | number)[] = [];
|
export let path: (string | number)[] = [];
|
||||||
export let schema: ConfigMeta;
|
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<string | any>(undefined);
|
let value = new UIEventSource<string | any>(undefined);
|
||||||
|
|
||||||
const isTranslation = schema.hints?.typehint === "translation" || schema.hints?.typehint === "rendered" || ConfigMetaUtils.isTranslation(schema);
|
const isTranslation = schema.hints?.typehint === "translation" || schema.hints?.typehint === "rendered" || ConfigMetaUtils.isTranslation(schema);
|
||||||
let type = schema.hints.typehint ?? "string";
|
let type = schema.hints.typehint ?? "string";
|
||||||
|
|
||||||
let rendervalue = (schema.hints.inline ?? schema.path.join(".")) + (isTranslation ? " <b>{translated(value)}</b>": " <b>{value}</b>");
|
let rendervalue = (schema.hints.inline ?? schema.path.join(".")) + (isTranslation ? " <b>{translated(value)}</b>" : " <b>{value}</b>");
|
||||||
|
|
||||||
if(schema.type === "boolean"){
|
if (schema.type === "boolean") {
|
||||||
rendervalue = undefined
|
rendervalue = undefined;
|
||||||
}
|
}
|
||||||
if(schema.hints.typehint === "tag" || schema.hints.typehint === "simple_tag") {
|
if (schema.hints.typehint === "tag" || schema.hints.typehint === "simple_tag") {
|
||||||
rendervalue = "{tags()}"
|
rendervalue = "{tags()}";
|
||||||
}
|
}
|
||||||
|
|
||||||
let helperArgs = schema.hints.typehelper?.split(",");
|
let helperArgs = schema.hints.typehelper?.split(",");
|
||||||
let inline = schema.hints.inline !== undefined;
|
let inline = schema.hints.inline !== undefined;
|
||||||
if (isTranslation) {
|
if (isTranslation) {
|
||||||
|
@ -111,7 +111,7 @@
|
||||||
}
|
}
|
||||||
let config: TagRenderingConfig;
|
let config: TagRenderingConfig;
|
||||||
let err: string = undefined;
|
let err: string = undefined;
|
||||||
let messages = state.messagesFor(path)
|
let messages = state.messagesFor(path);
|
||||||
try {
|
try {
|
||||||
config = new TagRenderingConfig(configJson, "config based on " + schema.path.join("."));
|
config = new TagRenderingConfig(configJson, "config based on " + schema.path.join("."));
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
@ -119,13 +119,13 @@
|
||||||
err = path.join(".") + " " + e;
|
err = path.join(".") + " " + e;
|
||||||
}
|
}
|
||||||
let startValue = state.getCurrentValueFor(path);
|
let startValue = state.getCurrentValueFor(path);
|
||||||
let startInEditMode = !startValue && startInEditModeIfUnset
|
let startInEditMode = !startValue && startInEditModeIfUnset;
|
||||||
const tags = new UIEventSource<Record<string, string>>({ value: startValue });
|
const tags = new UIEventSource<Record<string, string>>({ value: startValue });
|
||||||
try {
|
try {
|
||||||
onDestroy(state.register(path, tags.map(tgs => {
|
onDestroy(state.register(path, tags.map(tgs => {
|
||||||
const v = tgs["value"];
|
const v = tgs["value"];
|
||||||
if (typeof v !== "string") {
|
if (typeof v !== "string") {
|
||||||
return { ... v };
|
return { ...v };
|
||||||
}
|
}
|
||||||
if (schema.type === "boolan") {
|
if (schema.type === "boolan") {
|
||||||
return v === "true" || v === "yes" || v === "1";
|
return v === "true" || v === "yes" || v === "1";
|
||||||
|
@ -156,18 +156,21 @@
|
||||||
console.error("Could not register", path, "due to", e);
|
console.error("Could not register", path, "due to", e);
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{#if err !== undefined}
|
{#if err !== undefined}
|
||||||
<span class="alert">{err}</span>
|
<span class="alert">{err}</span>
|
||||||
{:else}
|
{:else}
|
||||||
<div class="w-full flex flex-col">
|
<div class="w-full flex flex-col">
|
||||||
<TagRenderingEditable editMode={startInEditMode} {config} selectedElement={undefined} showQuestionIfUnknown={true} {state} {tags} />
|
<TagRenderingEditable editMode={startInEditMode} {config} selectedElement={undefined} showQuestionIfUnknown={true}
|
||||||
|
{state} {tags} />
|
||||||
{#if $messages.length > 0}
|
{#if $messages.length > 0}
|
||||||
{#each $messages as message}
|
{#each $messages as message}
|
||||||
<ShowConversionMessage {message}/>
|
<ShowConversionMessage {message} />
|
||||||
{/each}
|
{/each}
|
||||||
{/if}
|
{/if}
|
||||||
{#if window.location.hostname === "127.0.0.1"}
|
{#if window.location.hostname === "127.0.0.1"}
|
||||||
<span class="subtle">SchemaBasedField <b>{path.join(".")}</b> <span class="cursor-pointer" on:click={() => console.log(schema)}>{schema.hints.typehint}</span></span>
|
<span class="subtle" on:click={() => console.log(schema)}>SchemaBasedField <b>{path.join(".")}</b> <span class="cursor-pointer"
|
||||||
|
on:click={() => console.log(schema)}>{schema.hints.typehint}</span> Group: {schema.hints.group}</span>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
|
@ -9,17 +9,21 @@
|
||||||
export let schema: ConfigMeta;
|
export let schema: ConfigMeta;
|
||||||
export let state: EditLayerState;
|
export let state: EditLayerState;
|
||||||
export let path: (string | number)[] = [];
|
export let path: (string | number)[] = [];
|
||||||
|
let expertMode = state.expertMode;
|
||||||
</script>
|
</script>
|
||||||
{#if schema.hints?.typehint?.endsWith("[]")}
|
{#if (schema.hints?.group !== "expert" || $expertMode) && schema.hints.group !== "hidden"}
|
||||||
<!-- We cheat a bit here by matching this 'magical' type... -->
|
{#if schema.hints?.typehint?.endsWith("[]")}
|
||||||
<SchemaBasedArray {path} {state} {schema} />
|
<!-- We cheat a bit here by matching this 'magical' type... -->
|
||||||
{:else if schema.type === "array" && schema.hints.multianswer === "true"}
|
<SchemaBasedArray {path} {state} {schema} />
|
||||||
<ArrayMultiAnswer {path} {state} {schema}/>
|
{:else if schema.type === "array" && schema.hints.multianswer === "true"}
|
||||||
{:else if schema.type === "array"}
|
<ArrayMultiAnswer {path} {state} {schema} />
|
||||||
<SchemaBasedArray {path} {state} {schema} />
|
{:else if schema.type === "array"}
|
||||||
{:else if schema.hints?.types}
|
<SchemaBasedArray {path} {state} {schema} />
|
||||||
<SchemaBasedMultiType {path} {state} {schema} />
|
{:else if schema.hints?.types}
|
||||||
{:else}
|
<SchemaBasedMultiType {path} {state} {schema} />
|
||||||
<SchemaBasedField {path} {state} {schema} />
|
{:else}
|
||||||
|
<SchemaBasedField {path} {state} {schema} />
|
||||||
|
{/if}
|
||||||
|
{:else if window.location.hostname === "127.0.0.1"}
|
||||||
|
<div class="subtle">Not showing SBI {schema.path.join(".")} due to group {schema.hints.group}</div>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
|
@ -14,7 +14,6 @@
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
import nmd from "nano-markdown";
|
import nmd from "nano-markdown";
|
||||||
import ShowConversionMessage from "./ShowConversionMessage.svelte";
|
import ShowConversionMessage from "./ShowConversionMessage.svelte";
|
||||||
import exp from "constants";
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* If 'types' is defined: allow the user to pick one of the types to input.
|
* If 'types' is defined: allow the user to pick one of the types to input.
|
||||||
|
@ -196,7 +195,6 @@
|
||||||
}));
|
}));
|
||||||
let messages = state.messagesFor(path);
|
let messages = state.messagesFor(path);
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="p-2 border-2 border-dashed border-gray-300 flex flex-col gap-y-2 m-1">
|
<div class="p-2 border-2 border-dashed border-gray-300 flex flex-col gap-y-2 m-1">
|
||||||
|
@ -209,7 +207,7 @@
|
||||||
Studio
|
Studio
|
||||||
{:else}
|
{:else}
|
||||||
<div>
|
<div>
|
||||||
<TagRenderingEditable {config} selectedElement={undefined} showQuestionIfUnknown={true} {state} {tags} />
|
<TagRenderingEditable {config} selectedElement={undefined} showQuestionIfUnknown={!schema.hints?.ifunset} {state} {tags} />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{#if chosenOption !== undefined}
|
{#if chosenOption !== undefined}
|
||||||
|
@ -217,9 +215,9 @@
|
||||||
{#if $expertMode || subschema.hints?.group !== "expert"}
|
{#if $expertMode || subschema.hints?.group !== "expert"}
|
||||||
<SchemaBasedInput {state} schema={subschema}
|
<SchemaBasedInput {state} schema={subschema}
|
||||||
path={[...subpath, (subschema?.path?.at(-1) ?? "???")]}></SchemaBasedInput>
|
path={[...subpath, (subschema?.path?.at(-1) ?? "???")]}></SchemaBasedInput>
|
||||||
{:else if window.location.hostname === "127.0.0.1"}
|
{:else if window.location.hostname === "127.0.0.1"}
|
||||||
<span class="subtle">Omitted expert question {subschema.path.join(".")}</span>
|
<span class="subtle">Omitted expert question {subschema.path.join(".")}</span>
|
||||||
|
|
||||||
{/if}
|
{/if}
|
||||||
{/each}
|
{/each}
|
||||||
{:else if $messages.length > 0}
|
{:else if $messages.length > 0}
|
||||||
|
|
|
@ -9,7 +9,6 @@
|
||||||
* Markdown
|
* Markdown
|
||||||
*/
|
*/
|
||||||
export let pages: string[];
|
export let pages: string[];
|
||||||
console.log("Walkthrough pages are", pages)
|
|
||||||
|
|
||||||
let currentPage: number = 0;
|
let currentPage: number = 0;
|
||||||
|
|
||||||
|
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -791,7 +791,8 @@
|
||||||
"required": false,
|
"required": false,
|
||||||
"hints": {
|
"hints": {
|
||||||
"typehint": "rendered",
|
"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": [
|
"type": [
|
||||||
{
|
{
|
||||||
|
@ -836,7 +837,8 @@
|
||||||
"required": false,
|
"required": false,
|
||||||
"hints": {
|
"hints": {
|
||||||
"typehint": "icon",
|
"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": [
|
"type": [
|
||||||
{
|
{
|
||||||
|
|
|
@ -13,7 +13,8 @@
|
||||||
"required": false,
|
"required": false,
|
||||||
"hints": {
|
"hints": {
|
||||||
"typehint": "rendered",
|
"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": [
|
"type": [
|
||||||
{
|
{
|
||||||
|
@ -58,7 +59,8 @@
|
||||||
"required": false,
|
"required": false,
|
||||||
"hints": {
|
"hints": {
|
||||||
"typehint": "icon",
|
"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": [
|
"type": [
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue