diff --git a/Docs/Schemas/FilterConfigJson.schema.json b/Docs/Schemas/FilterConfigJson.schema.json index ad6acfd29b..5e50195609 100644 --- a/Docs/Schemas/FilterConfigJson.schema.json +++ b/Docs/Schemas/FilterConfigJson.schema.json @@ -31,6 +31,7 @@ "type": "object", "properties": { "name": { + "description": "If name is `search`, use \"_first_comment~.*{search}.*\" as osmTags", "type": "string" }, "type": { diff --git a/Docs/Schemas/FilterConfigJsonJSC.ts b/Docs/Schemas/FilterConfigJsonJSC.ts index d8c787f83f..014ec8b6fb 100644 --- a/Docs/Schemas/FilterConfigJsonJSC.ts +++ b/Docs/Schemas/FilterConfigJsonJSC.ts @@ -31,6 +31,7 @@ export default { "type": "object", "properties": { "name": { + "description": "If name is `search`, use \"_first_comment~.*{search}.*\" as osmTags", "type": "string" }, "type": { diff --git a/Docs/Schemas/LayerConfigJson.schema.json b/Docs/Schemas/LayerConfigJson.schema.json index b453cb0c79..7b46dfbdcd 100644 --- a/Docs/Schemas/LayerConfigJson.schema.json +++ b/Docs/Schemas/LayerConfigJson.schema.json @@ -192,6 +192,9 @@ }, { "$ref": "#/definitions/default_5" + }, + { + "$ref": "#/definitions/default" } ] } @@ -212,7 +215,7 @@ "type": "object", "properties": { "title": { - "description": "The title - shown on the 'add-new'-button." + "description": "The title - shown on the 'add-new'-button.\n\nThis should include the article of the noun, e.g. 'a hydrant', 'a bicycle pump'.\nThis text will be inserted into `Add {category} here`, becoming `Add a hydrant here`.\n\nDo _not_ indicate 'new': 'add a new shop here' is incorrect, as the shop might have existed forever, it could just be unmapped!" }, "tags": { "description": "The tags to add. It determines the icon too", @@ -290,7 +293,7 @@ } }, "tagRenderings": { - "description": "All the tag renderings.\nA tag rendering is a block that either shows the known value or asks a question.\n\nRefer to the class `TagRenderingConfigJson` to see the possibilities.\n\nNote that we can also use a string here - where the string refers to a tag rendering defined in `assets/questions/questions.json`,\nwhere a few very general questions are defined e.g. website, phone number, ...\n\nA special value is 'questions', which indicates the location of the questions box. If not specified, it'll be appended to the bottom of the featureInfobox.\n\nAt last, one can define a group of renderings where parts of all strings will be replaced by multiple other strings.\nThis is mainly create questions for a 'left' and a 'right' side of the road.\nThese will be grouped and questions will be asked together", + "description": "All the tag renderings.\nA tag rendering is a block that either shows the known value or asks a question.\n\nRefer to the class `TagRenderingConfigJson` to see the possibilities.\n\nNote that we can also use a string here - where the string refers to a tag rendering defined in `assets/questions/questions.json`,\nwhere a few very general questions are defined e.g. website, phone number, ...\nFurthermore, _all_ the questions of another layer can be reused with `otherlayer.*`\nIf you need only a single of the tagRenderings, use `otherlayer.tagrenderingId`\nIf one or more questions have a 'group' or 'label' set, select all the entries with the corresponding group or label with `otherlayer.*group`\nRemark: if a tagRendering is 'lent' from another layer, the 'source'-tags are copied and added as condition.\nIf they are not wanted, remove them with an override\n\nA special value is 'questions', which indicates the location of the questions box. If not specified, it'll be appended to the bottom of the featureInfobox.\n\nAt last, one can define a group of renderings where parts of all strings will be replaced by multiple other strings.\nThis is mainly create questions for a 'left' and a 'right' side of the road.\nThese will be grouped and questions will be asked together", "type": "array", "items": { "anyOf": [ @@ -427,7 +430,7 @@ "type": "object", "properties": { "canonicalDenomination": { - "description": "The canonical value which will be added to the text.\ne.g. \"m\" for meters\nIf the user inputs '42', the canonical value will be added and it'll become '42m'", + "description": "The canonical value which will be added to the value in OSM.\ne.g. \"m\" for meters\nIf the user inputs '42', the canonical value will be added and it'll become '42m'.\n\nImportant: often, _no_ canonical values are expected, e.g. in the case of 'maxspeed' where 'km/h' is the default.\nIn this case, an empty string should be used", "type": "string" }, "canonicalDenominationSingular": { @@ -462,7 +465,7 @@ "additionalProperties": false }, "TagRenderingConfigJson": { - "description": "A TagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nFor an _editable_ tagRenerdering, use 'QuestionableTagRenderingConfigJson' instead, which extends this one", + "description": "A TagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nFor an _editable_ tagRendering, use 'QuestionableTagRenderingConfigJson' instead, which extends this one", "type": "object", "properties": { "id": { @@ -571,7 +574,7 @@ "type": "object", "properties": { "location": { - "description": "All the locations that this point should be rendered at.\nUsing `location: [\"point\", \"centroid\"] will always render centerpoint", + "description": "All the locations that this point should be rendered at.\nUsing `location: [\"point\", \"centroid\"] will always render centerpoint.\n'projected_centerpoint' will show an item on the line itself, near the middle of the line. (LineStrings only)", "type": "array", "items": { "type": "string" @@ -713,7 +716,7 @@ ] }, "fill": { - "description": "Wehter or not to fill polygons", + "description": "Whether or not to fill polygons", "anyOf": [ { "$ref": "#/definitions/TagRenderingConfigJson" @@ -752,6 +755,61 @@ }, "additionalProperties": false }, + "default": { + "description": "Rewrites and multiplies the given renderings of type T.\n\nFor example:\n\n\n```\n{\n rewrite: {\n sourceString: [\"key\", \"a|b|c\"],\n into: [\n [\"X\", 0]\n [\"Y\", 1],\n [\"Z\", 2]\n ],\n renderings: {\n \"key\":\"a|b|c\"\n }\n }\n}\n```\nwill result in _three_ copies (as the values to rewrite into have three values, namely:\n\n[\n {\n // The first pair: key --> X, a|b|c --> 0\n \"X\": 0\n },\n {\n \"Y\": 1\n },\n {\n \"Z\": 2\n }\n\n]", + "type": "object", + "properties": { + "rewrite": { + "type": "object", + "properties": { + "sourceString": { + "type": "array", + "items": { + "type": "string" + } + }, + "into": { + "type": "array", + "items": { + "type": "array", + "items": {} + } + } + }, + "required": [ + "into", + "sourceString" + ] + }, + "renderings": { + "anyOf": [ + { + "$ref": "#/definitions/default_4" + }, + { + "$ref": "#/definitions/default_5" + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/default_5" + } + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/default_4" + } + } + ] + } + }, + "required": [ + "renderings", + "rewrite" + ], + "additionalProperties": false + }, "QuestionableTagRenderingConfigJson": { "description": "A QuestionableTagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nIf the desired tags are missing and a question is defined, a question will be shown instead.", "type": "object", @@ -918,6 +976,7 @@ "additionalProperties": false }, "default<(string|QuestionableTagRenderingConfigJson|{builtin:string;override:any;})[]>": { + "description": "Rewrites and multiplies the given renderings of type T.\n\nFor example:\n\n\n```\n{\n rewrite: {\n sourceString: [\"key\", \"a|b|c\"],\n into: [\n [\"X\", 0]\n [\"Y\", 1],\n [\"Z\", 2]\n ],\n renderings: {\n \"key\":\"a|b|c\"\n }\n }\n}\n```\nwill result in _three_ copies (as the values to rewrite into have three values, namely:\n\n[\n {\n // The first pair: key --> X, a|b|c --> 0\n \"X\": 0\n },\n {\n \"Y\": 1\n },\n {\n \"Z\": 2\n }\n\n]", "type": "object", "properties": { "rewrite": { @@ -1008,6 +1067,7 @@ "type": "object", "properties": { "name": { + "description": "If name is `search`, use \"_first_comment~.*{search}.*\" as osmTags", "type": "string" }, "type": { diff --git a/Docs/Schemas/LayerConfigJsonJSC.ts b/Docs/Schemas/LayerConfigJsonJSC.ts index 1153ffb2d3..19fb401341 100644 --- a/Docs/Schemas/LayerConfigJsonJSC.ts +++ b/Docs/Schemas/LayerConfigJsonJSC.ts @@ -192,6 +192,9 @@ export default { }, { "$ref": "#/definitions/default_5" + }, + { + "$ref": "#/definitions/default" } ] } @@ -212,7 +215,7 @@ export default { "type": "object", "properties": { "title": { - "description": "The title - shown on the 'add-new'-button." + "description": "The title - shown on the 'add-new'-button.\n\nThis should include the article of the noun, e.g. 'a hydrant', 'a bicycle pump'.\nThis text will be inserted into `Add {category} here`, becoming `Add a hydrant here`.\n\nDo _not_ indicate 'new': 'add a new shop here' is incorrect, as the shop might have existed forever, it could just be unmapped!" }, "tags": { "description": "The tags to add. It determines the icon too", @@ -290,7 +293,7 @@ export default { } }, "tagRenderings": { - "description": "All the tag renderings.\nA tag rendering is a block that either shows the known value or asks a question.\n\nRefer to the class `TagRenderingConfigJson` to see the possibilities.\n\nNote that we can also use a string here - where the string refers to a tag rendering defined in `assets/questions/questions.json`,\nwhere a few very general questions are defined e.g. website, phone number, ...\n\nA special value is 'questions', which indicates the location of the questions box. If not specified, it'll be appended to the bottom of the featureInfobox.\n\nAt last, one can define a group of renderings where parts of all strings will be replaced by multiple other strings.\nThis is mainly create questions for a 'left' and a 'right' side of the road.\nThese will be grouped and questions will be asked together", + "description": "All the tag renderings.\nA tag rendering is a block that either shows the known value or asks a question.\n\nRefer to the class `TagRenderingConfigJson` to see the possibilities.\n\nNote that we can also use a string here - where the string refers to a tag rendering defined in `assets/questions/questions.json`,\nwhere a few very general questions are defined e.g. website, phone number, ...\nFurthermore, _all_ the questions of another layer can be reused with `otherlayer.*`\nIf you need only a single of the tagRenderings, use `otherlayer.tagrenderingId`\nIf one or more questions have a 'group' or 'label' set, select all the entries with the corresponding group or label with `otherlayer.*group`\nRemark: if a tagRendering is 'lent' from another layer, the 'source'-tags are copied and added as condition.\nIf they are not wanted, remove them with an override\n\nA special value is 'questions', which indicates the location of the questions box. If not specified, it'll be appended to the bottom of the featureInfobox.\n\nAt last, one can define a group of renderings where parts of all strings will be replaced by multiple other strings.\nThis is mainly create questions for a 'left' and a 'right' side of the road.\nThese will be grouped and questions will be asked together", "type": "array", "items": { "anyOf": [ @@ -426,7 +429,7 @@ export default { "type": "object", "properties": { "canonicalDenomination": { - "description": "The canonical value which will be added to the text.\ne.g. \"m\" for meters\nIf the user inputs '42', the canonical value will be added and it'll become '42m'", + "description": "The canonical value which will be added to the value in OSM.\ne.g. \"m\" for meters\nIf the user inputs '42', the canonical value will be added and it'll become '42m'.\n\nImportant: often, _no_ canonical values are expected, e.g. in the case of 'maxspeed' where 'km/h' is the default.\nIn this case, an empty string should be used", "type": "string" }, "canonicalDenominationSingular": { @@ -460,7 +463,7 @@ export default { ] }, "TagRenderingConfigJson": { - "description": "A TagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nFor an _editable_ tagRenerdering, use 'QuestionableTagRenderingConfigJson' instead, which extends this one", + "description": "A TagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nFor an _editable_ tagRendering, use 'QuestionableTagRenderingConfigJson' instead, which extends this one", "type": "object", "properties": { "id": { @@ -567,7 +570,7 @@ export default { "type": "object", "properties": { "location": { - "description": "All the locations that this point should be rendered at.\nUsing `location: [\"point\", \"centroid\"] will always render centerpoint", + "description": "All the locations that this point should be rendered at.\nUsing `location: [\"point\", \"centroid\"] will always render centerpoint.\n'projected_centerpoint' will show an item on the line itself, near the middle of the line. (LineStrings only)", "type": "array", "items": { "type": "string" @@ -708,7 +711,7 @@ export default { ] }, "fill": { - "description": "Wehter or not to fill polygons", + "description": "Whether or not to fill polygons", "anyOf": [ { "$ref": "#/definitions/TagRenderingConfigJson" @@ -746,6 +749,60 @@ export default { } } }, + "default": { + "description": "Rewrites and multiplies the given renderings of type T.\n\nFor example:\n\n\n```\n{\n rewrite: {\n sourceString: [\"key\", \"a|b|c\"],\n into: [\n [\"X\", 0]\n [\"Y\", 1],\n [\"Z\", 2]\n ],\n renderings: {\n \"key\":\"a|b|c\"\n }\n }\n}\n```\nwill result in _three_ copies (as the values to rewrite into have three values, namely:\n\n[\n {\n // The first pair: key --> X, a|b|c --> 0\n \"X\": 0\n },\n {\n \"Y\": 1\n },\n {\n \"Z\": 2\n }\n\n]", + "type": "object", + "properties": { + "rewrite": { + "type": "object", + "properties": { + "sourceString": { + "type": "array", + "items": { + "type": "string" + } + }, + "into": { + "type": "array", + "items": { + "type": "array", + "items": {} + } + } + }, + "required": [ + "into", + "sourceString" + ] + }, + "renderings": { + "anyOf": [ + { + "$ref": "#/definitions/default_4" + }, + { + "$ref": "#/definitions/default_5" + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/default_5" + } + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/default_4" + } + } + ] + } + }, + "required": [ + "renderings", + "rewrite" + ] + }, "QuestionableTagRenderingConfigJson": { "description": "A QuestionableTagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nIf the desired tags are missing and a question is defined, a question will be shown instead.", "type": "object", @@ -911,6 +968,7 @@ export default { } }, "default<(string|QuestionableTagRenderingConfigJson|{builtin:string;override:any;})[]>": { + "description": "Rewrites and multiplies the given renderings of type T.\n\nFor example:\n\n\n```\n{\n rewrite: {\n sourceString: [\"key\", \"a|b|c\"],\n into: [\n [\"X\", 0]\n [\"Y\", 1],\n [\"Z\", 2]\n ],\n renderings: {\n \"key\":\"a|b|c\"\n }\n }\n}\n```\nwill result in _three_ copies (as the values to rewrite into have three values, namely:\n\n[\n {\n // The first pair: key --> X, a|b|c --> 0\n \"X\": 0\n },\n {\n \"Y\": 1\n },\n {\n \"Z\": 2\n }\n\n]", "type": "object", "properties": { "rewrite": { @@ -1000,6 +1058,7 @@ export default { "type": "object", "properties": { "name": { + "description": "If name is `search`, use \"_first_comment~.*{search}.*\" as osmTags", "type": "string" }, "type": { diff --git a/Docs/Schemas/LayoutConfigJson.schema.json b/Docs/Schemas/LayoutConfigJson.schema.json index 47f2bd9a1d..ec1bd4df9e 100644 --- a/Docs/Schemas/LayoutConfigJson.schema.json +++ b/Docs/Schemas/LayoutConfigJson.schema.json @@ -324,7 +324,7 @@ "type": "object", "properties": { "canonicalDenomination": { - "description": "The canonical value which will be added to the text.\ne.g. \"m\" for meters\nIf the user inputs '42', the canonical value will be added and it'll become '42m'", + "description": "The canonical value which will be added to the value in OSM.\ne.g. \"m\" for meters\nIf the user inputs '42', the canonical value will be added and it'll become '42m'.\n\nImportant: often, _no_ canonical values are expected, e.g. in the case of 'maxspeed' where 'km/h' is the default.\nIn this case, an empty string should be used", "type": "string" }, "canonicalDenominationSingular": { @@ -359,7 +359,7 @@ "additionalProperties": false }, "TagRenderingConfigJson": { - "description": "A TagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nFor an _editable_ tagRenerdering, use 'QuestionableTagRenderingConfigJson' instead, which extends this one", + "description": "A TagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nFor an _editable_ tagRendering, use 'QuestionableTagRenderingConfigJson' instead, which extends this one", "type": "object", "properties": { "id": { @@ -468,7 +468,7 @@ "type": "object", "properties": { "location": { - "description": "All the locations that this point should be rendered at.\nUsing `location: [\"point\", \"centroid\"] will always render centerpoint", + "description": "All the locations that this point should be rendered at.\nUsing `location: [\"point\", \"centroid\"] will always render centerpoint.\n'projected_centerpoint' will show an item on the line itself, near the middle of the line. (LineStrings only)", "type": "array", "items": { "type": "string" @@ -610,7 +610,7 @@ ] }, "fill": { - "description": "Wehter or not to fill polygons", + "description": "Whether or not to fill polygons", "anyOf": [ { "$ref": "#/definitions/TagRenderingConfigJson" @@ -649,6 +649,61 @@ }, "additionalProperties": false }, + "default": { + "description": "Rewrites and multiplies the given renderings of type T.\n\nFor example:\n\n\n```\n{\n rewrite: {\n sourceString: [\"key\", \"a|b|c\"],\n into: [\n [\"X\", 0]\n [\"Y\", 1],\n [\"Z\", 2]\n ],\n renderings: {\n \"key\":\"a|b|c\"\n }\n }\n}\n```\nwill result in _three_ copies (as the values to rewrite into have three values, namely:\n\n[\n {\n // The first pair: key --> X, a|b|c --> 0\n \"X\": 0\n },\n {\n \"Y\": 1\n },\n {\n \"Z\": 2\n }\n\n]", + "type": "object", + "properties": { + "rewrite": { + "type": "object", + "properties": { + "sourceString": { + "type": "array", + "items": { + "type": "string" + } + }, + "into": { + "type": "array", + "items": { + "type": "array", + "items": {} + } + } + }, + "required": [ + "into", + "sourceString" + ] + }, + "renderings": { + "anyOf": [ + { + "$ref": "#/definitions/default_4" + }, + { + "$ref": "#/definitions/default_5" + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/default_5" + } + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/default_4" + } + } + ] + } + }, + "required": [ + "renderings", + "rewrite" + ], + "additionalProperties": false + }, "QuestionableTagRenderingConfigJson": { "description": "A QuestionableTagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nIf the desired tags are missing and a question is defined, a question will be shown instead.", "type": "object", @@ -815,6 +870,7 @@ "additionalProperties": false }, "default<(string|QuestionableTagRenderingConfigJson|{builtin:string;override:any;})[]>": { + "description": "Rewrites and multiplies the given renderings of type T.\n\nFor example:\n\n\n```\n{\n rewrite: {\n sourceString: [\"key\", \"a|b|c\"],\n into: [\n [\"X\", 0]\n [\"Y\", 1],\n [\"Z\", 2]\n ],\n renderings: {\n \"key\":\"a|b|c\"\n }\n }\n}\n```\nwill result in _three_ copies (as the values to rewrite into have three values, namely:\n\n[\n {\n // The first pair: key --> X, a|b|c --> 0\n \"X\": 0\n },\n {\n \"Y\": 1\n },\n {\n \"Z\": 2\n }\n\n]", "type": "object", "properties": { "rewrite": { @@ -905,6 +961,7 @@ "type": "object", "properties": { "name": { + "description": "If name is `search`, use \"_first_comment~.*{search}.*\" as osmTags", "type": "string" }, "type": { @@ -1262,6 +1319,9 @@ }, { "$ref": "#/definitions/default_5" + }, + { + "$ref": "#/definitions/default" } ] } @@ -1282,7 +1342,7 @@ "type": "object", "properties": { "title": { - "description": "The title - shown on the 'add-new'-button." + "description": "The title - shown on the 'add-new'-button.\n\nThis should include the article of the noun, e.g. 'a hydrant', 'a bicycle pump'.\nThis text will be inserted into `Add {category} here`, becoming `Add a hydrant here`.\n\nDo _not_ indicate 'new': 'add a new shop here' is incorrect, as the shop might have existed forever, it could just be unmapped!" }, "tags": { "description": "The tags to add. It determines the icon too", @@ -1360,7 +1420,7 @@ } }, "tagRenderings": { - "description": "All the tag renderings.\nA tag rendering is a block that either shows the known value or asks a question.\n\nRefer to the class `TagRenderingConfigJson` to see the possibilities.\n\nNote that we can also use a string here - where the string refers to a tag rendering defined in `assets/questions/questions.json`,\nwhere a few very general questions are defined e.g. website, phone number, ...\n\nA special value is 'questions', which indicates the location of the questions box. If not specified, it'll be appended to the bottom of the featureInfobox.\n\nAt last, one can define a group of renderings where parts of all strings will be replaced by multiple other strings.\nThis is mainly create questions for a 'left' and a 'right' side of the road.\nThese will be grouped and questions will be asked together", + "description": "All the tag renderings.\nA tag rendering is a block that either shows the known value or asks a question.\n\nRefer to the class `TagRenderingConfigJson` to see the possibilities.\n\nNote that we can also use a string here - where the string refers to a tag rendering defined in `assets/questions/questions.json`,\nwhere a few very general questions are defined e.g. website, phone number, ...\nFurthermore, _all_ the questions of another layer can be reused with `otherlayer.*`\nIf you need only a single of the tagRenderings, use `otherlayer.tagrenderingId`\nIf one or more questions have a 'group' or 'label' set, select all the entries with the corresponding group or label with `otherlayer.*group`\nRemark: if a tagRendering is 'lent' from another layer, the 'source'-tags are copied and added as condition.\nIf they are not wanted, remove them with an override\n\nA special value is 'questions', which indicates the location of the questions box. If not specified, it'll be appended to the bottom of the featureInfobox.\n\nAt last, one can define a group of renderings where parts of all strings will be replaced by multiple other strings.\nThis is mainly create questions for a 'left' and a 'right' side of the road.\nThese will be grouped and questions will be asked together", "type": "array", "items": { "anyOf": [ diff --git a/Docs/Schemas/LayoutConfigJsonJSC.ts b/Docs/Schemas/LayoutConfigJsonJSC.ts index f80e08e10f..7b03e721b4 100644 --- a/Docs/Schemas/LayoutConfigJsonJSC.ts +++ b/Docs/Schemas/LayoutConfigJsonJSC.ts @@ -323,7 +323,7 @@ export default { "type": "object", "properties": { "canonicalDenomination": { - "description": "The canonical value which will be added to the text.\ne.g. \"m\" for meters\nIf the user inputs '42', the canonical value will be added and it'll become '42m'", + "description": "The canonical value which will be added to the value in OSM.\ne.g. \"m\" for meters\nIf the user inputs '42', the canonical value will be added and it'll become '42m'.\n\nImportant: often, _no_ canonical values are expected, e.g. in the case of 'maxspeed' where 'km/h' is the default.\nIn this case, an empty string should be used", "type": "string" }, "canonicalDenominationSingular": { @@ -357,7 +357,7 @@ export default { ] }, "TagRenderingConfigJson": { - "description": "A TagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nFor an _editable_ tagRenerdering, use 'QuestionableTagRenderingConfigJson' instead, which extends this one", + "description": "A TagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nFor an _editable_ tagRendering, use 'QuestionableTagRenderingConfigJson' instead, which extends this one", "type": "object", "properties": { "id": { @@ -464,7 +464,7 @@ export default { "type": "object", "properties": { "location": { - "description": "All the locations that this point should be rendered at.\nUsing `location: [\"point\", \"centroid\"] will always render centerpoint", + "description": "All the locations that this point should be rendered at.\nUsing `location: [\"point\", \"centroid\"] will always render centerpoint.\n'projected_centerpoint' will show an item on the line itself, near the middle of the line. (LineStrings only)", "type": "array", "items": { "type": "string" @@ -605,7 +605,7 @@ export default { ] }, "fill": { - "description": "Wehter or not to fill polygons", + "description": "Whether or not to fill polygons", "anyOf": [ { "$ref": "#/definitions/TagRenderingConfigJson" @@ -643,6 +643,60 @@ export default { } } }, + "default": { + "description": "Rewrites and multiplies the given renderings of type T.\n\nFor example:\n\n\n```\n{\n rewrite: {\n sourceString: [\"key\", \"a|b|c\"],\n into: [\n [\"X\", 0]\n [\"Y\", 1],\n [\"Z\", 2]\n ],\n renderings: {\n \"key\":\"a|b|c\"\n }\n }\n}\n```\nwill result in _three_ copies (as the values to rewrite into have three values, namely:\n\n[\n {\n // The first pair: key --> X, a|b|c --> 0\n \"X\": 0\n },\n {\n \"Y\": 1\n },\n {\n \"Z\": 2\n }\n\n]", + "type": "object", + "properties": { + "rewrite": { + "type": "object", + "properties": { + "sourceString": { + "type": "array", + "items": { + "type": "string" + } + }, + "into": { + "type": "array", + "items": { + "type": "array", + "items": {} + } + } + }, + "required": [ + "into", + "sourceString" + ] + }, + "renderings": { + "anyOf": [ + { + "$ref": "#/definitions/default_4" + }, + { + "$ref": "#/definitions/default_5" + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/default_5" + } + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/default_4" + } + } + ] + } + }, + "required": [ + "renderings", + "rewrite" + ] + }, "QuestionableTagRenderingConfigJson": { "description": "A QuestionableTagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nIf the desired tags are missing and a question is defined, a question will be shown instead.", "type": "object", @@ -808,6 +862,7 @@ export default { } }, "default<(string|QuestionableTagRenderingConfigJson|{builtin:string;override:any;})[]>": { + "description": "Rewrites and multiplies the given renderings of type T.\n\nFor example:\n\n\n```\n{\n rewrite: {\n sourceString: [\"key\", \"a|b|c\"],\n into: [\n [\"X\", 0]\n [\"Y\", 1],\n [\"Z\", 2]\n ],\n renderings: {\n \"key\":\"a|b|c\"\n }\n }\n}\n```\nwill result in _three_ copies (as the values to rewrite into have three values, namely:\n\n[\n {\n // The first pair: key --> X, a|b|c --> 0\n \"X\": 0\n },\n {\n \"Y\": 1\n },\n {\n \"Z\": 2\n }\n\n]", "type": "object", "properties": { "rewrite": { @@ -897,6 +952,7 @@ export default { "type": "object", "properties": { "name": { + "description": "If name is `search`, use \"_first_comment~.*{search}.*\" as osmTags", "type": "string" }, "type": { @@ -1249,6 +1305,9 @@ export default { }, { "$ref": "#/definitions/default_5" + }, + { + "$ref": "#/definitions/default" } ] } @@ -1269,7 +1328,7 @@ export default { "type": "object", "properties": { "title": { - "description": "The title - shown on the 'add-new'-button." + "description": "The title - shown on the 'add-new'-button.\n\nThis should include the article of the noun, e.g. 'a hydrant', 'a bicycle pump'.\nThis text will be inserted into `Add {category} here`, becoming `Add a hydrant here`.\n\nDo _not_ indicate 'new': 'add a new shop here' is incorrect, as the shop might have existed forever, it could just be unmapped!" }, "tags": { "description": "The tags to add. It determines the icon too", @@ -1347,7 +1406,7 @@ export default { } }, "tagRenderings": { - "description": "All the tag renderings.\nA tag rendering is a block that either shows the known value or asks a question.\n\nRefer to the class `TagRenderingConfigJson` to see the possibilities.\n\nNote that we can also use a string here - where the string refers to a tag rendering defined in `assets/questions/questions.json`,\nwhere a few very general questions are defined e.g. website, phone number, ...\n\nA special value is 'questions', which indicates the location of the questions box. If not specified, it'll be appended to the bottom of the featureInfobox.\n\nAt last, one can define a group of renderings where parts of all strings will be replaced by multiple other strings.\nThis is mainly create questions for a 'left' and a 'right' side of the road.\nThese will be grouped and questions will be asked together", + "description": "All the tag renderings.\nA tag rendering is a block that either shows the known value or asks a question.\n\nRefer to the class `TagRenderingConfigJson` to see the possibilities.\n\nNote that we can also use a string here - where the string refers to a tag rendering defined in `assets/questions/questions.json`,\nwhere a few very general questions are defined e.g. website, phone number, ...\nFurthermore, _all_ the questions of another layer can be reused with `otherlayer.*`\nIf you need only a single of the tagRenderings, use `otherlayer.tagrenderingId`\nIf one or more questions have a 'group' or 'label' set, select all the entries with the corresponding group or label with `otherlayer.*group`\nRemark: if a tagRendering is 'lent' from another layer, the 'source'-tags are copied and added as condition.\nIf they are not wanted, remove them with an override\n\nA special value is 'questions', which indicates the location of the questions box. If not specified, it'll be appended to the bottom of the featureInfobox.\n\nAt last, one can define a group of renderings where parts of all strings will be replaced by multiple other strings.\nThis is mainly create questions for a 'left' and a 'right' side of the road.\nThese will be grouped and questions will be asked together", "type": "array", "items": { "anyOf": [ diff --git a/Docs/Schemas/LineRenderingConfigJson.schema.json b/Docs/Schemas/LineRenderingConfigJson.schema.json index 77bad73ac7..a852559fd0 100644 --- a/Docs/Schemas/LineRenderingConfigJson.schema.json +++ b/Docs/Schemas/LineRenderingConfigJson.schema.json @@ -50,7 +50,7 @@ ] }, "fill": { - "description": "Wehter or not to fill polygons", + "description": "Whether or not to fill polygons", "anyOf": [ { "$ref": "#/definitions/TagRenderingConfigJson" @@ -124,7 +124,7 @@ "type": "object", "properties": { "canonicalDenomination": { - "description": "The canonical value which will be added to the text.\ne.g. \"m\" for meters\nIf the user inputs '42', the canonical value will be added and it'll become '42m'", + "description": "The canonical value which will be added to the value in OSM.\ne.g. \"m\" for meters\nIf the user inputs '42', the canonical value will be added and it'll become '42m'.\n\nImportant: often, _no_ canonical values are expected, e.g. in the case of 'maxspeed' where 'km/h' is the default.\nIn this case, an empty string should be used", "type": "string" }, "canonicalDenominationSingular": { @@ -159,7 +159,7 @@ "additionalProperties": false }, "TagRenderingConfigJson": { - "description": "A TagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nFor an _editable_ tagRenerdering, use 'QuestionableTagRenderingConfigJson' instead, which extends this one", + "description": "A TagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nFor an _editable_ tagRendering, use 'QuestionableTagRenderingConfigJson' instead, which extends this one", "type": "object", "properties": { "id": { diff --git a/Docs/Schemas/LineRenderingConfigJsonJSC.ts b/Docs/Schemas/LineRenderingConfigJsonJSC.ts index 1c35298ec3..5f4e0a4435 100644 --- a/Docs/Schemas/LineRenderingConfigJsonJSC.ts +++ b/Docs/Schemas/LineRenderingConfigJsonJSC.ts @@ -50,7 +50,7 @@ export default { ] }, "fill": { - "description": "Wehter or not to fill polygons", + "description": "Whether or not to fill polygons", "anyOf": [ { "$ref": "#/definitions/TagRenderingConfigJson" @@ -123,7 +123,7 @@ export default { "type": "object", "properties": { "canonicalDenomination": { - "description": "The canonical value which will be added to the text.\ne.g. \"m\" for meters\nIf the user inputs '42', the canonical value will be added and it'll become '42m'", + "description": "The canonical value which will be added to the value in OSM.\ne.g. \"m\" for meters\nIf the user inputs '42', the canonical value will be added and it'll become '42m'.\n\nImportant: often, _no_ canonical values are expected, e.g. in the case of 'maxspeed' where 'km/h' is the default.\nIn this case, an empty string should be used", "type": "string" }, "canonicalDenominationSingular": { @@ -157,7 +157,7 @@ export default { ] }, "TagRenderingConfigJson": { - "description": "A TagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nFor an _editable_ tagRenerdering, use 'QuestionableTagRenderingConfigJson' instead, which extends this one", + "description": "A TagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nFor an _editable_ tagRendering, use 'QuestionableTagRenderingConfigJson' instead, which extends this one", "type": "object", "properties": { "id": { diff --git a/Docs/Schemas/MoveConfigJson.schema.json b/Docs/Schemas/MoveConfigJson.schema.json index 74106b056d..d248960bec 100644 --- a/Docs/Schemas/MoveConfigJson.schema.json +++ b/Docs/Schemas/MoveConfigJson.schema.json @@ -47,7 +47,7 @@ "type": "object", "properties": { "canonicalDenomination": { - "description": "The canonical value which will be added to the text.\ne.g. \"m\" for meters\nIf the user inputs '42', the canonical value will be added and it'll become '42m'", + "description": "The canonical value which will be added to the value in OSM.\ne.g. \"m\" for meters\nIf the user inputs '42', the canonical value will be added and it'll become '42m'.\n\nImportant: often, _no_ canonical values are expected, e.g. in the case of 'maxspeed' where 'km/h' is the default.\nIn this case, an empty string should be used", "type": "string" }, "canonicalDenominationSingular": { diff --git a/Docs/Schemas/MoveConfigJsonJSC.ts b/Docs/Schemas/MoveConfigJsonJSC.ts index 0d7dede65a..9c62ce5ca0 100644 --- a/Docs/Schemas/MoveConfigJsonJSC.ts +++ b/Docs/Schemas/MoveConfigJsonJSC.ts @@ -46,7 +46,7 @@ export default { "type": "object", "properties": { "canonicalDenomination": { - "description": "The canonical value which will be added to the text.\ne.g. \"m\" for meters\nIf the user inputs '42', the canonical value will be added and it'll become '42m'", + "description": "The canonical value which will be added to the value in OSM.\ne.g. \"m\" for meters\nIf the user inputs '42', the canonical value will be added and it'll become '42m'.\n\nImportant: often, _no_ canonical values are expected, e.g. in the case of 'maxspeed' where 'km/h' is the default.\nIn this case, an empty string should be used", "type": "string" }, "canonicalDenominationSingular": { diff --git a/Docs/Schemas/PointRenderingConfigJson.schema.json b/Docs/Schemas/PointRenderingConfigJson.schema.json index c2ead69a46..dea072665c 100644 --- a/Docs/Schemas/PointRenderingConfigJson.schema.json +++ b/Docs/Schemas/PointRenderingConfigJson.schema.json @@ -3,7 +3,7 @@ "type": "object", "properties": { "location": { - "description": "All the locations that this point should be rendered at.\nUsing `location: [\"point\", \"centroid\"] will always render centerpoint", + "description": "All the locations that this point should be rendered at.\nUsing `location: [\"point\", \"centroid\"] will always render centerpoint.\n'projected_centerpoint' will show an item on the line itself, near the middle of the line. (LineStrings only)", "type": "array", "items": { "type": "string" @@ -128,7 +128,7 @@ "type": "object", "properties": { "canonicalDenomination": { - "description": "The canonical value which will be added to the text.\ne.g. \"m\" for meters\nIf the user inputs '42', the canonical value will be added and it'll become '42m'", + "description": "The canonical value which will be added to the value in OSM.\ne.g. \"m\" for meters\nIf the user inputs '42', the canonical value will be added and it'll become '42m'.\n\nImportant: often, _no_ canonical values are expected, e.g. in the case of 'maxspeed' where 'km/h' is the default.\nIn this case, an empty string should be used", "type": "string" }, "canonicalDenominationSingular": { @@ -163,7 +163,7 @@ "additionalProperties": false }, "TagRenderingConfigJson": { - "description": "A TagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nFor an _editable_ tagRenerdering, use 'QuestionableTagRenderingConfigJson' instead, which extends this one", + "description": "A TagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nFor an _editable_ tagRendering, use 'QuestionableTagRenderingConfigJson' instead, which extends this one", "type": "object", "properties": { "id": { diff --git a/Docs/Schemas/PointRenderingConfigJsonJSC.ts b/Docs/Schemas/PointRenderingConfigJsonJSC.ts index 371378c9ed..09c31651d4 100644 --- a/Docs/Schemas/PointRenderingConfigJsonJSC.ts +++ b/Docs/Schemas/PointRenderingConfigJsonJSC.ts @@ -3,7 +3,7 @@ export default { "type": "object", "properties": { "location": { - "description": "All the locations that this point should be rendered at.\nUsing `location: [\"point\", \"centroid\"] will always render centerpoint", + "description": "All the locations that this point should be rendered at.\nUsing `location: [\"point\", \"centroid\"] will always render centerpoint.\n'projected_centerpoint' will show an item on the line itself, near the middle of the line. (LineStrings only)", "type": "array", "items": { "type": "string" @@ -127,7 +127,7 @@ export default { "type": "object", "properties": { "canonicalDenomination": { - "description": "The canonical value which will be added to the text.\ne.g. \"m\" for meters\nIf the user inputs '42', the canonical value will be added and it'll become '42m'", + "description": "The canonical value which will be added to the value in OSM.\ne.g. \"m\" for meters\nIf the user inputs '42', the canonical value will be added and it'll become '42m'.\n\nImportant: often, _no_ canonical values are expected, e.g. in the case of 'maxspeed' where 'km/h' is the default.\nIn this case, an empty string should be used", "type": "string" }, "canonicalDenominationSingular": { @@ -161,7 +161,7 @@ export default { ] }, "TagRenderingConfigJson": { - "description": "A TagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nFor an _editable_ tagRenerdering, use 'QuestionableTagRenderingConfigJson' instead, which extends this one", + "description": "A TagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nFor an _editable_ tagRendering, use 'QuestionableTagRenderingConfigJson' instead, which extends this one", "type": "object", "properties": { "id": { diff --git a/Docs/Schemas/QuestionableTagRenderingConfigJson.schema.json b/Docs/Schemas/QuestionableTagRenderingConfigJson.schema.json index db2f3b0071..8bf8cdfa11 100644 --- a/Docs/Schemas/QuestionableTagRenderingConfigJson.schema.json +++ b/Docs/Schemas/QuestionableTagRenderingConfigJson.schema.json @@ -198,7 +198,7 @@ "type": "object", "properties": { "canonicalDenomination": { - "description": "The canonical value which will be added to the text.\ne.g. \"m\" for meters\nIf the user inputs '42', the canonical value will be added and it'll become '42m'", + "description": "The canonical value which will be added to the value in OSM.\ne.g. \"m\" for meters\nIf the user inputs '42', the canonical value will be added and it'll become '42m'.\n\nImportant: often, _no_ canonical values are expected, e.g. in the case of 'maxspeed' where 'km/h' is the default.\nIn this case, an empty string should be used", "type": "string" }, "canonicalDenominationSingular": { @@ -233,7 +233,7 @@ "additionalProperties": false }, "TagRenderingConfigJson": { - "description": "A TagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nFor an _editable_ tagRenerdering, use 'QuestionableTagRenderingConfigJson' instead, which extends this one", + "description": "A TagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nFor an _editable_ tagRendering, use 'QuestionableTagRenderingConfigJson' instead, which extends this one", "type": "object", "properties": { "id": { diff --git a/Docs/Schemas/QuestionableTagRenderingConfigJsonJSC.ts b/Docs/Schemas/QuestionableTagRenderingConfigJsonJSC.ts index 0fcdb00e0b..3bdb300666 100644 --- a/Docs/Schemas/QuestionableTagRenderingConfigJsonJSC.ts +++ b/Docs/Schemas/QuestionableTagRenderingConfigJsonJSC.ts @@ -197,7 +197,7 @@ export default { "type": "object", "properties": { "canonicalDenomination": { - "description": "The canonical value which will be added to the text.\ne.g. \"m\" for meters\nIf the user inputs '42', the canonical value will be added and it'll become '42m'", + "description": "The canonical value which will be added to the value in OSM.\ne.g. \"m\" for meters\nIf the user inputs '42', the canonical value will be added and it'll become '42m'.\n\nImportant: often, _no_ canonical values are expected, e.g. in the case of 'maxspeed' where 'km/h' is the default.\nIn this case, an empty string should be used", "type": "string" }, "canonicalDenominationSingular": { @@ -231,7 +231,7 @@ export default { ] }, "TagRenderingConfigJson": { - "description": "A TagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nFor an _editable_ tagRenerdering, use 'QuestionableTagRenderingConfigJson' instead, which extends this one", + "description": "A TagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nFor an _editable_ tagRendering, use 'QuestionableTagRenderingConfigJson' instead, which extends this one", "type": "object", "properties": { "id": { diff --git a/Docs/Schemas/RewritableConfigJson.schema.json b/Docs/Schemas/RewritableConfigJson.schema.json index 7457df0e05..81d22de45c 100644 --- a/Docs/Schemas/RewritableConfigJson.schema.json +++ b/Docs/Schemas/RewritableConfigJson.schema.json @@ -1,4 +1,5 @@ { + "description": "Rewrites and multiplies the given renderings of type T.\n\nFor example:\n\n\n```\n{\n rewrite: {\n sourceString: [\"key\", \"a|b|c\"],\n into: [\n [\"X\", 0]\n [\"Y\", 1],\n [\"Z\", 2]\n ],\n renderings: {\n \"key\":\"a|b|c\"\n }\n }\n}\n```\nwill result in _three_ copies (as the values to rewrite into have three values, namely:\n\n[\n {\n // The first pair: key --> X, a|b|c --> 0\n \"X\": 0\n },\n {\n \"Y\": 1\n },\n {\n \"Z\": 2\n }\n\n]", "type": "object", "properties": { "rewrite": { @@ -68,7 +69,7 @@ "type": "object", "properties": { "canonicalDenomination": { - "description": "The canonical value which will be added to the text.\ne.g. \"m\" for meters\nIf the user inputs '42', the canonical value will be added and it'll become '42m'", + "description": "The canonical value which will be added to the value in OSM.\ne.g. \"m\" for meters\nIf the user inputs '42', the canonical value will be added and it'll become '42m'.\n\nImportant: often, _no_ canonical values are expected, e.g. in the case of 'maxspeed' where 'km/h' is the default.\nIn this case, an empty string should be used", "type": "string" }, "canonicalDenominationSingular": { @@ -103,7 +104,7 @@ "additionalProperties": false }, "TagRenderingConfigJson": { - "description": "A TagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nFor an _editable_ tagRenerdering, use 'QuestionableTagRenderingConfigJson' instead, which extends this one", + "description": "A TagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nFor an _editable_ tagRendering, use 'QuestionableTagRenderingConfigJson' instead, which extends this one", "type": "object", "properties": { "id": { diff --git a/Docs/Schemas/RewritableConfigJsonJSC.ts b/Docs/Schemas/RewritableConfigJsonJSC.ts index 9ddb180381..49c3479ebe 100644 --- a/Docs/Schemas/RewritableConfigJsonJSC.ts +++ b/Docs/Schemas/RewritableConfigJsonJSC.ts @@ -1,4 +1,5 @@ export default { + "description": "Rewrites and multiplies the given renderings of type T.\n\nFor example:\n\n\n```\n{\n rewrite: {\n sourceString: [\"key\", \"a|b|c\"],\n into: [\n [\"X\", 0]\n [\"Y\", 1],\n [\"Z\", 2]\n ],\n renderings: {\n \"key\":\"a|b|c\"\n }\n }\n}\n```\nwill result in _three_ copies (as the values to rewrite into have three values, namely:\n\n[\n {\n // The first pair: key --> X, a|b|c --> 0\n \"X\": 0\n },\n {\n \"Y\": 1\n },\n {\n \"Z\": 2\n }\n\n]", "type": "object", "properties": { "rewrite": { @@ -67,7 +68,7 @@ export default { "type": "object", "properties": { "canonicalDenomination": { - "description": "The canonical value which will be added to the text.\ne.g. \"m\" for meters\nIf the user inputs '42', the canonical value will be added and it'll become '42m'", + "description": "The canonical value which will be added to the value in OSM.\ne.g. \"m\" for meters\nIf the user inputs '42', the canonical value will be added and it'll become '42m'.\n\nImportant: often, _no_ canonical values are expected, e.g. in the case of 'maxspeed' where 'km/h' is the default.\nIn this case, an empty string should be used", "type": "string" }, "canonicalDenominationSingular": { @@ -101,7 +102,7 @@ export default { ] }, "TagRenderingConfigJson": { - "description": "A TagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nFor an _editable_ tagRenerdering, use 'QuestionableTagRenderingConfigJson' instead, which extends this one", + "description": "A TagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nFor an _editable_ tagRendering, use 'QuestionableTagRenderingConfigJson' instead, which extends this one", "type": "object", "properties": { "id": { diff --git a/Docs/Schemas/TagRenderingConfigJson.schema.json b/Docs/Schemas/TagRenderingConfigJson.schema.json index 8562408cd1..3ad494ccb4 100644 --- a/Docs/Schemas/TagRenderingConfigJson.schema.json +++ b/Docs/Schemas/TagRenderingConfigJson.schema.json @@ -1,5 +1,5 @@ { - "description": "A TagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nFor an _editable_ tagRenerdering, use 'QuestionableTagRenderingConfigJson' instead, which extends this one", + "description": "A TagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nFor an _editable_ tagRendering, use 'QuestionableTagRenderingConfigJson' instead, which extends this one", "type": "object", "properties": { "id": { diff --git a/Docs/Schemas/TagRenderingConfigJsonJSC.ts b/Docs/Schemas/TagRenderingConfigJsonJSC.ts index 11afa40fc2..b4a8e29906 100644 --- a/Docs/Schemas/TagRenderingConfigJsonJSC.ts +++ b/Docs/Schemas/TagRenderingConfigJsonJSC.ts @@ -1,5 +1,5 @@ export default { - "description": "A TagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nFor an _editable_ tagRenerdering, use 'QuestionableTagRenderingConfigJson' instead, which extends this one", + "description": "A TagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nFor an _editable_ tagRendering, use 'QuestionableTagRenderingConfigJson' instead, which extends this one", "type": "object", "properties": { "id": { diff --git a/Docs/Schemas/TilesourceConfigJson.schema.json b/Docs/Schemas/TilesourceConfigJson.schema.json index c333681c22..fccfb49a82 100644 --- a/Docs/Schemas/TilesourceConfigJson.schema.json +++ b/Docs/Schemas/TilesourceConfigJson.schema.json @@ -72,7 +72,7 @@ "type": "object", "properties": { "canonicalDenomination": { - "description": "The canonical value which will be added to the text.\ne.g. \"m\" for meters\nIf the user inputs '42', the canonical value will be added and it'll become '42m'", + "description": "The canonical value which will be added to the value in OSM.\ne.g. \"m\" for meters\nIf the user inputs '42', the canonical value will be added and it'll become '42m'.\n\nImportant: often, _no_ canonical values are expected, e.g. in the case of 'maxspeed' where 'km/h' is the default.\nIn this case, an empty string should be used", "type": "string" }, "canonicalDenominationSingular": { @@ -107,7 +107,7 @@ "additionalProperties": false }, "TagRenderingConfigJson": { - "description": "A TagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nFor an _editable_ tagRenerdering, use 'QuestionableTagRenderingConfigJson' instead, which extends this one", + "description": "A TagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nFor an _editable_ tagRendering, use 'QuestionableTagRenderingConfigJson' instead, which extends this one", "type": "object", "properties": { "id": { @@ -216,7 +216,7 @@ "type": "object", "properties": { "location": { - "description": "All the locations that this point should be rendered at.\nUsing `location: [\"point\", \"centroid\"] will always render centerpoint", + "description": "All the locations that this point should be rendered at.\nUsing `location: [\"point\", \"centroid\"] will always render centerpoint.\n'projected_centerpoint' will show an item on the line itself, near the middle of the line. (LineStrings only)", "type": "array", "items": { "type": "string" @@ -358,7 +358,7 @@ ] }, "fill": { - "description": "Wehter or not to fill polygons", + "description": "Whether or not to fill polygons", "anyOf": [ { "$ref": "#/definitions/TagRenderingConfigJson" @@ -397,6 +397,61 @@ }, "additionalProperties": false }, + "default": { + "description": "Rewrites and multiplies the given renderings of type T.\n\nFor example:\n\n\n```\n{\n rewrite: {\n sourceString: [\"key\", \"a|b|c\"],\n into: [\n [\"X\", 0]\n [\"Y\", 1],\n [\"Z\", 2]\n ],\n renderings: {\n \"key\":\"a|b|c\"\n }\n }\n}\n```\nwill result in _three_ copies (as the values to rewrite into have three values, namely:\n\n[\n {\n // The first pair: key --> X, a|b|c --> 0\n \"X\": 0\n },\n {\n \"Y\": 1\n },\n {\n \"Z\": 2\n }\n\n]", + "type": "object", + "properties": { + "rewrite": { + "type": "object", + "properties": { + "sourceString": { + "type": "array", + "items": { + "type": "string" + } + }, + "into": { + "type": "array", + "items": { + "type": "array", + "items": {} + } + } + }, + "required": [ + "into", + "sourceString" + ] + }, + "renderings": { + "anyOf": [ + { + "$ref": "#/definitions/default_4" + }, + { + "$ref": "#/definitions/default_5" + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/default_5" + } + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/default_4" + } + } + ] + } + }, + "required": [ + "renderings", + "rewrite" + ], + "additionalProperties": false + }, "QuestionableTagRenderingConfigJson": { "description": "A QuestionableTagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nIf the desired tags are missing and a question is defined, a question will be shown instead.", "type": "object", @@ -563,6 +618,7 @@ "additionalProperties": false }, "default<(string|QuestionableTagRenderingConfigJson|{builtin:string;override:any;})[]>": { + "description": "Rewrites and multiplies the given renderings of type T.\n\nFor example:\n\n\n```\n{\n rewrite: {\n sourceString: [\"key\", \"a|b|c\"],\n into: [\n [\"X\", 0]\n [\"Y\", 1],\n [\"Z\", 2]\n ],\n renderings: {\n \"key\":\"a|b|c\"\n }\n }\n}\n```\nwill result in _three_ copies (as the values to rewrite into have three values, namely:\n\n[\n {\n // The first pair: key --> X, a|b|c --> 0\n \"X\": 0\n },\n {\n \"Y\": 1\n },\n {\n \"Z\": 2\n }\n\n]", "type": "object", "properties": { "rewrite": { @@ -653,6 +709,7 @@ "type": "object", "properties": { "name": { + "description": "If name is `search`, use \"_first_comment~.*{search}.*\" as osmTags", "type": "string" }, "type": { diff --git a/Docs/Schemas/TilesourceConfigJsonJSC.ts b/Docs/Schemas/TilesourceConfigJsonJSC.ts index e9120cab1a..4cdaad0b5b 100644 --- a/Docs/Schemas/TilesourceConfigJsonJSC.ts +++ b/Docs/Schemas/TilesourceConfigJsonJSC.ts @@ -71,7 +71,7 @@ export default { "type": "object", "properties": { "canonicalDenomination": { - "description": "The canonical value which will be added to the text.\ne.g. \"m\" for meters\nIf the user inputs '42', the canonical value will be added and it'll become '42m'", + "description": "The canonical value which will be added to the value in OSM.\ne.g. \"m\" for meters\nIf the user inputs '42', the canonical value will be added and it'll become '42m'.\n\nImportant: often, _no_ canonical values are expected, e.g. in the case of 'maxspeed' where 'km/h' is the default.\nIn this case, an empty string should be used", "type": "string" }, "canonicalDenominationSingular": { @@ -105,7 +105,7 @@ export default { ] }, "TagRenderingConfigJson": { - "description": "A TagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nFor an _editable_ tagRenerdering, use 'QuestionableTagRenderingConfigJson' instead, which extends this one", + "description": "A TagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nFor an _editable_ tagRendering, use 'QuestionableTagRenderingConfigJson' instead, which extends this one", "type": "object", "properties": { "id": { @@ -212,7 +212,7 @@ export default { "type": "object", "properties": { "location": { - "description": "All the locations that this point should be rendered at.\nUsing `location: [\"point\", \"centroid\"] will always render centerpoint", + "description": "All the locations that this point should be rendered at.\nUsing `location: [\"point\", \"centroid\"] will always render centerpoint.\n'projected_centerpoint' will show an item on the line itself, near the middle of the line. (LineStrings only)", "type": "array", "items": { "type": "string" @@ -353,7 +353,7 @@ export default { ] }, "fill": { - "description": "Wehter or not to fill polygons", + "description": "Whether or not to fill polygons", "anyOf": [ { "$ref": "#/definitions/TagRenderingConfigJson" @@ -391,6 +391,60 @@ export default { } } }, + "default": { + "description": "Rewrites and multiplies the given renderings of type T.\n\nFor example:\n\n\n```\n{\n rewrite: {\n sourceString: [\"key\", \"a|b|c\"],\n into: [\n [\"X\", 0]\n [\"Y\", 1],\n [\"Z\", 2]\n ],\n renderings: {\n \"key\":\"a|b|c\"\n }\n }\n}\n```\nwill result in _three_ copies (as the values to rewrite into have three values, namely:\n\n[\n {\n // The first pair: key --> X, a|b|c --> 0\n \"X\": 0\n },\n {\n \"Y\": 1\n },\n {\n \"Z\": 2\n }\n\n]", + "type": "object", + "properties": { + "rewrite": { + "type": "object", + "properties": { + "sourceString": { + "type": "array", + "items": { + "type": "string" + } + }, + "into": { + "type": "array", + "items": { + "type": "array", + "items": {} + } + } + }, + "required": [ + "into", + "sourceString" + ] + }, + "renderings": { + "anyOf": [ + { + "$ref": "#/definitions/default_4" + }, + { + "$ref": "#/definitions/default_5" + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/default_5" + } + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/default_4" + } + } + ] + } + }, + "required": [ + "renderings", + "rewrite" + ] + }, "QuestionableTagRenderingConfigJson": { "description": "A QuestionableTagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nIf the desired tags are missing and a question is defined, a question will be shown instead.", "type": "object", @@ -556,6 +610,7 @@ export default { } }, "default<(string|QuestionableTagRenderingConfigJson|{builtin:string;override:any;})[]>": { + "description": "Rewrites and multiplies the given renderings of type T.\n\nFor example:\n\n\n```\n{\n rewrite: {\n sourceString: [\"key\", \"a|b|c\"],\n into: [\n [\"X\", 0]\n [\"Y\", 1],\n [\"Z\", 2]\n ],\n renderings: {\n \"key\":\"a|b|c\"\n }\n }\n}\n```\nwill result in _three_ copies (as the values to rewrite into have three values, namely:\n\n[\n {\n // The first pair: key --> X, a|b|c --> 0\n \"X\": 0\n },\n {\n \"Y\": 1\n },\n {\n \"Z\": 2\n }\n\n]", "type": "object", "properties": { "rewrite": { @@ -645,6 +700,7 @@ export default { "type": "object", "properties": { "name": { + "description": "If name is `search`, use \"_first_comment~.*{search}.*\" as osmTags", "type": "string" }, "type": { diff --git a/Docs/Schemas/UnitConfigJson.schema.json b/Docs/Schemas/UnitConfigJson.schema.json index a8af51f40a..0941241c7d 100644 --- a/Docs/Schemas/UnitConfigJson.schema.json +++ b/Docs/Schemas/UnitConfigJson.schema.json @@ -61,7 +61,7 @@ "type": "object", "properties": { "canonicalDenomination": { - "description": "The canonical value which will be added to the text.\ne.g. \"m\" for meters\nIf the user inputs '42', the canonical value will be added and it'll become '42m'", + "description": "The canonical value which will be added to the value in OSM.\ne.g. \"m\" for meters\nIf the user inputs '42', the canonical value will be added and it'll become '42m'.\n\nImportant: often, _no_ canonical values are expected, e.g. in the case of 'maxspeed' where 'km/h' is the default.\nIn this case, an empty string should be used", "type": "string" }, "canonicalDenominationSingular": { diff --git a/Docs/Schemas/UnitConfigJsonJSC.ts b/Docs/Schemas/UnitConfigJsonJSC.ts index 8c141bffe5..27a62b6b27 100644 --- a/Docs/Schemas/UnitConfigJsonJSC.ts +++ b/Docs/Schemas/UnitConfigJsonJSC.ts @@ -60,7 +60,7 @@ export default { "type": "object", "properties": { "canonicalDenomination": { - "description": "The canonical value which will be added to the text.\ne.g. \"m\" for meters\nIf the user inputs '42', the canonical value will be added and it'll become '42m'", + "description": "The canonical value which will be added to the value in OSM.\ne.g. \"m\" for meters\nIf the user inputs '42', the canonical value will be added and it'll become '42m'.\n\nImportant: often, _no_ canonical values are expected, e.g. in the case of 'maxspeed' where 'km/h' is the default.\nIn this case, an empty string should be used", "type": "string" }, "canonicalDenominationSingular": { diff --git a/assets/layoutconfigmeta.json b/assets/layoutconfigmeta.json index d8bc6cfbb5..fd2565ce9f 100644 --- a/assets/layoutconfigmeta.json +++ b/assets/layoutconfigmeta.json @@ -8845,6 +8845,16 @@ ], "type": "array" }, + { + "path": [ + "layers", + "filter", + "options", + "fields", + "name" + ], + "type": "string" + }, { "path": [ "layers",