Regenerate schema files

This commit is contained in:
Pieter Vander Vennet 2022-01-26 21:48:02 +01:00
parent e547654b2e
commit 0505a77606
14 changed files with 396 additions and 165 deletions

View file

@ -21,6 +21,23 @@
"type": "string"
}
]
},
"fields": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"type": {
"type": "string"
}
},
"required": [
"name"
]
}
}
},
"required": [

View file

@ -21,6 +21,23 @@ export default {
"type": "string"
}
]
},
"fields": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"type": {
"type": "string"
}
},
"required": [
"name"
]
}
}
},
"required": [

View file

@ -96,7 +96,7 @@
]
},
"calculatedTags": {
"description": "A list of extra tags to calculate, specified as \"keyToAssignTo=javascript-expression\".\nThere are a few extra functions available. Refer to <a>Docs/CalculatedTags.md</a> for more information\nThe functions will be run in order, e.g.\n[\n \"_max_overlap_m2=Math.max(...feat.overlapsWith(\"someOtherLayer\").map(o => o.overlap))\n \"_max_overlap_ratio=Number(feat._max_overlap_m2)/feat.area\n]",
"description": "A list of extra tags to calculate, specified as \"keyToAssignTo=javascript-expression\".\nThere are a few extra functions available. Refer to <a>Docs/CalculatedTags.md</a> for more information\nThe functions will be run in order, e.g.\n[\n \"_max_overlap_m2=Math.max(...feat.overlapsWith(\"someOtherLayer\").map(o => o.overlap))\n \"_max_overlap_ratio=Number(feat._max_overlap_m2)/feat.area\n]\n\nThe specified tags are evaluated lazily. E.g. if a calculated tag is only used in the popup (e.g. the number of nearby features),\nthe expensive calculation will only be performed then for that feature. This avoids clogging up the contributors PC when all features are loaded.\n\nIf a tag has to be evaluated strictly, use ':=' instead:\n\n[\n\"_some_key:=some_javascript_expression\"\n]",
"type": "array",
"items": {
"type": "string"
@ -134,31 +134,55 @@
]
},
"titleIcons": {
"description": "Small icons shown next to the title.\nIf not specified, the OsmLink and wikipedia links will be used by default.\nUse an empty array to hide them.\nNote that \"defaults\" will insert all the default titleIcons",
"type": "array",
"items": {
"anyOf": [
{
"$ref": "#/definitions/TagRenderingConfigJson"
},
{
"type": "string"
"description": "Small icons shown next to the title.\nIf not specified, the OsmLink and wikipedia links will be used by default.\nUse an empty array to hide them.\nNote that \"defaults\" will insert all the default titleIcons (which are added automatically)",
"anyOf": [
{
"type": "array",
"items": {
"anyOf": [
{
"$ref": "#/definitions/TagRenderingConfigJson"
},
{
"type": "string"
}
]
}
]
}
},
{
"type": "array",
"items": [
{
"type": "string",
"enum": [
"defaults"
]
}
],
"minItems": 1,
"maxItems": 1
}
]
},
"mapRendering": {
"type": "array",
"items": {
"anyOf": [
{
"$ref": "#/definitions/default_3"
},
{
"$ref": "#/definitions/default_4"
"anyOf": [
{
"type": "array",
"items": {
"anyOf": [
{
"$ref": "#/definitions/default_3"
},
{
"$ref": "#/definitions/default_4"
}
]
}
]
}
},
{
"type": "null"
}
]
},
"passAllFeatures": {
"description": "If set, this layer will pass all the features it receives onto the next layer.\nThis is ideal for decoration, e.g. directionss on cameras",
@ -581,12 +605,6 @@
"description": "All the locations that this point should be rendered at.\nUsing `location: [\"point\", \"centroid\"] will always render centerpoint",
"type": "array",
"items": {
"enum": [
"centroid",
"end",
"point",
"start"
],
"type": "string"
}
},
@ -695,7 +713,10 @@
"$ref": "#/definitions/TagRenderingConfigJson"
},
{
"type": "string"
"type": [
"string",
"number"
]
}
]
},
@ -784,6 +805,23 @@
"type": "string"
}
]
},
"fields": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"type": {
"type": "string"
}
},
"required": [
"name"
]
}
}
},
"required": [

View file

@ -96,7 +96,7 @@ export default {
]
},
"calculatedTags": {
"description": "A list of extra tags to calculate, specified as \"keyToAssignTo=javascript-expression\".\nThere are a few extra functions available. Refer to <a>Docs/CalculatedTags.md</a> for more information\nThe functions will be run in order, e.g.\n[\n \"_max_overlap_m2=Math.max(...feat.overlapsWith(\"someOtherLayer\").map(o => o.overlap))\n \"_max_overlap_ratio=Number(feat._max_overlap_m2)/feat.area\n]",
"description": "A list of extra tags to calculate, specified as \"keyToAssignTo=javascript-expression\".\nThere are a few extra functions available. Refer to <a>Docs/CalculatedTags.md</a> for more information\nThe functions will be run in order, e.g.\n[\n \"_max_overlap_m2=Math.max(...feat.overlapsWith(\"someOtherLayer\").map(o => o.overlap))\n \"_max_overlap_ratio=Number(feat._max_overlap_m2)/feat.area\n]\n\nThe specified tags are evaluated lazily. E.g. if a calculated tag is only used in the popup (e.g. the number of nearby features),\nthe expensive calculation will only be performed then for that feature. This avoids clogging up the contributors PC when all features are loaded.\n\nIf a tag has to be evaluated strictly, use ':=' instead:\n\n[\n\"_some_key:=some_javascript_expression\"\n]",
"type": "array",
"items": {
"type": "string"
@ -134,31 +134,55 @@ export default {
]
},
"titleIcons": {
"description": "Small icons shown next to the title.\nIf not specified, the OsmLink and wikipedia links will be used by default.\nUse an empty array to hide them.\nNote that \"defaults\" will insert all the default titleIcons",
"type": "array",
"items": {
"anyOf": [
{
"$ref": "#/definitions/TagRenderingConfigJson"
},
{
"type": "string"
"description": "Small icons shown next to the title.\nIf not specified, the OsmLink and wikipedia links will be used by default.\nUse an empty array to hide them.\nNote that \"defaults\" will insert all the default titleIcons (which are added automatically)",
"anyOf": [
{
"type": "array",
"items": {
"anyOf": [
{
"$ref": "#/definitions/TagRenderingConfigJson"
},
{
"type": "string"
}
]
}
]
}
},
{
"type": "array",
"items": [
{
"type": "string",
"enum": [
"defaults"
]
}
],
"minItems": 1,
"maxItems": 1
}
]
},
"mapRendering": {
"type": "array",
"items": {
"anyOf": [
{
"$ref": "#/definitions/default_3"
},
{
"$ref": "#/definitions/default_4"
"anyOf": [
{
"type": "array",
"items": {
"anyOf": [
{
"$ref": "#/definitions/default_3"
},
{
"$ref": "#/definitions/default_4"
}
]
}
]
}
},
{
"type": "null"
}
]
},
"passAllFeatures": {
"description": "If set, this layer will pass all the features it receives onto the next layer.\nThis is ideal for decoration, e.g. directionss on cameras",
@ -578,12 +602,6 @@ export default {
"description": "All the locations that this point should be rendered at.\nUsing `location: [\"point\", \"centroid\"] will always render centerpoint",
"type": "array",
"items": {
"enum": [
"centroid",
"end",
"point",
"start"
],
"type": "string"
}
},
@ -691,7 +709,10 @@ export default {
"$ref": "#/definitions/TagRenderingConfigJson"
},
{
"type": "string"
"type": [
"string",
"number"
]
}
]
},
@ -779,6 +800,23 @@ export default {
"type": "string"
}
]
},
"fields": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"type": {
"type": "string"
}
},
"required": [
"name"
]
}
}
},
"required": [

View file

@ -134,17 +134,27 @@
},
"clustering": {
"description": "If defined, data will be clustered.\nDefaults to {maxZoom: 16, minNeeded: 500}",
"type": "object",
"properties": {
"maxZoom": {
"description": "All zoom levels above 'maxzoom' are not clustered anymore.\nDefaults to 18",
"type": "number"
"anyOf": [
{
"type": "object",
"properties": {
"maxZoom": {
"description": "All zoom levels above 'maxzoom' are not clustered anymore.\nDefaults to 18",
"type": "number"
},
"minNeededElements": {
"description": "The number of elements per tile needed to start clustering\nIf clustering is defined, defaults to 25",
"type": "number"
}
}
},
"minNeededElements": {
"description": "The number of elements per tile needed to start clustering\nIf clustering is defined, defaults to 25",
"type": "number"
{
"enum": [
false
],
"type": "boolean"
}
}
]
},
"customCss": {
"description": "The URL of a custom CSS stylesheet to modify the layout",
@ -483,12 +493,6 @@
"description": "All the locations that this point should be rendered at.\nUsing `location: [\"point\", \"centroid\"] will always render centerpoint",
"type": "array",
"items": {
"enum": [
"centroid",
"end",
"point",
"start"
],
"type": "string"
}
},
@ -597,7 +601,10 @@
"$ref": "#/definitions/TagRenderingConfigJson"
},
{
"type": "string"
"type": [
"string",
"number"
]
}
]
},
@ -686,6 +693,23 @@
"type": "string"
}
]
},
"fields": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"type": {
"type": "string"
}
},
"required": [
"name"
]
}
}
},
"required": [
@ -937,7 +961,7 @@
]
},
"calculatedTags": {
"description": "A list of extra tags to calculate, specified as \"keyToAssignTo=javascript-expression\".\nThere are a few extra functions available. Refer to <a>Docs/CalculatedTags.md</a> for more information\nThe functions will be run in order, e.g.\n[\n \"_max_overlap_m2=Math.max(...feat.overlapsWith(\"someOtherLayer\").map(o => o.overlap))\n \"_max_overlap_ratio=Number(feat._max_overlap_m2)/feat.area\n]",
"description": "A list of extra tags to calculate, specified as \"keyToAssignTo=javascript-expression\".\nThere are a few extra functions available. Refer to <a>Docs/CalculatedTags.md</a> for more information\nThe functions will be run in order, e.g.\n[\n \"_max_overlap_m2=Math.max(...feat.overlapsWith(\"someOtherLayer\").map(o => o.overlap))\n \"_max_overlap_ratio=Number(feat._max_overlap_m2)/feat.area\n]\n\nThe specified tags are evaluated lazily. E.g. if a calculated tag is only used in the popup (e.g. the number of nearby features),\nthe expensive calculation will only be performed then for that feature. This avoids clogging up the contributors PC when all features are loaded.\n\nIf a tag has to be evaluated strictly, use ':=' instead:\n\n[\n\"_some_key:=some_javascript_expression\"\n]",
"type": "array",
"items": {
"type": "string"
@ -975,31 +999,55 @@
]
},
"titleIcons": {
"description": "Small icons shown next to the title.\nIf not specified, the OsmLink and wikipedia links will be used by default.\nUse an empty array to hide them.\nNote that \"defaults\" will insert all the default titleIcons",
"type": "array",
"items": {
"anyOf": [
{
"$ref": "#/definitions/TagRenderingConfigJson"
},
{
"type": "string"
"description": "Small icons shown next to the title.\nIf not specified, the OsmLink and wikipedia links will be used by default.\nUse an empty array to hide them.\nNote that \"defaults\" will insert all the default titleIcons (which are added automatically)",
"anyOf": [
{
"type": "array",
"items": {
"anyOf": [
{
"$ref": "#/definitions/TagRenderingConfigJson"
},
{
"type": "string"
}
]
}
]
}
},
{
"type": "array",
"items": [
{
"type": "string",
"enum": [
"defaults"
]
}
],
"minItems": 1,
"maxItems": 1
}
]
},
"mapRendering": {
"type": "array",
"items": {
"anyOf": [
{
"$ref": "#/definitions/default_3"
},
{
"$ref": "#/definitions/default_4"
"anyOf": [
{
"type": "array",
"items": {
"anyOf": [
{
"$ref": "#/definitions/default_3"
},
{
"$ref": "#/definitions/default_4"
}
]
}
]
}
},
{
"type": "null"
}
]
},
"passAllFeatures": {
"description": "If set, this layer will pass all the features it receives onto the next layer.\nThis is ideal for decoration, e.g. directionss on cameras",

View file

@ -134,17 +134,27 @@ export default {
},
"clustering": {
"description": "If defined, data will be clustered.\nDefaults to {maxZoom: 16, minNeeded: 500}",
"type": "object",
"properties": {
"maxZoom": {
"description": "All zoom levels above 'maxzoom' are not clustered anymore.\nDefaults to 18",
"type": "number"
"anyOf": [
{
"type": "object",
"properties": {
"maxZoom": {
"description": "All zoom levels above 'maxzoom' are not clustered anymore.\nDefaults to 18",
"type": "number"
},
"minNeededElements": {
"description": "The number of elements per tile needed to start clustering\nIf clustering is defined, defaults to 25",
"type": "number"
}
}
},
"minNeededElements": {
"description": "The number of elements per tile needed to start clustering\nIf clustering is defined, defaults to 25",
"type": "number"
{
"enum": [
false
],
"type": "boolean"
}
}
]
},
"customCss": {
"description": "The URL of a custom CSS stylesheet to modify the layout",
@ -480,12 +490,6 @@ export default {
"description": "All the locations that this point should be rendered at.\nUsing `location: [\"point\", \"centroid\"] will always render centerpoint",
"type": "array",
"items": {
"enum": [
"centroid",
"end",
"point",
"start"
],
"type": "string"
}
},
@ -593,7 +597,10 @@ export default {
"$ref": "#/definitions/TagRenderingConfigJson"
},
{
"type": "string"
"type": [
"string",
"number"
]
}
]
},
@ -681,6 +688,23 @@ export default {
"type": "string"
}
]
},
"fields": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"type": {
"type": "string"
}
},
"required": [
"name"
]
}
}
},
"required": [
@ -927,7 +951,7 @@ export default {
]
},
"calculatedTags": {
"description": "A list of extra tags to calculate, specified as \"keyToAssignTo=javascript-expression\".\nThere are a few extra functions available. Refer to <a>Docs/CalculatedTags.md</a> for more information\nThe functions will be run in order, e.g.\n[\n \"_max_overlap_m2=Math.max(...feat.overlapsWith(\"someOtherLayer\").map(o => o.overlap))\n \"_max_overlap_ratio=Number(feat._max_overlap_m2)/feat.area\n]",
"description": "A list of extra tags to calculate, specified as \"keyToAssignTo=javascript-expression\".\nThere are a few extra functions available. Refer to <a>Docs/CalculatedTags.md</a> for more information\nThe functions will be run in order, e.g.\n[\n \"_max_overlap_m2=Math.max(...feat.overlapsWith(\"someOtherLayer\").map(o => o.overlap))\n \"_max_overlap_ratio=Number(feat._max_overlap_m2)/feat.area\n]\n\nThe specified tags are evaluated lazily. E.g. if a calculated tag is only used in the popup (e.g. the number of nearby features),\nthe expensive calculation will only be performed then for that feature. This avoids clogging up the contributors PC when all features are loaded.\n\nIf a tag has to be evaluated strictly, use ':=' instead:\n\n[\n\"_some_key:=some_javascript_expression\"\n]",
"type": "array",
"items": {
"type": "string"
@ -965,31 +989,55 @@ export default {
]
},
"titleIcons": {
"description": "Small icons shown next to the title.\nIf not specified, the OsmLink and wikipedia links will be used by default.\nUse an empty array to hide them.\nNote that \"defaults\" will insert all the default titleIcons",
"type": "array",
"items": {
"anyOf": [
{
"$ref": "#/definitions/TagRenderingConfigJson"
},
{
"type": "string"
"description": "Small icons shown next to the title.\nIf not specified, the OsmLink and wikipedia links will be used by default.\nUse an empty array to hide them.\nNote that \"defaults\" will insert all the default titleIcons (which are added automatically)",
"anyOf": [
{
"type": "array",
"items": {
"anyOf": [
{
"$ref": "#/definitions/TagRenderingConfigJson"
},
{
"type": "string"
}
]
}
]
}
},
{
"type": "array",
"items": [
{
"type": "string",
"enum": [
"defaults"
]
}
],
"minItems": 1,
"maxItems": 1
}
]
},
"mapRendering": {
"type": "array",
"items": {
"anyOf": [
{
"$ref": "#/definitions/default_3"
},
{
"$ref": "#/definitions/default_4"
"anyOf": [
{
"type": "array",
"items": {
"anyOf": [
{
"$ref": "#/definitions/default_3"
},
{
"$ref": "#/definitions/default_4"
}
]
}
]
}
},
{
"type": "null"
}
]
},
"passAllFeatures": {
"description": "If set, this layer will pass all the features it receives onto the next layer.\nThis is ideal for decoration, e.g. directionss on cameras",

View file

@ -20,7 +20,10 @@
"$ref": "#/definitions/TagRenderingConfigJson"
},
{
"type": "string"
"type": [
"string",
"number"
]
}
]
},

View file

@ -20,7 +20,10 @@ export default {
"$ref": "#/definitions/TagRenderingConfigJson"
},
{
"type": "string"
"type": [
"string",
"number"
]
}
]
},

View file

@ -6,12 +6,6 @@
"description": "All the locations that this point should be rendered at.\nUsing `location: [\"point\", \"centroid\"] will always render centerpoint",
"type": "array",
"items": {
"enum": [
"centroid",
"end",
"point",
"start"
],
"type": "string"
}
},

View file

@ -6,12 +6,6 @@ export default {
"description": "All the locations that this point should be rendered at.\nUsing `location: [\"point\", \"centroid\"] will always render centerpoint",
"type": "array",
"items": {
"enum": [
"centroid",
"end",
"point",
"start"
],
"type": "string"
}
},

View file

@ -246,12 +246,6 @@
"description": "All the locations that this point should be rendered at.\nUsing `location: [\"point\", \"centroid\"] will always render centerpoint",
"type": "array",
"items": {
"enum": [
"centroid",
"end",
"point",
"start"
],
"type": "string"
}
},
@ -360,7 +354,10 @@
"$ref": "#/definitions/TagRenderingConfigJson"
},
{
"type": "string"
"type": [
"string",
"number"
]
}
]
},
@ -449,6 +446,23 @@
"type": "string"
}
]
},
"fields": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"type": {
"type": "string"
}
},
"required": [
"name"
]
}
}
},
"required": [

View file

@ -243,12 +243,6 @@ export default {
"description": "All the locations that this point should be rendered at.\nUsing `location: [\"point\", \"centroid\"] will always render centerpoint",
"type": "array",
"items": {
"enum": [
"centroid",
"end",
"point",
"start"
],
"type": "string"
}
},
@ -356,7 +350,10 @@ export default {
"$ref": "#/definitions/TagRenderingConfigJson"
},
{
"type": "string"
"type": [
"string",
"number"
]
}
]
},
@ -444,6 +441,23 @@ export default {
"type": "string"
}
]
},
"fields": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"type": {
"type": "string"
}
},
"required": [
"name"
]
}
}
},
"required": [

View file

@ -165,6 +165,7 @@ name | default | description
------ | --------- | -------------
key | opening_hours | The tagkey from which the table is constructed.
prefix | _empty string_ | Remove this string from the start of the value before parsing. __Note: use `&LPARENs` to
indicate `(` if needed__
postfix | _empty string_ | Remove this string from the end of the value before parsing. __Note: use `&RPARENs` to
indicate `)` if needed__
@ -492,7 +493,9 @@ tags_to_apply | _undefined_ | A specification of the tags to apply
message | _undefined_ | The text to show to the contributor
image | _undefined_ | An image to show to the contributor on the button
id_of_object_to_apply_this_one | _undefined_ | If specified, applies the the tags onto _
another_ object. The id will be read from properties[id_of_object_to_apply_this_one] of the selected object. The tags are still calculated based on the tags of the _
another_ object. The id will be read from properties[id_of_object_to_apply_this_one] of the selected object. The tags
are still calculated based on the tags of the _
selected_ element
#### Example usage of tag_apply

View file

@ -125,8 +125,6 @@ export default class SimpleMetaTaggers {
return changed
}
)
public static readonly lazyTags: string[] = [].concat(...SimpleMetaTaggers.metatags.filter(tagger => tagger.isLazy)
.map(tagger => tagger.keys));
private static readonly cardinalDirections = {
N: 0, NNE: 22.5, NE: 45, ENE: 67.5,
E: 90, ESE: 112.5, SE: 135, SSE: 157.5,
@ -443,6 +441,8 @@ export default class SimpleMetaTaggers {
SimpleMetaTaggers.geometryType
];
public static readonly lazyTags: string[] = [].concat(...SimpleMetaTaggers.metatags.filter(tagger => tagger.isLazy)
.map(tagger => tagger.keys));
/**
* Edits the given object to rewrite 'both'-tagging into a 'left-right' tagging scheme.