diff --git a/Docs/Schemas/IconConfigJson.schema.json b/Docs/Schemas/IconConfigJson.schema.json
index 24953a630c..c44d49a237 100644
--- a/Docs/Schemas/IconConfigJson.schema.json
+++ b/Docs/Schemas/IconConfigJson.schema.json
@@ -2,7 +2,7 @@
"type": "object",
"properties": {
"icon": {
- "description": "question: What icon should be used?\n\nTo reuse icons from a different layer of a library:\n- The library layer has, within tagRenderings one which will output the URL of the image (e.g. mappings: {\"if\": \"shop=xyz\", then: \"./assets/icons/shop_xyz.png\"})\n- Use \"layer_id.tagrendering_id\"\n\nNote that if you reuse icons from a different icon set, you'll probably want to use `override` to set a default rendering\n\n\ntypes: Use a different icon depending on the value of some attributes ; icon\nsuggestions: return [ \"nsi_brand.icon\", \"nsi_operator.icon\", \"id_presets.shop_rendering\", ...Constants.defaultPinIcons.map(i => ({if: \"value=\"+i, then: i, icon: i}))]",
+ "description": "question: What icon should be used?\n\nTo reuse icons from a different layer of a library:\n- The library layer has, within tagRenderings one which will output the URL of the image (e.g. mappings: {\"if\": \"shop=xyz\", then: \"./assets/icons/shop_xyz.png\"})\n- Use \"layer_id.tagrendering_id\"\n\nNote that if you reuse icons from a different icon set, you'll probably want to use `override` to set a default rendering\n\n\ntypes: Use a different icon depending on the value of some attributes ; icon\nsuggestions: return [ {\"if\":\"value=nsi_brand.icon\", \"then\": \"Use icons for brand from the Name Suggestion Index\"}, {\"if\":\"value=nsi_operator.icon\", \"then\": \"Use icons for operator from the Name Suggestion Index\"}, {\"if\":\"value=id_presets.shop_rendering\", \"then\": \"Use shop preset icons from iD\"}, ...Constants.defaultPinIcons.map(i => ({if: \"value=\"+i, then: i, icon: i}))]",
"anyOf": [
{
"$ref": "#/definitions/MinimalTagRenderingConfigJson"
@@ -26,7 +26,7 @@
]
},
"color": {
- "description": "question: What colour should the icon be?\nThis will only work for the default icons such as `pin`,`circle`,...\ntypes: Use a different color depending on the value of some attributes ; color",
+ "description": "question: What colour should the icon be?\n\nThis will only work for the default icons such as `pin`,`circle`,...\n\ntypes: Use a different color depending on the value of some attributes ; color",
"anyOf": [
{
"$ref": "#/definitions/MinimalTagRenderingConfigJson"
diff --git a/Docs/Schemas/IconConfigJsonJSC.ts b/Docs/Schemas/IconConfigJsonJSC.ts
index 6ece3c0de3..d4c0acf3d0 100644
--- a/Docs/Schemas/IconConfigJsonJSC.ts
+++ b/Docs/Schemas/IconConfigJsonJSC.ts
@@ -2,7 +2,7 @@ export default {
"type": "object",
"properties": {
"icon": {
- "description": "question: What icon should be used?\n\nTo reuse icons from a different layer of a library:\n- The library layer has, within tagRenderings one which will output the URL of the image (e.g. mappings: {\"if\": \"shop=xyz\", then: \"./assets/icons/shop_xyz.png\"})\n- Use \"layer_id.tagrendering_id\"\n\nNote that if you reuse icons from a different icon set, you'll probably want to use `override` to set a default rendering\n\n\ntypes: Use a different icon depending on the value of some attributes ; icon\nsuggestions: return [ \"nsi_brand.icon\", \"nsi_operator.icon\", \"id_presets.shop_rendering\", ...Constants.defaultPinIcons.map(i => ({if: \"value=\"+i, then: i, icon: i}))]",
+ "description": "question: What icon should be used?\n\nTo reuse icons from a different layer of a library:\n- The library layer has, within tagRenderings one which will output the URL of the image (e.g. mappings: {\"if\": \"shop=xyz\", then: \"./assets/icons/shop_xyz.png\"})\n- Use \"layer_id.tagrendering_id\"\n\nNote that if you reuse icons from a different icon set, you'll probably want to use `override` to set a default rendering\n\n\ntypes: Use a different icon depending on the value of some attributes ; icon\nsuggestions: return [ {\"if\":\"value=nsi_brand.icon\", \"then\": \"Use icons for brand from the Name Suggestion Index\"}, {\"if\":\"value=nsi_operator.icon\", \"then\": \"Use icons for operator from the Name Suggestion Index\"}, {\"if\":\"value=id_presets.shop_rendering\", \"then\": \"Use shop preset icons from iD\"}, ...Constants.defaultPinIcons.map(i => ({if: \"value=\"+i, then: i, icon: i}))]",
"anyOf": [
{
"$ref": "#/definitions/MinimalTagRenderingConfigJson"
@@ -26,7 +26,7 @@ export default {
]
},
"color": {
- "description": "question: What colour should the icon be?\nThis will only work for the default icons such as `pin`,`circle`,...\ntypes: Use a different color depending on the value of some attributes ; color",
+ "description": "question: What colour should the icon be?\n\nThis will only work for the default icons such as `pin`,`circle`,...\n\ntypes: Use a different color depending on the value of some attributes ; color",
"anyOf": [
{
"$ref": "#/definitions/MinimalTagRenderingConfigJson"
diff --git a/Docs/Schemas/LayerConfigJson.schema.json b/Docs/Schemas/LayerConfigJson.schema.json
index 00cae969c5..bdf8b387da 100644
--- a/Docs/Schemas/LayerConfigJson.schema.json
+++ b/Docs/Schemas/LayerConfigJson.schema.json
@@ -683,7 +683,7 @@
"type": "object",
"properties": {
"icon": {
- "description": "question: What icon should be used?\n\nTo reuse icons from a different layer of a library:\n- The library layer has, within tagRenderings one which will output the URL of the image (e.g. mappings: {\"if\": \"shop=xyz\", then: \"./assets/icons/shop_xyz.png\"})\n- Use \"layer_id.tagrendering_id\"\n\nNote that if you reuse icons from a different icon set, you'll probably want to use `override` to set a default rendering\n\n\ntypes: Use a different icon depending on the value of some attributes ; icon\nsuggestions: return [ \"nsi_brand.icon\", \"nsi_operator.icon\", \"id_presets.shop_rendering\", ...Constants.defaultPinIcons.map(i => ({if: \"value=\"+i, then: i, icon: i}))]",
+ "description": "question: What icon should be used?\n\nTo reuse icons from a different layer of a library:\n- The library layer has, within tagRenderings one which will output the URL of the image (e.g. mappings: {\"if\": \"shop=xyz\", then: \"./assets/icons/shop_xyz.png\"})\n- Use \"layer_id.tagrendering_id\"\n\nNote that if you reuse icons from a different icon set, you'll probably want to use `override` to set a default rendering\n\n\ntypes: Use a different icon depending on the value of some attributes ; icon\nsuggestions: return [ {\"if\":\"value=nsi_brand.icon\", \"then\": \"Use icons for brand from the Name Suggestion Index\"}, {\"if\":\"value=nsi_operator.icon\", \"then\": \"Use icons for operator from the Name Suggestion Index\"}, {\"if\":\"value=id_presets.shop_rendering\", \"then\": \"Use shop preset icons from iD\"}, ...Constants.defaultPinIcons.map(i => ({if: \"value=\"+i, then: i, icon: i}))]",
"anyOf": [
{
"$ref": "#/definitions/MinimalTagRenderingConfigJson"
@@ -707,7 +707,7 @@
]
},
"color": {
- "description": "question: What colour should the icon be?\nThis will only work for the default icons such as `pin`,`circle`,...\ntypes: Use a different color depending on the value of some attributes ; color",
+ "description": "question: What colour should the icon be?\n\nThis will only work for the default icons such as `pin`,`circle`,...\n\ntypes: Use a different color depending on the value of some attributes ; color",
"anyOf": [
{
"$ref": "#/definitions/MinimalTagRenderingConfigJson"
@@ -1072,30 +1072,37 @@
}
},
"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\ngroup: hidden",
+ "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\nAlternatively, this can reuse a _tagRendering_ from another layer, e.g. one of the 'icons'-tagrenderings.\nSee ExpandIconBadges on how this is handled\ngroup: hidden",
"type": "array",
"items": {
- "type": "object",
- "properties": {
- "if": {
- "$ref": "#/definitions/TagConfigJson",
- "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation\n\ntype: tag"
- },
- "then": {
- "description": "Badge to show\nType: icon",
- "anyOf": [
- {
- "$ref": "#/definitions/MinimalTagRenderingConfigJson"
+ "anyOf": [
+ {
+ "type": "object",
+ "properties": {
+ "if": {
+ "$ref": "#/definitions/TagConfigJson",
+ "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation\n\ntype: tag"
},
- {
- "type": "string"
+ "then": {
+ "description": "Badge to show\nType: icon",
+ "anyOf": [
+ {
+ "$ref": "#/definitions/MinimalTagRenderingConfigJson"
+ },
+ {
+ "type": "string"
+ }
+ ]
}
+ },
+ "required": [
+ "if",
+ "then"
]
+ },
+ {
+ "type": "string"
}
- },
- "required": [
- "if",
- "then"
]
}
},
diff --git a/Docs/Schemas/LayerConfigJsonJSC.ts b/Docs/Schemas/LayerConfigJsonJSC.ts
index ac04a5891d..40306fbb9d 100644
--- a/Docs/Schemas/LayerConfigJsonJSC.ts
+++ b/Docs/Schemas/LayerConfigJsonJSC.ts
@@ -675,7 +675,7 @@ export default {
"type": "object",
"properties": {
"icon": {
- "description": "question: What icon should be used?\n\nTo reuse icons from a different layer of a library:\n- The library layer has, within tagRenderings one which will output the URL of the image (e.g. mappings: {\"if\": \"shop=xyz\", then: \"./assets/icons/shop_xyz.png\"})\n- Use \"layer_id.tagrendering_id\"\n\nNote that if you reuse icons from a different icon set, you'll probably want to use `override` to set a default rendering\n\n\ntypes: Use a different icon depending on the value of some attributes ; icon\nsuggestions: return [ \"nsi_brand.icon\", \"nsi_operator.icon\", \"id_presets.shop_rendering\", ...Constants.defaultPinIcons.map(i => ({if: \"value=\"+i, then: i, icon: i}))]",
+ "description": "question: What icon should be used?\n\nTo reuse icons from a different layer of a library:\n- The library layer has, within tagRenderings one which will output the URL of the image (e.g. mappings: {\"if\": \"shop=xyz\", then: \"./assets/icons/shop_xyz.png\"})\n- Use \"layer_id.tagrendering_id\"\n\nNote that if you reuse icons from a different icon set, you'll probably want to use `override` to set a default rendering\n\n\ntypes: Use a different icon depending on the value of some attributes ; icon\nsuggestions: return [ {\"if\":\"value=nsi_brand.icon\", \"then\": \"Use icons for brand from the Name Suggestion Index\"}, {\"if\":\"value=nsi_operator.icon\", \"then\": \"Use icons for operator from the Name Suggestion Index\"}, {\"if\":\"value=id_presets.shop_rendering\", \"then\": \"Use shop preset icons from iD\"}, ...Constants.defaultPinIcons.map(i => ({if: \"value=\"+i, then: i, icon: i}))]",
"anyOf": [
{
"$ref": "#/definitions/MinimalTagRenderingConfigJson"
@@ -699,7 +699,7 @@ export default {
]
},
"color": {
- "description": "question: What colour should the icon be?\nThis will only work for the default icons such as `pin`,`circle`,...\ntypes: Use a different color depending on the value of some attributes ; color",
+ "description": "question: What colour should the icon be?\n\nThis will only work for the default icons such as `pin`,`circle`,...\n\ntypes: Use a different color depending on the value of some attributes ; color",
"anyOf": [
{
"$ref": "#/definitions/MinimalTagRenderingConfigJson"
@@ -1060,30 +1060,37 @@ export default {
}
},
"iconBadges": {
- "description": "A list of extra badges to show next to the icon as small badge\nThey will be added as a 25% height icon at the bottom right of the icon, with all the badges in a flex layout.\n\nNote: strings are interpreted as icons, so layering and substituting is supported. You can use `circle:white;./my_icon.svg` to add a background circle\ngroup: hidden",
+ "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\nAlternatively, this can reuse a _tagRendering_ from another layer, e.g. one of the 'icons'-tagrenderings.\nSee ExpandIconBadges on how this is handled\ngroup: hidden",
"type": "array",
"items": {
- "type": "object",
- "properties": {
- "if": {
- "$ref": "#/definitions/TagConfigJson",
- "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation\n\ntype: tag"
- },
- "then": {
- "description": "Badge to show\nType: icon",
- "anyOf": [
- {
- "$ref": "#/definitions/MinimalTagRenderingConfigJson"
+ "anyOf": [
+ {
+ "type": "object",
+ "properties": {
+ "if": {
+ "$ref": "#/definitions/TagConfigJson",
+ "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation\n\ntype: tag"
},
- {
- "type": "string"
+ "then": {
+ "description": "Badge to show\nType: icon",
+ "anyOf": [
+ {
+ "$ref": "#/definitions/MinimalTagRenderingConfigJson"
+ },
+ {
+ "type": "string"
+ }
+ ]
}
+ },
+ "required": [
+ "if",
+ "then"
]
+ },
+ {
+ "type": "string"
}
- },
- "required": [
- "if",
- "then"
]
}
},
diff --git a/Docs/Schemas/LineRenderingConfigJson.schema.json b/Docs/Schemas/LineRenderingConfigJson.schema.json
index 309d5da239..0de5738bc9 100644
--- a/Docs/Schemas/LineRenderingConfigJson.schema.json
+++ b/Docs/Schemas/LineRenderingConfigJson.schema.json
@@ -327,7 +327,7 @@
"type": "object",
"properties": {
"icon": {
- "description": "question: What icon should be used?\n\nTo reuse icons from a different layer of a library:\n- The library layer has, within tagRenderings one which will output the URL of the image (e.g. mappings: {\"if\": \"shop=xyz\", then: \"./assets/icons/shop_xyz.png\"})\n- Use \"layer_id.tagrendering_id\"\n\nNote that if you reuse icons from a different icon set, you'll probably want to use `override` to set a default rendering\n\n\ntypes: Use a different icon depending on the value of some attributes ; icon\nsuggestions: return [ \"nsi_brand.icon\", \"nsi_operator.icon\", \"id_presets.shop_rendering\", ...Constants.defaultPinIcons.map(i => ({if: \"value=\"+i, then: i, icon: i}))]",
+ "description": "question: What icon should be used?\n\nTo reuse icons from a different layer of a library:\n- The library layer has, within tagRenderings one which will output the URL of the image (e.g. mappings: {\"if\": \"shop=xyz\", then: \"./assets/icons/shop_xyz.png\"})\n- Use \"layer_id.tagrendering_id\"\n\nNote that if you reuse icons from a different icon set, you'll probably want to use `override` to set a default rendering\n\n\ntypes: Use a different icon depending on the value of some attributes ; icon\nsuggestions: return [ {\"if\":\"value=nsi_brand.icon\", \"then\": \"Use icons for brand from the Name Suggestion Index\"}, {\"if\":\"value=nsi_operator.icon\", \"then\": \"Use icons for operator from the Name Suggestion Index\"}, {\"if\":\"value=id_presets.shop_rendering\", \"then\": \"Use shop preset icons from iD\"}, ...Constants.defaultPinIcons.map(i => ({if: \"value=\"+i, then: i, icon: i}))]",
"anyOf": [
{
"$ref": "#/definitions/MinimalTagRenderingConfigJson"
@@ -351,7 +351,7 @@
]
},
"color": {
- "description": "question: What colour should the icon be?\nThis will only work for the default icons such as `pin`,`circle`,...\ntypes: Use a different color depending on the value of some attributes ; color",
+ "description": "question: What colour should the icon be?\n\nThis will only work for the default icons such as `pin`,`circle`,...\n\ntypes: Use a different color depending on the value of some attributes ; color",
"anyOf": [
{
"$ref": "#/definitions/MinimalTagRenderingConfigJson"
diff --git a/Docs/Schemas/LineRenderingConfigJsonJSC.ts b/Docs/Schemas/LineRenderingConfigJsonJSC.ts
index 65a2ed2a1e..2344646b65 100644
--- a/Docs/Schemas/LineRenderingConfigJsonJSC.ts
+++ b/Docs/Schemas/LineRenderingConfigJsonJSC.ts
@@ -319,7 +319,7 @@ export default {
"type": "object",
"properties": {
"icon": {
- "description": "question: What icon should be used?\n\nTo reuse icons from a different layer of a library:\n- The library layer has, within tagRenderings one which will output the URL of the image (e.g. mappings: {\"if\": \"shop=xyz\", then: \"./assets/icons/shop_xyz.png\"})\n- Use \"layer_id.tagrendering_id\"\n\nNote that if you reuse icons from a different icon set, you'll probably want to use `override` to set a default rendering\n\n\ntypes: Use a different icon depending on the value of some attributes ; icon\nsuggestions: return [ \"nsi_brand.icon\", \"nsi_operator.icon\", \"id_presets.shop_rendering\", ...Constants.defaultPinIcons.map(i => ({if: \"value=\"+i, then: i, icon: i}))]",
+ "description": "question: What icon should be used?\n\nTo reuse icons from a different layer of a library:\n- The library layer has, within tagRenderings one which will output the URL of the image (e.g. mappings: {\"if\": \"shop=xyz\", then: \"./assets/icons/shop_xyz.png\"})\n- Use \"layer_id.tagrendering_id\"\n\nNote that if you reuse icons from a different icon set, you'll probably want to use `override` to set a default rendering\n\n\ntypes: Use a different icon depending on the value of some attributes ; icon\nsuggestions: return [ {\"if\":\"value=nsi_brand.icon\", \"then\": \"Use icons for brand from the Name Suggestion Index\"}, {\"if\":\"value=nsi_operator.icon\", \"then\": \"Use icons for operator from the Name Suggestion Index\"}, {\"if\":\"value=id_presets.shop_rendering\", \"then\": \"Use shop preset icons from iD\"}, ...Constants.defaultPinIcons.map(i => ({if: \"value=\"+i, then: i, icon: i}))]",
"anyOf": [
{
"$ref": "#/definitions/MinimalTagRenderingConfigJson"
@@ -343,7 +343,7 @@ export default {
]
},
"color": {
- "description": "question: What colour should the icon be?\nThis will only work for the default icons such as `pin`,`circle`,...\ntypes: Use a different color depending on the value of some attributes ; color",
+ "description": "question: What colour should the icon be?\n\nThis will only work for the default icons such as `pin`,`circle`,...\n\ntypes: Use a different color depending on the value of some attributes ; color",
"anyOf": [
{
"$ref": "#/definitions/MinimalTagRenderingConfigJson"
diff --git a/Docs/Schemas/MappingConfigJson.schema.json b/Docs/Schemas/MappingConfigJson.schema.json
index e9947702b6..d469db4153 100644
--- a/Docs/Schemas/MappingConfigJson.schema.json
+++ b/Docs/Schemas/MappingConfigJson.schema.json
@@ -354,7 +354,7 @@
"type": "object",
"properties": {
"icon": {
- "description": "question: What icon should be used?\n\nTo reuse icons from a different layer of a library:\n- The library layer has, within tagRenderings one which will output the URL of the image (e.g. mappings: {\"if\": \"shop=xyz\", then: \"./assets/icons/shop_xyz.png\"})\n- Use \"layer_id.tagrendering_id\"\n\nNote that if you reuse icons from a different icon set, you'll probably want to use `override` to set a default rendering\n\n\ntypes: Use a different icon depending on the value of some attributes ; icon\nsuggestions: return [ \"nsi_brand.icon\", \"nsi_operator.icon\", \"id_presets.shop_rendering\", ...Constants.defaultPinIcons.map(i => ({if: \"value=\"+i, then: i, icon: i}))]",
+ "description": "question: What icon should be used?\n\nTo reuse icons from a different layer of a library:\n- The library layer has, within tagRenderings one which will output the URL of the image (e.g. mappings: {\"if\": \"shop=xyz\", then: \"./assets/icons/shop_xyz.png\"})\n- Use \"layer_id.tagrendering_id\"\n\nNote that if you reuse icons from a different icon set, you'll probably want to use `override` to set a default rendering\n\n\ntypes: Use a different icon depending on the value of some attributes ; icon\nsuggestions: return [ {\"if\":\"value=nsi_brand.icon\", \"then\": \"Use icons for brand from the Name Suggestion Index\"}, {\"if\":\"value=nsi_operator.icon\", \"then\": \"Use icons for operator from the Name Suggestion Index\"}, {\"if\":\"value=id_presets.shop_rendering\", \"then\": \"Use shop preset icons from iD\"}, ...Constants.defaultPinIcons.map(i => ({if: \"value=\"+i, then: i, icon: i}))]",
"anyOf": [
{
"$ref": "#/definitions/MinimalTagRenderingConfigJson"
@@ -378,7 +378,7 @@
]
},
"color": {
- "description": "question: What colour should the icon be?\nThis will only work for the default icons such as `pin`,`circle`,...\ntypes: Use a different color depending on the value of some attributes ; color",
+ "description": "question: What colour should the icon be?\n\nThis will only work for the default icons such as `pin`,`circle`,...\n\ntypes: Use a different color depending on the value of some attributes ; color",
"anyOf": [
{
"$ref": "#/definitions/MinimalTagRenderingConfigJson"
diff --git a/Docs/Schemas/MappingConfigJsonJSC.ts b/Docs/Schemas/MappingConfigJsonJSC.ts
index 8ef62eac1a..7ab7197461 100644
--- a/Docs/Schemas/MappingConfigJsonJSC.ts
+++ b/Docs/Schemas/MappingConfigJsonJSC.ts
@@ -346,7 +346,7 @@ export default {
"type": "object",
"properties": {
"icon": {
- "description": "question: What icon should be used?\n\nTo reuse icons from a different layer of a library:\n- The library layer has, within tagRenderings one which will output the URL of the image (e.g. mappings: {\"if\": \"shop=xyz\", then: \"./assets/icons/shop_xyz.png\"})\n- Use \"layer_id.tagrendering_id\"\n\nNote that if you reuse icons from a different icon set, you'll probably want to use `override` to set a default rendering\n\n\ntypes: Use a different icon depending on the value of some attributes ; icon\nsuggestions: return [ \"nsi_brand.icon\", \"nsi_operator.icon\", \"id_presets.shop_rendering\", ...Constants.defaultPinIcons.map(i => ({if: \"value=\"+i, then: i, icon: i}))]",
+ "description": "question: What icon should be used?\n\nTo reuse icons from a different layer of a library:\n- The library layer has, within tagRenderings one which will output the URL of the image (e.g. mappings: {\"if\": \"shop=xyz\", then: \"./assets/icons/shop_xyz.png\"})\n- Use \"layer_id.tagrendering_id\"\n\nNote that if you reuse icons from a different icon set, you'll probably want to use `override` to set a default rendering\n\n\ntypes: Use a different icon depending on the value of some attributes ; icon\nsuggestions: return [ {\"if\":\"value=nsi_brand.icon\", \"then\": \"Use icons for brand from the Name Suggestion Index\"}, {\"if\":\"value=nsi_operator.icon\", \"then\": \"Use icons for operator from the Name Suggestion Index\"}, {\"if\":\"value=id_presets.shop_rendering\", \"then\": \"Use shop preset icons from iD\"}, ...Constants.defaultPinIcons.map(i => ({if: \"value=\"+i, then: i, icon: i}))]",
"anyOf": [
{
"$ref": "#/definitions/MinimalTagRenderingConfigJson"
@@ -370,7 +370,7 @@ export default {
]
},
"color": {
- "description": "question: What colour should the icon be?\nThis will only work for the default icons such as `pin`,`circle`,...\ntypes: Use a different color depending on the value of some attributes ; color",
+ "description": "question: What colour should the icon be?\n\nThis will only work for the default icons such as `pin`,`circle`,...\n\ntypes: Use a different color depending on the value of some attributes ; color",
"anyOf": [
{
"$ref": "#/definitions/MinimalTagRenderingConfigJson"
diff --git a/Docs/Schemas/PointRenderingConfigJson.schema.json b/Docs/Schemas/PointRenderingConfigJson.schema.json
index d112952749..2d3ebd7997 100644
--- a/Docs/Schemas/PointRenderingConfigJson.schema.json
+++ b/Docs/Schemas/PointRenderingConfigJson.schema.json
@@ -17,30 +17,37 @@
}
},
"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\ngroup: hidden",
+ "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\nAlternatively, this can reuse a _tagRendering_ from another layer, e.g. one of the 'icons'-tagrenderings.\nSee ExpandIconBadges on how this is handled\ngroup: hidden",
"type": "array",
"items": {
- "type": "object",
- "properties": {
- "if": {
- "$ref": "#/definitions/TagConfigJson",
- "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation\n\ntype: tag"
- },
- "then": {
- "description": "Badge to show\nType: icon",
- "anyOf": [
- {
- "$ref": "#/definitions/MinimalTagRenderingConfigJson"
+ "anyOf": [
+ {
+ "type": "object",
+ "properties": {
+ "if": {
+ "$ref": "#/definitions/TagConfigJson",
+ "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation\n\ntype: tag"
},
- {
- "type": "string"
+ "then": {
+ "description": "Badge to show\nType: icon",
+ "anyOf": [
+ {
+ "$ref": "#/definitions/MinimalTagRenderingConfigJson"
+ },
+ {
+ "type": "string"
+ }
+ ]
}
+ },
+ "required": [
+ "if",
+ "then"
]
+ },
+ {
+ "type": "string"
}
- },
- "required": [
- "if",
- "then"
]
}
},
@@ -401,7 +408,7 @@
"type": "object",
"properties": {
"icon": {
- "description": "question: What icon should be used?\n\nTo reuse icons from a different layer of a library:\n- The library layer has, within tagRenderings one which will output the URL of the image (e.g. mappings: {\"if\": \"shop=xyz\", then: \"./assets/icons/shop_xyz.png\"})\n- Use \"layer_id.tagrendering_id\"\n\nNote that if you reuse icons from a different icon set, you'll probably want to use `override` to set a default rendering\n\n\ntypes: Use a different icon depending on the value of some attributes ; icon\nsuggestions: return [ \"nsi_brand.icon\", \"nsi_operator.icon\", \"id_presets.shop_rendering\", ...Constants.defaultPinIcons.map(i => ({if: \"value=\"+i, then: i, icon: i}))]",
+ "description": "question: What icon should be used?\n\nTo reuse icons from a different layer of a library:\n- The library layer has, within tagRenderings one which will output the URL of the image (e.g. mappings: {\"if\": \"shop=xyz\", then: \"./assets/icons/shop_xyz.png\"})\n- Use \"layer_id.tagrendering_id\"\n\nNote that if you reuse icons from a different icon set, you'll probably want to use `override` to set a default rendering\n\n\ntypes: Use a different icon depending on the value of some attributes ; icon\nsuggestions: return [ {\"if\":\"value=nsi_brand.icon\", \"then\": \"Use icons for brand from the Name Suggestion Index\"}, {\"if\":\"value=nsi_operator.icon\", \"then\": \"Use icons for operator from the Name Suggestion Index\"}, {\"if\":\"value=id_presets.shop_rendering\", \"then\": \"Use shop preset icons from iD\"}, ...Constants.defaultPinIcons.map(i => ({if: \"value=\"+i, then: i, icon: i}))]",
"anyOf": [
{
"$ref": "#/definitions/MinimalTagRenderingConfigJson"
@@ -425,7 +432,7 @@
]
},
"color": {
- "description": "question: What colour should the icon be?\nThis will only work for the default icons such as `pin`,`circle`,...\ntypes: Use a different color depending on the value of some attributes ; color",
+ "description": "question: What colour should the icon be?\n\nThis will only work for the default icons such as `pin`,`circle`,...\n\ntypes: Use a different color depending on the value of some attributes ; color",
"anyOf": [
{
"$ref": "#/definitions/MinimalTagRenderingConfigJson"
diff --git a/Docs/Schemas/PointRenderingConfigJsonJSC.ts b/Docs/Schemas/PointRenderingConfigJsonJSC.ts
index 184704299b..91d459054d 100644
--- a/Docs/Schemas/PointRenderingConfigJsonJSC.ts
+++ b/Docs/Schemas/PointRenderingConfigJsonJSC.ts
@@ -17,30 +17,37 @@ export default {
}
},
"iconBadges": {
- "description": "A list of extra badges to show next to the icon as small badge\nThey will be added as a 25% height icon at the bottom right of the icon, with all the badges in a flex layout.\n\nNote: strings are interpreted as icons, so layering and substituting is supported. You can use `circle:white;./my_icon.svg` to add a background circle\ngroup: hidden",
+ "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\nAlternatively, this can reuse a _tagRendering_ from another layer, e.g. one of the 'icons'-tagrenderings.\nSee ExpandIconBadges on how this is handled\ngroup: hidden",
"type": "array",
"items": {
- "type": "object",
- "properties": {
- "if": {
- "$ref": "#/definitions/TagConfigJson",
- "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation\n\ntype: tag"
- },
- "then": {
- "description": "Badge to show\nType: icon",
- "anyOf": [
- {
- "$ref": "#/definitions/MinimalTagRenderingConfigJson"
+ "anyOf": [
+ {
+ "type": "object",
+ "properties": {
+ "if": {
+ "$ref": "#/definitions/TagConfigJson",
+ "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation\n\ntype: tag"
},
- {
- "type": "string"
+ "then": {
+ "description": "Badge to show\nType: icon",
+ "anyOf": [
+ {
+ "$ref": "#/definitions/MinimalTagRenderingConfigJson"
+ },
+ {
+ "type": "string"
+ }
+ ]
}
+ },
+ "required": [
+ "if",
+ "then"
]
+ },
+ {
+ "type": "string"
}
- },
- "required": [
- "if",
- "then"
]
}
},
@@ -393,7 +400,7 @@ export default {
"type": "object",
"properties": {
"icon": {
- "description": "question: What icon should be used?\n\nTo reuse icons from a different layer of a library:\n- The library layer has, within tagRenderings one which will output the URL of the image (e.g. mappings: {\"if\": \"shop=xyz\", then: \"./assets/icons/shop_xyz.png\"})\n- Use \"layer_id.tagrendering_id\"\n\nNote that if you reuse icons from a different icon set, you'll probably want to use `override` to set a default rendering\n\n\ntypes: Use a different icon depending on the value of some attributes ; icon\nsuggestions: return [ \"nsi_brand.icon\", \"nsi_operator.icon\", \"id_presets.shop_rendering\", ...Constants.defaultPinIcons.map(i => ({if: \"value=\"+i, then: i, icon: i}))]",
+ "description": "question: What icon should be used?\n\nTo reuse icons from a different layer of a library:\n- The library layer has, within tagRenderings one which will output the URL of the image (e.g. mappings: {\"if\": \"shop=xyz\", then: \"./assets/icons/shop_xyz.png\"})\n- Use \"layer_id.tagrendering_id\"\n\nNote that if you reuse icons from a different icon set, you'll probably want to use `override` to set a default rendering\n\n\ntypes: Use a different icon depending on the value of some attributes ; icon\nsuggestions: return [ {\"if\":\"value=nsi_brand.icon\", \"then\": \"Use icons for brand from the Name Suggestion Index\"}, {\"if\":\"value=nsi_operator.icon\", \"then\": \"Use icons for operator from the Name Suggestion Index\"}, {\"if\":\"value=id_presets.shop_rendering\", \"then\": \"Use shop preset icons from iD\"}, ...Constants.defaultPinIcons.map(i => ({if: \"value=\"+i, then: i, icon: i}))]",
"anyOf": [
{
"$ref": "#/definitions/MinimalTagRenderingConfigJson"
@@ -417,7 +424,7 @@ export default {
]
},
"color": {
- "description": "question: What colour should the icon be?\nThis will only work for the default icons such as `pin`,`circle`,...\ntypes: Use a different color depending on the value of some attributes ; color",
+ "description": "question: What colour should the icon be?\n\nThis will only work for the default icons such as `pin`,`circle`,...\n\ntypes: Use a different color depending on the value of some attributes ; color",
"anyOf": [
{
"$ref": "#/definitions/MinimalTagRenderingConfigJson"
diff --git a/Docs/Schemas/QuestionableTagRenderingConfigJson.schema.json b/Docs/Schemas/QuestionableTagRenderingConfigJson.schema.json
index 8dab5d9387..0e7e8feed8 100644
--- a/Docs/Schemas/QuestionableTagRenderingConfigJson.schema.json
+++ b/Docs/Schemas/QuestionableTagRenderingConfigJson.schema.json
@@ -487,7 +487,7 @@
"type": "object",
"properties": {
"icon": {
- "description": "question: What icon should be used?\n\nTo reuse icons from a different layer of a library:\n- The library layer has, within tagRenderings one which will output the URL of the image (e.g. mappings: {\"if\": \"shop=xyz\", then: \"./assets/icons/shop_xyz.png\"})\n- Use \"layer_id.tagrendering_id\"\n\nNote that if you reuse icons from a different icon set, you'll probably want to use `override` to set a default rendering\n\n\ntypes: Use a different icon depending on the value of some attributes ; icon\nsuggestions: return [ \"nsi_brand.icon\", \"nsi_operator.icon\", \"id_presets.shop_rendering\", ...Constants.defaultPinIcons.map(i => ({if: \"value=\"+i, then: i, icon: i}))]",
+ "description": "question: What icon should be used?\n\nTo reuse icons from a different layer of a library:\n- The library layer has, within tagRenderings one which will output the URL of the image (e.g. mappings: {\"if\": \"shop=xyz\", then: \"./assets/icons/shop_xyz.png\"})\n- Use \"layer_id.tagrendering_id\"\n\nNote that if you reuse icons from a different icon set, you'll probably want to use `override` to set a default rendering\n\n\ntypes: Use a different icon depending on the value of some attributes ; icon\nsuggestions: return [ {\"if\":\"value=nsi_brand.icon\", \"then\": \"Use icons for brand from the Name Suggestion Index\"}, {\"if\":\"value=nsi_operator.icon\", \"then\": \"Use icons for operator from the Name Suggestion Index\"}, {\"if\":\"value=id_presets.shop_rendering\", \"then\": \"Use shop preset icons from iD\"}, ...Constants.defaultPinIcons.map(i => ({if: \"value=\"+i, then: i, icon: i}))]",
"anyOf": [
{
"$ref": "#/definitions/MinimalTagRenderingConfigJson"
@@ -511,7 +511,7 @@
]
},
"color": {
- "description": "question: What colour should the icon be?\nThis will only work for the default icons such as `pin`,`circle`,...\ntypes: Use a different color depending on the value of some attributes ; color",
+ "description": "question: What colour should the icon be?\n\nThis will only work for the default icons such as `pin`,`circle`,...\n\ntypes: Use a different color depending on the value of some attributes ; color",
"anyOf": [
{
"$ref": "#/definitions/MinimalTagRenderingConfigJson"
diff --git a/Docs/Schemas/QuestionableTagRenderingConfigJsonJSC.ts b/Docs/Schemas/QuestionableTagRenderingConfigJsonJSC.ts
index 649892ff4d..7088ed0529 100644
--- a/Docs/Schemas/QuestionableTagRenderingConfigJsonJSC.ts
+++ b/Docs/Schemas/QuestionableTagRenderingConfigJsonJSC.ts
@@ -479,7 +479,7 @@ export default {
"type": "object",
"properties": {
"icon": {
- "description": "question: What icon should be used?\n\nTo reuse icons from a different layer of a library:\n- The library layer has, within tagRenderings one which will output the URL of the image (e.g. mappings: {\"if\": \"shop=xyz\", then: \"./assets/icons/shop_xyz.png\"})\n- Use \"layer_id.tagrendering_id\"\n\nNote that if you reuse icons from a different icon set, you'll probably want to use `override` to set a default rendering\n\n\ntypes: Use a different icon depending on the value of some attributes ; icon\nsuggestions: return [ \"nsi_brand.icon\", \"nsi_operator.icon\", \"id_presets.shop_rendering\", ...Constants.defaultPinIcons.map(i => ({if: \"value=\"+i, then: i, icon: i}))]",
+ "description": "question: What icon should be used?\n\nTo reuse icons from a different layer of a library:\n- The library layer has, within tagRenderings one which will output the URL of the image (e.g. mappings: {\"if\": \"shop=xyz\", then: \"./assets/icons/shop_xyz.png\"})\n- Use \"layer_id.tagrendering_id\"\n\nNote that if you reuse icons from a different icon set, you'll probably want to use `override` to set a default rendering\n\n\ntypes: Use a different icon depending on the value of some attributes ; icon\nsuggestions: return [ {\"if\":\"value=nsi_brand.icon\", \"then\": \"Use icons for brand from the Name Suggestion Index\"}, {\"if\":\"value=nsi_operator.icon\", \"then\": \"Use icons for operator from the Name Suggestion Index\"}, {\"if\":\"value=id_presets.shop_rendering\", \"then\": \"Use shop preset icons from iD\"}, ...Constants.defaultPinIcons.map(i => ({if: \"value=\"+i, then: i, icon: i}))]",
"anyOf": [
{
"$ref": "#/definitions/MinimalTagRenderingConfigJson"
@@ -503,7 +503,7 @@ export default {
]
},
"color": {
- "description": "question: What colour should the icon be?\nThis will only work for the default icons such as `pin`,`circle`,...\ntypes: Use a different color depending on the value of some attributes ; color",
+ "description": "question: What colour should the icon be?\n\nThis will only work for the default icons such as `pin`,`circle`,...\n\ntypes: Use a different color depending on the value of some attributes ; color",
"anyOf": [
{
"$ref": "#/definitions/MinimalTagRenderingConfigJson"
diff --git a/Docs/Schemas/RewritableConfigJson.schema.json b/Docs/Schemas/RewritableConfigJson.schema.json
index 8a7d26ffc7..89ce7df862 100644
--- a/Docs/Schemas/RewritableConfigJson.schema.json
+++ b/Docs/Schemas/RewritableConfigJson.schema.json
@@ -281,7 +281,7 @@
"type": "object",
"properties": {
"icon": {
- "description": "question: What icon should be used?\n\nTo reuse icons from a different layer of a library:\n- The library layer has, within tagRenderings one which will output the URL of the image (e.g. mappings: {\"if\": \"shop=xyz\", then: \"./assets/icons/shop_xyz.png\"})\n- Use \"layer_id.tagrendering_id\"\n\nNote that if you reuse icons from a different icon set, you'll probably want to use `override` to set a default rendering\n\n\ntypes: Use a different icon depending on the value of some attributes ; icon\nsuggestions: return [ \"nsi_brand.icon\", \"nsi_operator.icon\", \"id_presets.shop_rendering\", ...Constants.defaultPinIcons.map(i => ({if: \"value=\"+i, then: i, icon: i}))]",
+ "description": "question: What icon should be used?\n\nTo reuse icons from a different layer of a library:\n- The library layer has, within tagRenderings one which will output the URL of the image (e.g. mappings: {\"if\": \"shop=xyz\", then: \"./assets/icons/shop_xyz.png\"})\n- Use \"layer_id.tagrendering_id\"\n\nNote that if you reuse icons from a different icon set, you'll probably want to use `override` to set a default rendering\n\n\ntypes: Use a different icon depending on the value of some attributes ; icon\nsuggestions: return [ {\"if\":\"value=nsi_brand.icon\", \"then\": \"Use icons for brand from the Name Suggestion Index\"}, {\"if\":\"value=nsi_operator.icon\", \"then\": \"Use icons for operator from the Name Suggestion Index\"}, {\"if\":\"value=id_presets.shop_rendering\", \"then\": \"Use shop preset icons from iD\"}, ...Constants.defaultPinIcons.map(i => ({if: \"value=\"+i, then: i, icon: i}))]",
"anyOf": [
{
"$ref": "#/definitions/MinimalTagRenderingConfigJson"
@@ -305,7 +305,7 @@
]
},
"color": {
- "description": "question: What colour should the icon be?\nThis will only work for the default icons such as `pin`,`circle`,...\ntypes: Use a different color depending on the value of some attributes ; color",
+ "description": "question: What colour should the icon be?\n\nThis will only work for the default icons such as `pin`,`circle`,...\n\ntypes: Use a different color depending on the value of some attributes ; color",
"anyOf": [
{
"$ref": "#/definitions/MinimalTagRenderingConfigJson"
diff --git a/Docs/Schemas/RewritableConfigJsonJSC.ts b/Docs/Schemas/RewritableConfigJsonJSC.ts
index a39d314c6b..7815c75a7c 100644
--- a/Docs/Schemas/RewritableConfigJsonJSC.ts
+++ b/Docs/Schemas/RewritableConfigJsonJSC.ts
@@ -273,7 +273,7 @@ export default {
"type": "object",
"properties": {
"icon": {
- "description": "question: What icon should be used?\n\nTo reuse icons from a different layer of a library:\n- The library layer has, within tagRenderings one which will output the URL of the image (e.g. mappings: {\"if\": \"shop=xyz\", then: \"./assets/icons/shop_xyz.png\"})\n- Use \"layer_id.tagrendering_id\"\n\nNote that if you reuse icons from a different icon set, you'll probably want to use `override` to set a default rendering\n\n\ntypes: Use a different icon depending on the value of some attributes ; icon\nsuggestions: return [ \"nsi_brand.icon\", \"nsi_operator.icon\", \"id_presets.shop_rendering\", ...Constants.defaultPinIcons.map(i => ({if: \"value=\"+i, then: i, icon: i}))]",
+ "description": "question: What icon should be used?\n\nTo reuse icons from a different layer of a library:\n- The library layer has, within tagRenderings one which will output the URL of the image (e.g. mappings: {\"if\": \"shop=xyz\", then: \"./assets/icons/shop_xyz.png\"})\n- Use \"layer_id.tagrendering_id\"\n\nNote that if you reuse icons from a different icon set, you'll probably want to use `override` to set a default rendering\n\n\ntypes: Use a different icon depending on the value of some attributes ; icon\nsuggestions: return [ {\"if\":\"value=nsi_brand.icon\", \"then\": \"Use icons for brand from the Name Suggestion Index\"}, {\"if\":\"value=nsi_operator.icon\", \"then\": \"Use icons for operator from the Name Suggestion Index\"}, {\"if\":\"value=id_presets.shop_rendering\", \"then\": \"Use shop preset icons from iD\"}, ...Constants.defaultPinIcons.map(i => ({if: \"value=\"+i, then: i, icon: i}))]",
"anyOf": [
{
"$ref": "#/definitions/MinimalTagRenderingConfigJson"
@@ -297,7 +297,7 @@ export default {
]
},
"color": {
- "description": "question: What colour should the icon be?\nThis will only work for the default icons such as `pin`,`circle`,...\ntypes: Use a different color depending on the value of some attributes ; color",
+ "description": "question: What colour should the icon be?\n\nThis will only work for the default icons such as `pin`,`circle`,...\n\ntypes: Use a different color depending on the value of some attributes ; color",
"anyOf": [
{
"$ref": "#/definitions/MinimalTagRenderingConfigJson"
diff --git a/Docs/Schemas/ThemeConfigJson.schema.json b/Docs/Schemas/ThemeConfigJson.schema.json
index eb850a9f09..720b6cc712 100644
--- a/Docs/Schemas/ThemeConfigJson.schema.json
+++ b/Docs/Schemas/ThemeConfigJson.schema.json
@@ -556,7 +556,7 @@
"type": "object",
"properties": {
"icon": {
- "description": "question: What icon should be used?\n\nTo reuse icons from a different layer of a library:\n- The library layer has, within tagRenderings one which will output the URL of the image (e.g. mappings: {\"if\": \"shop=xyz\", then: \"./assets/icons/shop_xyz.png\"})\n- Use \"layer_id.tagrendering_id\"\n\nNote that if you reuse icons from a different icon set, you'll probably want to use `override` to set a default rendering\n\n\ntypes: Use a different icon depending on the value of some attributes ; icon\nsuggestions: return [ \"nsi_brand.icon\", \"nsi_operator.icon\", \"id_presets.shop_rendering\", ...Constants.defaultPinIcons.map(i => ({if: \"value=\"+i, then: i, icon: i}))]",
+ "description": "question: What icon should be used?\n\nTo reuse icons from a different layer of a library:\n- The library layer has, within tagRenderings one which will output the URL of the image (e.g. mappings: {\"if\": \"shop=xyz\", then: \"./assets/icons/shop_xyz.png\"})\n- Use \"layer_id.tagrendering_id\"\n\nNote that if you reuse icons from a different icon set, you'll probably want to use `override` to set a default rendering\n\n\ntypes: Use a different icon depending on the value of some attributes ; icon\nsuggestions: return [ {\"if\":\"value=nsi_brand.icon\", \"then\": \"Use icons for brand from the Name Suggestion Index\"}, {\"if\":\"value=nsi_operator.icon\", \"then\": \"Use icons for operator from the Name Suggestion Index\"}, {\"if\":\"value=id_presets.shop_rendering\", \"then\": \"Use shop preset icons from iD\"}, ...Constants.defaultPinIcons.map(i => ({if: \"value=\"+i, then: i, icon: i}))]",
"anyOf": [
{
"$ref": "#/definitions/MinimalTagRenderingConfigJson"
@@ -580,7 +580,7 @@
]
},
"color": {
- "description": "question: What colour should the icon be?\nThis will only work for the default icons such as `pin`,`circle`,...\ntypes: Use a different color depending on the value of some attributes ; color",
+ "description": "question: What colour should the icon be?\n\nThis will only work for the default icons such as `pin`,`circle`,...\n\ntypes: Use a different color depending on the value of some attributes ; color",
"anyOf": [
{
"$ref": "#/definitions/MinimalTagRenderingConfigJson"
@@ -945,30 +945,37 @@
}
},
"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\ngroup: hidden",
+ "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\nAlternatively, this can reuse a _tagRendering_ from another layer, e.g. one of the 'icons'-tagrenderings.\nSee ExpandIconBadges on how this is handled\ngroup: hidden",
"type": "array",
"items": {
- "type": "object",
- "properties": {
- "if": {
- "$ref": "#/definitions/TagConfigJson",
- "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation\n\ntype: tag"
- },
- "then": {
- "description": "Badge to show\nType: icon",
- "anyOf": [
- {
- "$ref": "#/definitions/MinimalTagRenderingConfigJson"
+ "anyOf": [
+ {
+ "type": "object",
+ "properties": {
+ "if": {
+ "$ref": "#/definitions/TagConfigJson",
+ "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation\n\ntype: tag"
},
- {
- "type": "string"
+ "then": {
+ "description": "Badge to show\nType: icon",
+ "anyOf": [
+ {
+ "$ref": "#/definitions/MinimalTagRenderingConfigJson"
+ },
+ {
+ "type": "string"
+ }
+ ]
}
+ },
+ "required": [
+ "if",
+ "then"
]
+ },
+ {
+ "type": "string"
}
- },
- "required": [
- "if",
- "then"
]
}
},
diff --git a/Docs/Schemas/ThemeConfigJsonJSC.ts b/Docs/Schemas/ThemeConfigJsonJSC.ts
index a5e51b7e5e..4ebc0b6d21 100644
--- a/Docs/Schemas/ThemeConfigJsonJSC.ts
+++ b/Docs/Schemas/ThemeConfigJsonJSC.ts
@@ -548,7 +548,7 @@ export default {
"type": "object",
"properties": {
"icon": {
- "description": "question: What icon should be used?\n\nTo reuse icons from a different layer of a library:\n- The library layer has, within tagRenderings one which will output the URL of the image (e.g. mappings: {\"if\": \"shop=xyz\", then: \"./assets/icons/shop_xyz.png\"})\n- Use \"layer_id.tagrendering_id\"\n\nNote that if you reuse icons from a different icon set, you'll probably want to use `override` to set a default rendering\n\n\ntypes: Use a different icon depending on the value of some attributes ; icon\nsuggestions: return [ \"nsi_brand.icon\", \"nsi_operator.icon\", \"id_presets.shop_rendering\", ...Constants.defaultPinIcons.map(i => ({if: \"value=\"+i, then: i, icon: i}))]",
+ "description": "question: What icon should be used?\n\nTo reuse icons from a different layer of a library:\n- The library layer has, within tagRenderings one which will output the URL of the image (e.g. mappings: {\"if\": \"shop=xyz\", then: \"./assets/icons/shop_xyz.png\"})\n- Use \"layer_id.tagrendering_id\"\n\nNote that if you reuse icons from a different icon set, you'll probably want to use `override` to set a default rendering\n\n\ntypes: Use a different icon depending on the value of some attributes ; icon\nsuggestions: return [ {\"if\":\"value=nsi_brand.icon\", \"then\": \"Use icons for brand from the Name Suggestion Index\"}, {\"if\":\"value=nsi_operator.icon\", \"then\": \"Use icons for operator from the Name Suggestion Index\"}, {\"if\":\"value=id_presets.shop_rendering\", \"then\": \"Use shop preset icons from iD\"}, ...Constants.defaultPinIcons.map(i => ({if: \"value=\"+i, then: i, icon: i}))]",
"anyOf": [
{
"$ref": "#/definitions/MinimalTagRenderingConfigJson"
@@ -572,7 +572,7 @@ export default {
]
},
"color": {
- "description": "question: What colour should the icon be?\nThis will only work for the default icons such as `pin`,`circle`,...\ntypes: Use a different color depending on the value of some attributes ; color",
+ "description": "question: What colour should the icon be?\n\nThis will only work for the default icons such as `pin`,`circle`,...\n\ntypes: Use a different color depending on the value of some attributes ; color",
"anyOf": [
{
"$ref": "#/definitions/MinimalTagRenderingConfigJson"
@@ -933,30 +933,37 @@ export default {
}
},
"iconBadges": {
- "description": "A list of extra badges to show next to the icon as small badge\nThey will be added as a 25% height icon at the bottom right of the icon, with all the badges in a flex layout.\n\nNote: strings are interpreted as icons, so layering and substituting is supported. You can use `circle:white;./my_icon.svg` to add a background circle\ngroup: hidden",
+ "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\nAlternatively, this can reuse a _tagRendering_ from another layer, e.g. one of the 'icons'-tagrenderings.\nSee ExpandIconBadges on how this is handled\ngroup: hidden",
"type": "array",
"items": {
- "type": "object",
- "properties": {
- "if": {
- "$ref": "#/definitions/TagConfigJson",
- "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation\n\ntype: tag"
- },
- "then": {
- "description": "Badge to show\nType: icon",
- "anyOf": [
- {
- "$ref": "#/definitions/MinimalTagRenderingConfigJson"
+ "anyOf": [
+ {
+ "type": "object",
+ "properties": {
+ "if": {
+ "$ref": "#/definitions/TagConfigJson",
+ "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation\n\ntype: tag"
},
- {
- "type": "string"
+ "then": {
+ "description": "Badge to show\nType: icon",
+ "anyOf": [
+ {
+ "$ref": "#/definitions/MinimalTagRenderingConfigJson"
+ },
+ {
+ "type": "string"
+ }
+ ]
}
+ },
+ "required": [
+ "if",
+ "then"
]
+ },
+ {
+ "type": "string"
}
- },
- "required": [
- "if",
- "then"
]
}
},
diff --git a/src/UI/Studio/SchemaBasedMultiType.svelte b/src/UI/Studio/SchemaBasedMultiType.svelte
index 6698dcd909..e594fb6ff3 100644
--- a/src/UI/Studio/SchemaBasedMultiType.svelte
+++ b/src/UI/Studio/SchemaBasedMultiType.svelte
@@ -1,5 +1,5 @@