Studio: first draft of layer editing
This commit is contained in:
parent
9661ade80c
commit
069767b9c7
43 changed files with 45374 additions and 5403 deletions
|
@ -3,11 +3,11 @@
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"id": {
|
"id": {
|
||||||
"description": "The id of this layer.\nThis should be a simple, lowercase, human readable string that is used to identify the layer.",
|
"description": "The id of this layer.\nThis should be a simple, lowercase, human readable string that is used to identify the layer.\n\ngroup: basic\nquestion: What is the identifier of this layer?",
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"name": {
|
"name": {
|
||||||
"description": "The name of this layer\nUsed in the layer control panel and the 'Personal theme'.\n\nIf not given, will be hidden (and thus not toggable) in the layer control",
|
"description": "Used in the layer control panel to toggle a layer on and of.\n\nifunset: This will hide the layer in the layer control, making it not filterable and not toggleable\n\ngroup: basic\nquestion: What is the name of this layer?",
|
||||||
"anyOf": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/Record<string,string>"
|
"$ref": "#/definitions/Record<string,string>"
|
||||||
|
@ -18,7 +18,7 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"description": {
|
"description": {
|
||||||
"description": "A description for this layer.\nShown in the layer selections and in the personel theme",
|
"description": "A description for the features shown in this layer.\nThis often resembles the introduction of the wiki.osm.org-page for this feature.\n\ngroup: basic\nquestion: How would you describe the features that are shown on this layer?",
|
||||||
"anyOf": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/Record<string,string>"
|
"$ref": "#/definitions/Record<string,string>"
|
||||||
|
@ -85,18 +85,18 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"calculatedTags": {
|
"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]\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]",
|
"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]\n\ngroup: advanced",
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"doNotDownload": {
|
"doNotDownload": {
|
||||||
"description": "If set, this layer will not query overpass; but it'll still match the tags above which are by chance returned by other layers.\nWorks well together with 'passAllFeatures', to add decoration",
|
"description": "If set, this layer will not query overpass; but it'll still match the tags above which are by chance returned by other layers.\nWorks well together with 'passAllFeatures', to add decoration\n\ngroup: advanced",
|
||||||
"type": "boolean"
|
"type": "boolean"
|
||||||
},
|
},
|
||||||
"isShown": {
|
"isShown": {
|
||||||
"description": "If set, only features matching this extra tag will be shown.\nThis is useful to hide certain features from view.\n\nImportant: hiding features does not work dynamically, but is only calculated when the data is first renders.\nThis implies that it is not possible to hide a feature after a tagging change\n\nThe default value is 'yes'",
|
"description": "If set, only features matching this extra tag will be shown.\nThis is useful to hide certain features from view.\n\nThe default value is 'yes'\n\ngroup: advanced",
|
||||||
"anyOf": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/AndTagConfigJson",
|
"$ref": "#/definitions/AndTagConfigJson",
|
||||||
|
@ -112,23 +112,23 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"forceLoad": {
|
"forceLoad": {
|
||||||
"description": "Advanced option - might be set by the theme compiler\n\nIf true, this data will _always_ be loaded, even if the theme is disabled",
|
"description": "Advanced option - might be set by the theme compiler\n\nIf true, this data will _always_ be loaded, even if the theme is disabled\n\ngroup: advanced",
|
||||||
"type": "boolean"
|
"type": "boolean"
|
||||||
},
|
},
|
||||||
"minzoom": {
|
"minzoom": {
|
||||||
"description": "The minimum needed zoomlevel required before loading of the data start\nDefault: 0",
|
"description": "The minimum needed zoomlevel required to start loading and displaying the data.\nThis can be used to only show common features (e.g. a bicycle parking) only when the map is zoomed in very much (17).\nThis prevents cluttering the map with thousands of parkings if one is looking to an entire city.\n\nDefault: 0\n\ngroup: basic\nquestion: At what zoom level should features of the layer be shown?\nifunset: Always load this layer, even if the entire world is in view.",
|
||||||
"type": "number"
|
"type": "number"
|
||||||
},
|
},
|
||||||
"shownByDefault": {
|
"shownByDefault": {
|
||||||
"description": "Indicates if this layer is shown by default;\ncan be used to hide a layer from start, or to load the layer but only to show it where appropriate (e.g. for snapping to it)",
|
"description": "Indicates if this layer is shown by default;\ncan be used to hide a layer from start, or to load the layer but only to show it where appropriate (e.g. for snapping to it)\n\ngroup: advanced",
|
||||||
"type": "boolean"
|
"type": "boolean"
|
||||||
},
|
},
|
||||||
"minzoomVisible": {
|
"minzoomVisible": {
|
||||||
"description": "The zoom level at which point the data is hidden again\nDefault: 100 (thus: always visible",
|
"description": "The zoom level at which point the data is hidden again\nDefault: 100 (thus: always visible\n\ngroup: advanced",
|
||||||
"type": "number"
|
"type": "number"
|
||||||
},
|
},
|
||||||
"title": {
|
"title": {
|
||||||
"description": "The title shown in a popup for elements of this layer.",
|
"description": "The title shown in a popup for elements of this layer.\n\ngroup: infobox",
|
||||||
"anyOf": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||||
|
@ -139,7 +139,7 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"titleIcons": {
|
"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 (which are added automatically)\n\nType: icon[]",
|
"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)\n\nType: icon[]\ngroup: infobox",
|
||||||
"anyOf": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"type": "array",
|
"type": "array",
|
||||||
|
@ -170,7 +170,7 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"mapRendering": {
|
"mapRendering": {
|
||||||
"description": "Visualisation of the items on the map",
|
"description": "Visualisation of the items on the map\n\ngroup: maprendering",
|
||||||
"anyOf": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"type": "array",
|
"type": "array",
|
||||||
|
@ -194,11 +194,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"passAllFeatures": {
|
"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",
|
"description": "If set, this layer will pass all the features it receives onto the next layer.\nThis is ideal for decoration, e.g. directions on cameras\n\ngroup: advanced",
|
||||||
"type": "boolean"
|
"type": "boolean"
|
||||||
},
|
},
|
||||||
"presets": {
|
"presets": {
|
||||||
"description": "Presets for this layer.\nA preset shows up when clicking the map on a without data (or when right-clicking/long-pressing);\nit will prompt the user to add a new point.\n\nThe most important aspect are the tags, which define which tags the new point will have;\nThe title is shown in the dialog, along with the first sentence of the description.\n\nUpon confirmation, the full description is shown beneath the buttons - perfect to add pictures and examples.\n\nNote: the icon of the preset is determined automatically based on the tags and the icon above. Don't worry about that!\nNB: if no presets are defined, the popup to add new points doesn't show up at all",
|
"description": "Presets for this layer.\nA preset shows up when clicking the map on a without data (or when right-clicking/long-pressing);\nit will prompt the user to add a new point.\n\nThe most important aspect are the tags, which define which tags the new point will have;\nThe title is shown in the dialog, along with the first sentence of the description.\n\nUpon confirmation, the full description is shown beneath the buttons - perfect to add pictures and examples.\n\nNote: the icon of the preset is determined automatically based on the tags and the icon above. Don't worry about that!\nNB: if no presets are defined, the popup to add new points doesn't show up at all\n\ngroup: basic",
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
|
@ -295,7 +295,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"tagRenderings": {
|
"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, ...\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",
|
"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\n\ngroup: tagrenderings",
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
"anyOf": [
|
"anyOf": [
|
||||||
|
@ -355,7 +355,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"filter": {
|
"filter": {
|
||||||
"description": "All the extra questions for filtering.\nIf a string is given, mapComplete will search in 'filters.json' for the appropriate filter or will try to parse it as `layername.filterid` and us that one",
|
"description": "All the extra questions for filtering.\nIf a string is given, mapComplete will search in 'filters.json' for the appropriate filter or will try to parse it as `layername.filterid` and us that one\n\ngroup: filters",
|
||||||
"anyOf": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"type": "array",
|
"type": "array",
|
||||||
|
@ -384,7 +384,7 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"deletion": {
|
"deletion": {
|
||||||
"description": "This block defines under what circumstances the delete dialog is shown for objects of this layer.\nIf set, a dialog is shown to the user to (soft) delete the point.\nThe dialog is built to be user friendly and to prevent mistakes.\nIf deletion is not possible, the dialog will hide itself and show the reason of non-deletability instead.\n\nTo configure, the following values are possible:\n\n- false: never ever show the delete button\n- true: show the default delete button\n- undefined: use the mapcomplete default to show deletion or not. Currently, this is the same as 'false' but this will change in the future\n- or: a hash with options (see below)\n\n The delete dialog\n =================\n\n\n\n#### Hard deletion if enough experience\n\nA feature can only be deleted from OpenStreetMap by mapcomplete if:\n\n- It is a node\n- No ways or relations use the node\n- The logged-in user has enough experience OR the user is the only one to have edited the point previously\n- The logged-in user has no unread messages (or has a ton of experience)\n- The user did not select one of the 'non-delete-options' (see below)\n\nIn all other cases, a 'soft deletion' is used.\n\n#### Soft deletion\n\nA 'soft deletion' is when the point isn't deleted from OSM but retagged so that it'll won't how up in the mapcomplete theme anymore.\nThis makes it look like it was deleted, without doing damage. A fixme will be added to the point.\n\nNote that a soft deletion is _only_ possible if these tags are provided by the theme creator, as they'll be different for every theme\n\n#### No-delete options\n\nIn some cases, the contributor might want to delete something for the wrong reason (e.g. someone who wants to have a path removed \"because the path is on their private property\").\nHowever, the path exists in reality and should thus be on OSM - otherwise the next contributor will pass by and notice \"hey, there is a path missing here! Let me redraw it in OSM!)\n\nThe correct approach is to retag the feature in such a way that it is semantically correct *and* that it doesn't show up on the theme anymore.\nA no-delete option is offered as 'reason to delete it', but secretly retags.",
|
"description": "This block defines under what circumstances the delete dialog is shown for objects of this layer.\nIf set, a dialog is shown to the user to (soft) delete the point.\nThe dialog is built to be user friendly and to prevent mistakes.\nIf deletion is not possible, the dialog will hide itself and show the reason of non-deletability instead.\n\nTo configure, the following values are possible:\n\n- false: never ever show the delete button\n- true: show the default delete button\n- undefined: use the mapcomplete default to show deletion or not. Currently, this is the same as 'false' but this will change in the future\n- or: a hash with options (see below)\n\n The delete dialog\n =================\n\n\n\n#### Hard deletion if enough experience\n\nA feature can only be deleted from OpenStreetMap by mapcomplete if:\n\n- It is a node\n- No ways or relations use the node\n- The logged-in user has enough experience OR the user is the only one to have edited the point previously\n- The logged-in user has no unread messages (or has a ton of experience)\n- The user did not select one of the 'non-delete-options' (see below)\n\nIn all other cases, a 'soft deletion' is used.\n\n#### Soft deletion\n\nA 'soft deletion' is when the point isn't deleted from OSM but retagged so that it'll won't how up in the mapcomplete theme anymore.\nThis makes it look like it was deleted, without doing damage. A fixme will be added to the point.\n\nNote that a soft deletion is _only_ possible if these tags are provided by the theme creator, as they'll be different for every theme\n\n#### No-delete options\n\nIn some cases, the contributor might want to delete something for the wrong reason (e.g. someone who wants to have a path removed \"because the path is on their private property\").\nHowever, the path exists in reality and should thus be on OSM - otherwise the next contributor will pass by and notice \"hey, there is a path missing here! Let me redraw it in OSM!)\n\nThe correct approach is to retag the feature in such a way that it is semantically correct *and* that it doesn't show up on the theme anymore.\nA no-delete option is offered as 'reason to delete it', but secretly retags.\n\ngroup: editing",
|
||||||
"anyOf": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/DeleteConfigJson"
|
"$ref": "#/definitions/DeleteConfigJson"
|
||||||
|
@ -395,7 +395,7 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"allowMove": {
|
"allowMove": {
|
||||||
"description": "Indicates if a point can be moved and configures the modalities.\n\nA feature can be moved by MapComplete if:\n\n- It is a point\n- The point is _not_ part of a way or a a relation.\n\nOff by default. Can be enabled by setting this flag or by configuring.",
|
"description": "Indicates if a point can be moved and configures the modalities.\n\nA feature can be moved by MapComplete if:\n\n- It is a point\n- The point is _not_ part of a way or a a relation.\n\nOff by default. Can be enabled by setting this flag or by configuring.\n\ngroup: editing",
|
||||||
"anyOf": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/default_3"
|
"$ref": "#/definitions/default_3"
|
||||||
|
@ -406,7 +406,7 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"allowSplit": {
|
"allowSplit": {
|
||||||
"description": "If set, a 'split this way' button is shown on objects rendered as LineStrings, e.g. highways.\n\nIf the way is part of a relation, MapComplete will attempt to update this relation as well",
|
"description": "If set, a 'split this way' button is shown on objects rendered as LineStrings, e.g. highways.\n\nIf the way is part of a relation, MapComplete will attempt to update this relation as well\n\ngroup: editing",
|
||||||
"type": "boolean"
|
"type": "boolean"
|
||||||
},
|
},
|
||||||
"units": {
|
"units": {
|
||||||
|
@ -416,7 +416,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"syncSelection": {
|
"syncSelection": {
|
||||||
"description": "If set, synchronizes whether or not this layer is enabled.\n\nno: Do not sync at all, always revert to default\nlocal: keep selection on local storage\ntheme-only: sync via OSM, but this layer will only be toggled in this theme\nglobal: all layers with this ID will be synced accross all themes",
|
"description": "If set, synchronizes whether or not this layer is enabled.\n\nno: Do not sync at all, always revert to default\nlocal: keep selection on local storage\ntheme-only: sync via OSM, but this layer will only be toggled in this theme\nglobal: all layers with this ID will be synced accross all themes\n\ngroup: advanced",
|
||||||
"enum": [
|
"enum": [
|
||||||
"global",
|
"global",
|
||||||
"local",
|
"local",
|
||||||
|
@ -426,8 +426,16 @@
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"#": {
|
"#": {
|
||||||
"description": "Used for comments and/or to disable some checks\n\nno-question-hint-check: disables a check in MiscTagRenderingChecks which complains about 'div', 'span' or 'class=subtle'-HTML elements in the tagRendering",
|
"description": "Used for comments and/or to disable some checks\n\nno-question-hint-check: disables a check in MiscTagRenderingChecks which complains about 'div', 'span' or 'class=subtle'-HTML elements in the tagRendering\n\ngroup: special",
|
||||||
"type": "string"
|
"type": "string"
|
||||||
|
},
|
||||||
|
"popupInFloatover": {
|
||||||
|
"description": "If set, open the selectedElementView in a floatOver instead of on the right\n\ngroup: advanced",
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
|
"fullNodeDatabase": {
|
||||||
|
"description": "_Set automatically by MapComplete, please ignore_\n\ngroup: hidden",
|
||||||
|
"type": "boolean"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"required": [
|
"required": [
|
||||||
|
@ -596,7 +604,7 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"description": {
|
"description": {
|
||||||
"description": "A human-readable text explaining what this tagRendering does",
|
"description": "A human-readable text explaining what this tagRendering does.\nMostly used for the shared tagrenderings",
|
||||||
"anyOf": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/Record<string,string>"
|
"$ref": "#/definitions/Record<string,string>"
|
||||||
|
@ -755,7 +763,15 @@
|
||||||
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation"
|
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation"
|
||||||
},
|
},
|
||||||
"then": {
|
"then": {
|
||||||
"description": "Shown if the 'if is fulfilled\nType: rendered"
|
"description": "Shown if the 'if is fulfilled\nType: rendered",
|
||||||
|
"anyOf": [
|
||||||
|
{
|
||||||
|
"$ref": "#/definitions/Record<string,string>"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"icon": {
|
"icon": {
|
||||||
"description": "An extra icon supporting the choice\nType: icon",
|
"description": "An extra icon supporting the choice\nType: icon",
|
||||||
|
@ -1072,23 +1088,8 @@
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"fill": {
|
|
||||||
"description": "Whether or not to fill polygons",
|
|
||||||
"anyOf": [
|
|
||||||
{
|
|
||||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"enum": [
|
|
||||||
"no",
|
|
||||||
"yes"
|
|
||||||
],
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"fillColor": {
|
"fillColor": {
|
||||||
"description": "The color to fill a polygon with.\nIf undefined, this will be slightly more opaque version of the stroke line",
|
"description": "The color to fill a polygon with.\nIf undefined, this will be slightly more opaque version of the stroke line.\nUse '#00000000' to make the fill invisible",
|
||||||
"anyOf": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||||
|
@ -1269,7 +1270,7 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"description": {
|
"description": {
|
||||||
"description": "A human-readable text explaining what this tagRendering does",
|
"description": "A human-readable text explaining what this tagRendering does.\nMostly used for the shared tagrenderings",
|
||||||
"anyOf": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/Record<string,string>"
|
"$ref": "#/definitions/Record<string,string>"
|
||||||
|
@ -1452,7 +1453,7 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"description": {
|
"description": {
|
||||||
"description": "A human-readable text explaining what this tagRendering does",
|
"description": "A human-readable text explaining what this tagRendering does.\nMostly used for the shared tagrenderings",
|
||||||
"anyOf": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/Record<string,string>"
|
"$ref": "#/definitions/Record<string,string>"
|
||||||
|
@ -1752,7 +1753,7 @@
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"appliesToKey": {
|
"appliesToKey": {
|
||||||
"description": "Every key from this list will be normalized.\n\nTo render a united value properly, use",
|
"description": "Every key from this list will be normalized.\n\nTo render the value properly (with a human readable denomination), use `{canonical(<key>)}`",
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
|
|
|
@ -3,11 +3,11 @@ export default {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"id": {
|
"id": {
|
||||||
"description": "The id of this layer.\nThis should be a simple, lowercase, human readable string that is used to identify the layer.",
|
"description": "The id of this layer.\nThis should be a simple, lowercase, human readable string that is used to identify the layer.\n\ngroup: basic\nquestion: What is the identifier of this layer?",
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"name": {
|
"name": {
|
||||||
"description": "The name of this layer\nUsed in the layer control panel and the 'Personal theme'.\n\nIf not given, will be hidden (and thus not toggable) in the layer control",
|
"description": "Used in the layer control panel to toggle a layer on and of.\n\nifunset: This will hide the layer in the layer control, making it not filterable and not toggleable\n\ngroup: basic\nquestion: What is the name of this layer?",
|
||||||
"anyOf": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/Record<string,string>"
|
"$ref": "#/definitions/Record<string,string>"
|
||||||
|
@ -18,7 +18,7 @@ export default {
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"description": {
|
"description": {
|
||||||
"description": "A description for this layer.\nShown in the layer selections and in the personel theme",
|
"description": "A description for the features shown in this layer.\nThis often resembles the introduction of the wiki.osm.org-page for this feature.\n\ngroup: basic\nquestion: How would you describe the features that are shown on this layer?",
|
||||||
"anyOf": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/Record<string,string>"
|
"$ref": "#/definitions/Record<string,string>"
|
||||||
|
@ -85,18 +85,18 @@ export default {
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"calculatedTags": {
|
"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]\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]",
|
"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]\n\ngroup: advanced",
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"doNotDownload": {
|
"doNotDownload": {
|
||||||
"description": "If set, this layer will not query overpass; but it'll still match the tags above which are by chance returned by other layers.\nWorks well together with 'passAllFeatures', to add decoration",
|
"description": "If set, this layer will not query overpass; but it'll still match the tags above which are by chance returned by other layers.\nWorks well together with 'passAllFeatures', to add decoration\n\ngroup: advanced",
|
||||||
"type": "boolean"
|
"type": "boolean"
|
||||||
},
|
},
|
||||||
"isShown": {
|
"isShown": {
|
||||||
"description": "If set, only features matching this extra tag will be shown.\nThis is useful to hide certain features from view.\n\nImportant: hiding features does not work dynamically, but is only calculated when the data is first renders.\nThis implies that it is not possible to hide a feature after a tagging change\n\nThe default value is 'yes'",
|
"description": "If set, only features matching this extra tag will be shown.\nThis is useful to hide certain features from view.\n\nThe default value is 'yes'\n\ngroup: advanced",
|
||||||
"anyOf": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/AndTagConfigJson",
|
"$ref": "#/definitions/AndTagConfigJson",
|
||||||
|
@ -112,23 +112,23 @@ export default {
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"forceLoad": {
|
"forceLoad": {
|
||||||
"description": "Advanced option - might be set by the theme compiler\n\nIf true, this data will _always_ be loaded, even if the theme is disabled",
|
"description": "Advanced option - might be set by the theme compiler\n\nIf true, this data will _always_ be loaded, even if the theme is disabled\n\ngroup: advanced",
|
||||||
"type": "boolean"
|
"type": "boolean"
|
||||||
},
|
},
|
||||||
"minzoom": {
|
"minzoom": {
|
||||||
"description": "The minimum needed zoomlevel required before loading of the data start\nDefault: 0",
|
"description": "The minimum needed zoomlevel required to start loading and displaying the data.\nThis can be used to only show common features (e.g. a bicycle parking) only when the map is zoomed in very much (17).\nThis prevents cluttering the map with thousands of parkings if one is looking to an entire city.\n\nDefault: 0\n\ngroup: basic\nquestion: At what zoom level should features of the layer be shown?\nifunset: Always load this layer, even if the entire world is in view.",
|
||||||
"type": "number"
|
"type": "number"
|
||||||
},
|
},
|
||||||
"shownByDefault": {
|
"shownByDefault": {
|
||||||
"description": "Indicates if this layer is shown by default;\ncan be used to hide a layer from start, or to load the layer but only to show it where appropriate (e.g. for snapping to it)",
|
"description": "Indicates if this layer is shown by default;\ncan be used to hide a layer from start, or to load the layer but only to show it where appropriate (e.g. for snapping to it)\n\ngroup: advanced",
|
||||||
"type": "boolean"
|
"type": "boolean"
|
||||||
},
|
},
|
||||||
"minzoomVisible": {
|
"minzoomVisible": {
|
||||||
"description": "The zoom level at which point the data is hidden again\nDefault: 100 (thus: always visible",
|
"description": "The zoom level at which point the data is hidden again\nDefault: 100 (thus: always visible\n\ngroup: advanced",
|
||||||
"type": "number"
|
"type": "number"
|
||||||
},
|
},
|
||||||
"title": {
|
"title": {
|
||||||
"description": "The title shown in a popup for elements of this layer.",
|
"description": "The title shown in a popup for elements of this layer.\n\ngroup: infobox",
|
||||||
"anyOf": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||||
|
@ -139,7 +139,7 @@ export default {
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"titleIcons": {
|
"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 (which are added automatically)\n\nType: icon[]",
|
"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)\n\nType: icon[]\ngroup: infobox",
|
||||||
"anyOf": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"type": "array",
|
"type": "array",
|
||||||
|
@ -170,7 +170,7 @@ export default {
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"mapRendering": {
|
"mapRendering": {
|
||||||
"description": "Visualisation of the items on the map",
|
"description": "Visualisation of the items on the map\n\ngroup: maprendering",
|
||||||
"anyOf": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"type": "array",
|
"type": "array",
|
||||||
|
@ -194,11 +194,11 @@ export default {
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"passAllFeatures": {
|
"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",
|
"description": "If set, this layer will pass all the features it receives onto the next layer.\nThis is ideal for decoration, e.g. directions on cameras\n\ngroup: advanced",
|
||||||
"type": "boolean"
|
"type": "boolean"
|
||||||
},
|
},
|
||||||
"presets": {
|
"presets": {
|
||||||
"description": "Presets for this layer.\nA preset shows up when clicking the map on a without data (or when right-clicking/long-pressing);\nit will prompt the user to add a new point.\n\nThe most important aspect are the tags, which define which tags the new point will have;\nThe title is shown in the dialog, along with the first sentence of the description.\n\nUpon confirmation, the full description is shown beneath the buttons - perfect to add pictures and examples.\n\nNote: the icon of the preset is determined automatically based on the tags and the icon above. Don't worry about that!\nNB: if no presets are defined, the popup to add new points doesn't show up at all",
|
"description": "Presets for this layer.\nA preset shows up when clicking the map on a without data (or when right-clicking/long-pressing);\nit will prompt the user to add a new point.\n\nThe most important aspect are the tags, which define which tags the new point will have;\nThe title is shown in the dialog, along with the first sentence of the description.\n\nUpon confirmation, the full description is shown beneath the buttons - perfect to add pictures and examples.\n\nNote: the icon of the preset is determined automatically based on the tags and the icon above. Don't worry about that!\nNB: if no presets are defined, the popup to add new points doesn't show up at all\n\ngroup: basic",
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
|
@ -295,7 +295,7 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"tagRenderings": {
|
"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, ...\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",
|
"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\n\ngroup: tagrenderings",
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
"anyOf": [
|
"anyOf": [
|
||||||
|
@ -355,7 +355,7 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"filter": {
|
"filter": {
|
||||||
"description": "All the extra questions for filtering.\nIf a string is given, mapComplete will search in 'filters.json' for the appropriate filter or will try to parse it as `layername.filterid` and us that one",
|
"description": "All the extra questions for filtering.\nIf a string is given, mapComplete will search in 'filters.json' for the appropriate filter or will try to parse it as `layername.filterid` and us that one\n\ngroup: filters",
|
||||||
"anyOf": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"type": "array",
|
"type": "array",
|
||||||
|
@ -384,7 +384,7 @@ export default {
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"deletion": {
|
"deletion": {
|
||||||
"description": "This block defines under what circumstances the delete dialog is shown for objects of this layer.\nIf set, a dialog is shown to the user to (soft) delete the point.\nThe dialog is built to be user friendly and to prevent mistakes.\nIf deletion is not possible, the dialog will hide itself and show the reason of non-deletability instead.\n\nTo configure, the following values are possible:\n\n- false: never ever show the delete button\n- true: show the default delete button\n- undefined: use the mapcomplete default to show deletion or not. Currently, this is the same as 'false' but this will change in the future\n- or: a hash with options (see below)\n\n The delete dialog\n =================\n\n\n\n#### Hard deletion if enough experience\n\nA feature can only be deleted from OpenStreetMap by mapcomplete if:\n\n- It is a node\n- No ways or relations use the node\n- The logged-in user has enough experience OR the user is the only one to have edited the point previously\n- The logged-in user has no unread messages (or has a ton of experience)\n- The user did not select one of the 'non-delete-options' (see below)\n\nIn all other cases, a 'soft deletion' is used.\n\n#### Soft deletion\n\nA 'soft deletion' is when the point isn't deleted from OSM but retagged so that it'll won't how up in the mapcomplete theme anymore.\nThis makes it look like it was deleted, without doing damage. A fixme will be added to the point.\n\nNote that a soft deletion is _only_ possible if these tags are provided by the theme creator, as they'll be different for every theme\n\n#### No-delete options\n\nIn some cases, the contributor might want to delete something for the wrong reason (e.g. someone who wants to have a path removed \"because the path is on their private property\").\nHowever, the path exists in reality and should thus be on OSM - otherwise the next contributor will pass by and notice \"hey, there is a path missing here! Let me redraw it in OSM!)\n\nThe correct approach is to retag the feature in such a way that it is semantically correct *and* that it doesn't show up on the theme anymore.\nA no-delete option is offered as 'reason to delete it', but secretly retags.",
|
"description": "This block defines under what circumstances the delete dialog is shown for objects of this layer.\nIf set, a dialog is shown to the user to (soft) delete the point.\nThe dialog is built to be user friendly and to prevent mistakes.\nIf deletion is not possible, the dialog will hide itself and show the reason of non-deletability instead.\n\nTo configure, the following values are possible:\n\n- false: never ever show the delete button\n- true: show the default delete button\n- undefined: use the mapcomplete default to show deletion or not. Currently, this is the same as 'false' but this will change in the future\n- or: a hash with options (see below)\n\n The delete dialog\n =================\n\n\n\n#### Hard deletion if enough experience\n\nA feature can only be deleted from OpenStreetMap by mapcomplete if:\n\n- It is a node\n- No ways or relations use the node\n- The logged-in user has enough experience OR the user is the only one to have edited the point previously\n- The logged-in user has no unread messages (or has a ton of experience)\n- The user did not select one of the 'non-delete-options' (see below)\n\nIn all other cases, a 'soft deletion' is used.\n\n#### Soft deletion\n\nA 'soft deletion' is when the point isn't deleted from OSM but retagged so that it'll won't how up in the mapcomplete theme anymore.\nThis makes it look like it was deleted, without doing damage. A fixme will be added to the point.\n\nNote that a soft deletion is _only_ possible if these tags are provided by the theme creator, as they'll be different for every theme\n\n#### No-delete options\n\nIn some cases, the contributor might want to delete something for the wrong reason (e.g. someone who wants to have a path removed \"because the path is on their private property\").\nHowever, the path exists in reality and should thus be on OSM - otherwise the next contributor will pass by and notice \"hey, there is a path missing here! Let me redraw it in OSM!)\n\nThe correct approach is to retag the feature in such a way that it is semantically correct *and* that it doesn't show up on the theme anymore.\nA no-delete option is offered as 'reason to delete it', but secretly retags.\n\ngroup: editing",
|
||||||
"anyOf": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/DeleteConfigJson"
|
"$ref": "#/definitions/DeleteConfigJson"
|
||||||
|
@ -395,7 +395,7 @@ export default {
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"allowMove": {
|
"allowMove": {
|
||||||
"description": "Indicates if a point can be moved and configures the modalities.\n\nA feature can be moved by MapComplete if:\n\n- It is a point\n- The point is _not_ part of a way or a a relation.\n\nOff by default. Can be enabled by setting this flag or by configuring.",
|
"description": "Indicates if a point can be moved and configures the modalities.\n\nA feature can be moved by MapComplete if:\n\n- It is a point\n- The point is _not_ part of a way or a a relation.\n\nOff by default. Can be enabled by setting this flag or by configuring.\n\ngroup: editing",
|
||||||
"anyOf": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/default_3"
|
"$ref": "#/definitions/default_3"
|
||||||
|
@ -406,7 +406,7 @@ export default {
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"allowSplit": {
|
"allowSplit": {
|
||||||
"description": "If set, a 'split this way' button is shown on objects rendered as LineStrings, e.g. highways.\n\nIf the way is part of a relation, MapComplete will attempt to update this relation as well",
|
"description": "If set, a 'split this way' button is shown on objects rendered as LineStrings, e.g. highways.\n\nIf the way is part of a relation, MapComplete will attempt to update this relation as well\n\ngroup: editing",
|
||||||
"type": "boolean"
|
"type": "boolean"
|
||||||
},
|
},
|
||||||
"units": {
|
"units": {
|
||||||
|
@ -416,7 +416,7 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"syncSelection": {
|
"syncSelection": {
|
||||||
"description": "If set, synchronizes whether or not this layer is enabled.\n\nno: Do not sync at all, always revert to default\nlocal: keep selection on local storage\ntheme-only: sync via OSM, but this layer will only be toggled in this theme\nglobal: all layers with this ID will be synced accross all themes",
|
"description": "If set, synchronizes whether or not this layer is enabled.\n\nno: Do not sync at all, always revert to default\nlocal: keep selection on local storage\ntheme-only: sync via OSM, but this layer will only be toggled in this theme\nglobal: all layers with this ID will be synced accross all themes\n\ngroup: advanced",
|
||||||
"enum": [
|
"enum": [
|
||||||
"global",
|
"global",
|
||||||
"local",
|
"local",
|
||||||
|
@ -426,8 +426,16 @@ export default {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"#": {
|
"#": {
|
||||||
"description": "Used for comments and/or to disable some checks\n\nno-question-hint-check: disables a check in MiscTagRenderingChecks which complains about 'div', 'span' or 'class=subtle'-HTML elements in the tagRendering",
|
"description": "Used for comments and/or to disable some checks\n\nno-question-hint-check: disables a check in MiscTagRenderingChecks which complains about 'div', 'span' or 'class=subtle'-HTML elements in the tagRendering\n\ngroup: special",
|
||||||
"type": "string"
|
"type": "string"
|
||||||
|
},
|
||||||
|
"popupInFloatover": {
|
||||||
|
"description": "If set, open the selectedElementView in a floatOver instead of on the right\n\ngroup: advanced",
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
|
"fullNodeDatabase": {
|
||||||
|
"description": "_Set automatically by MapComplete, please ignore_\n\ngroup: hidden",
|
||||||
|
"type": "boolean"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"required": [
|
"required": [
|
||||||
|
@ -591,7 +599,7 @@ export default {
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"description": {
|
"description": {
|
||||||
"description": "A human-readable text explaining what this tagRendering does",
|
"description": "A human-readable text explaining what this tagRendering does.\nMostly used for the shared tagrenderings",
|
||||||
"anyOf": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/Record<string,string>"
|
"$ref": "#/definitions/Record<string,string>"
|
||||||
|
@ -748,7 +756,15 @@ export default {
|
||||||
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation"
|
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation"
|
||||||
},
|
},
|
||||||
"then": {
|
"then": {
|
||||||
"description": "Shown if the 'if is fulfilled\nType: rendered"
|
"description": "Shown if the 'if is fulfilled\nType: rendered",
|
||||||
|
"anyOf": [
|
||||||
|
{
|
||||||
|
"$ref": "#/definitions/Record<string,string>"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"icon": {
|
"icon": {
|
||||||
"description": "An extra icon supporting the choice\nType: icon",
|
"description": "An extra icon supporting the choice\nType: icon",
|
||||||
|
@ -1062,23 +1078,8 @@ export default {
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"fill": {
|
|
||||||
"description": "Whether or not to fill polygons",
|
|
||||||
"anyOf": [
|
|
||||||
{
|
|
||||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"enum": [
|
|
||||||
"no",
|
|
||||||
"yes"
|
|
||||||
],
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"fillColor": {
|
"fillColor": {
|
||||||
"description": "The color to fill a polygon with.\nIf undefined, this will be slightly more opaque version of the stroke line",
|
"description": "The color to fill a polygon with.\nIf undefined, this will be slightly more opaque version of the stroke line.\nUse '#00000000' to make the fill invisible",
|
||||||
"anyOf": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||||
|
@ -1257,7 +1258,7 @@ export default {
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"description": {
|
"description": {
|
||||||
"description": "A human-readable text explaining what this tagRendering does",
|
"description": "A human-readable text explaining what this tagRendering does.\nMostly used for the shared tagrenderings",
|
||||||
"anyOf": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/Record<string,string>"
|
"$ref": "#/definitions/Record<string,string>"
|
||||||
|
@ -1439,7 +1440,7 @@ export default {
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"description": {
|
"description": {
|
||||||
"description": "A human-readable text explaining what this tagRendering does",
|
"description": "A human-readable text explaining what this tagRendering does.\nMostly used for the shared tagrenderings",
|
||||||
"anyOf": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/Record<string,string>"
|
"$ref": "#/definitions/Record<string,string>"
|
||||||
|
@ -1734,7 +1735,7 @@ export default {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"appliesToKey": {
|
"appliesToKey": {
|
||||||
"description": "Every key from this list will be normalized.\n\nTo render a united value properly, use",
|
"description": "Every key from this list will be normalized.\n\nTo render the value properly (with a human readable denomination), use `{canonical(<key>)}`",
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
|
|
|
@ -465,7 +465,7 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"description": {
|
"description": {
|
||||||
"description": "A human-readable text explaining what this tagRendering does",
|
"description": "A human-readable text explaining what this tagRendering does.\nMostly used for the shared tagrenderings",
|
||||||
"anyOf": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/Record<string,string>"
|
"$ref": "#/definitions/Record<string,string>"
|
||||||
|
@ -624,7 +624,15 @@
|
||||||
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation"
|
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation"
|
||||||
},
|
},
|
||||||
"then": {
|
"then": {
|
||||||
"description": "Shown if the 'if is fulfilled\nType: rendered"
|
"description": "Shown if the 'if is fulfilled\nType: rendered",
|
||||||
|
"anyOf": [
|
||||||
|
{
|
||||||
|
"$ref": "#/definitions/Record<string,string>"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"icon": {
|
"icon": {
|
||||||
"description": "An extra icon supporting the choice\nType: icon",
|
"description": "An extra icon supporting the choice\nType: icon",
|
||||||
|
@ -941,23 +949,8 @@
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"fill": {
|
|
||||||
"description": "Whether or not to fill polygons",
|
|
||||||
"anyOf": [
|
|
||||||
{
|
|
||||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"enum": [
|
|
||||||
"no",
|
|
||||||
"yes"
|
|
||||||
],
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"fillColor": {
|
"fillColor": {
|
||||||
"description": "The color to fill a polygon with.\nIf undefined, this will be slightly more opaque version of the stroke line",
|
"description": "The color to fill a polygon with.\nIf undefined, this will be slightly more opaque version of the stroke line.\nUse '#00000000' to make the fill invisible",
|
||||||
"anyOf": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||||
|
@ -1138,7 +1131,7 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"description": {
|
"description": {
|
||||||
"description": "A human-readable text explaining what this tagRendering does",
|
"description": "A human-readable text explaining what this tagRendering does.\nMostly used for the shared tagrenderings",
|
||||||
"anyOf": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/Record<string,string>"
|
"$ref": "#/definitions/Record<string,string>"
|
||||||
|
@ -1321,7 +1314,7 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"description": {
|
"description": {
|
||||||
"description": "A human-readable text explaining what this tagRendering does",
|
"description": "A human-readable text explaining what this tagRendering does.\nMostly used for the shared tagrenderings",
|
||||||
"anyOf": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/Record<string,string>"
|
"$ref": "#/definitions/Record<string,string>"
|
||||||
|
@ -1621,7 +1614,7 @@
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"appliesToKey": {
|
"appliesToKey": {
|
||||||
"description": "Every key from this list will be normalized.\n\nTo render a united value properly, use",
|
"description": "Every key from this list will be normalized.\n\nTo render the value properly (with a human readable denomination), use `{canonical(<key>)}`",
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
|
@ -1679,6 +1672,9 @@
|
||||||
"category": {
|
"category": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
|
"type": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
"attribution": {
|
"attribution": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
|
@ -1718,11 +1714,11 @@
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"id": {
|
"id": {
|
||||||
"description": "The id of this layer.\nThis should be a simple, lowercase, human readable string that is used to identify the layer.",
|
"description": "The id of this layer.\nThis should be a simple, lowercase, human readable string that is used to identify the layer.\n\ngroup: basic\nquestion: What is the identifier of this layer?",
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"name": {
|
"name": {
|
||||||
"description": "The name of this layer\nUsed in the layer control panel and the 'Personal theme'.\n\nIf not given, will be hidden (and thus not toggable) in the layer control",
|
"description": "Used in the layer control panel to toggle a layer on and of.\n\nifunset: This will hide the layer in the layer control, making it not filterable and not toggleable\n\ngroup: basic\nquestion: What is the name of this layer?",
|
||||||
"anyOf": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/Record<string,string>"
|
"$ref": "#/definitions/Record<string,string>"
|
||||||
|
@ -1733,7 +1729,7 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"description": {
|
"description": {
|
||||||
"description": "A description for this layer.\nShown in the layer selections and in the personel theme",
|
"description": "A description for the features shown in this layer.\nThis often resembles the introduction of the wiki.osm.org-page for this feature.\n\ngroup: basic\nquestion: How would you describe the features that are shown on this layer?",
|
||||||
"anyOf": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/Record<string,string>"
|
"$ref": "#/definitions/Record<string,string>"
|
||||||
|
@ -1800,18 +1796,18 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"calculatedTags": {
|
"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]\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]",
|
"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]\n\ngroup: advanced",
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"doNotDownload": {
|
"doNotDownload": {
|
||||||
"description": "If set, this layer will not query overpass; but it'll still match the tags above which are by chance returned by other layers.\nWorks well together with 'passAllFeatures', to add decoration",
|
"description": "If set, this layer will not query overpass; but it'll still match the tags above which are by chance returned by other layers.\nWorks well together with 'passAllFeatures', to add decoration\n\ngroup: advanced",
|
||||||
"type": "boolean"
|
"type": "boolean"
|
||||||
},
|
},
|
||||||
"isShown": {
|
"isShown": {
|
||||||
"description": "If set, only features matching this extra tag will be shown.\nThis is useful to hide certain features from view.\n\nImportant: hiding features does not work dynamically, but is only calculated when the data is first renders.\nThis implies that it is not possible to hide a feature after a tagging change\n\nThe default value is 'yes'",
|
"description": "If set, only features matching this extra tag will be shown.\nThis is useful to hide certain features from view.\n\nThe default value is 'yes'\n\ngroup: advanced",
|
||||||
"anyOf": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/AndTagConfigJson",
|
"$ref": "#/definitions/AndTagConfigJson",
|
||||||
|
@ -1827,23 +1823,23 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"forceLoad": {
|
"forceLoad": {
|
||||||
"description": "Advanced option - might be set by the theme compiler\n\nIf true, this data will _always_ be loaded, even if the theme is disabled",
|
"description": "Advanced option - might be set by the theme compiler\n\nIf true, this data will _always_ be loaded, even if the theme is disabled\n\ngroup: advanced",
|
||||||
"type": "boolean"
|
"type": "boolean"
|
||||||
},
|
},
|
||||||
"minzoom": {
|
"minzoom": {
|
||||||
"description": "The minimum needed zoomlevel required before loading of the data start\nDefault: 0",
|
"description": "The minimum needed zoomlevel required to start loading and displaying the data.\nThis can be used to only show common features (e.g. a bicycle parking) only when the map is zoomed in very much (17).\nThis prevents cluttering the map with thousands of parkings if one is looking to an entire city.\n\nDefault: 0\n\ngroup: basic\nquestion: At what zoom level should features of the layer be shown?\nifunset: Always load this layer, even if the entire world is in view.",
|
||||||
"type": "number"
|
"type": "number"
|
||||||
},
|
},
|
||||||
"shownByDefault": {
|
"shownByDefault": {
|
||||||
"description": "Indicates if this layer is shown by default;\ncan be used to hide a layer from start, or to load the layer but only to show it where appropriate (e.g. for snapping to it)",
|
"description": "Indicates if this layer is shown by default;\ncan be used to hide a layer from start, or to load the layer but only to show it where appropriate (e.g. for snapping to it)\n\ngroup: advanced",
|
||||||
"type": "boolean"
|
"type": "boolean"
|
||||||
},
|
},
|
||||||
"minzoomVisible": {
|
"minzoomVisible": {
|
||||||
"description": "The zoom level at which point the data is hidden again\nDefault: 100 (thus: always visible",
|
"description": "The zoom level at which point the data is hidden again\nDefault: 100 (thus: always visible\n\ngroup: advanced",
|
||||||
"type": "number"
|
"type": "number"
|
||||||
},
|
},
|
||||||
"title": {
|
"title": {
|
||||||
"description": "The title shown in a popup for elements of this layer.",
|
"description": "The title shown in a popup for elements of this layer.\n\ngroup: infobox",
|
||||||
"anyOf": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||||
|
@ -1854,7 +1850,7 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"titleIcons": {
|
"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 (which are added automatically)\n\nType: icon[]",
|
"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)\n\nType: icon[]\ngroup: infobox",
|
||||||
"anyOf": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"type": "array",
|
"type": "array",
|
||||||
|
@ -1885,7 +1881,7 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"mapRendering": {
|
"mapRendering": {
|
||||||
"description": "Visualisation of the items on the map",
|
"description": "Visualisation of the items on the map\n\ngroup: maprendering",
|
||||||
"anyOf": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"type": "array",
|
"type": "array",
|
||||||
|
@ -1909,11 +1905,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"passAllFeatures": {
|
"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",
|
"description": "If set, this layer will pass all the features it receives onto the next layer.\nThis is ideal for decoration, e.g. directions on cameras\n\ngroup: advanced",
|
||||||
"type": "boolean"
|
"type": "boolean"
|
||||||
},
|
},
|
||||||
"presets": {
|
"presets": {
|
||||||
"description": "Presets for this layer.\nA preset shows up when clicking the map on a without data (or when right-clicking/long-pressing);\nit will prompt the user to add a new point.\n\nThe most important aspect are the tags, which define which tags the new point will have;\nThe title is shown in the dialog, along with the first sentence of the description.\n\nUpon confirmation, the full description is shown beneath the buttons - perfect to add pictures and examples.\n\nNote: the icon of the preset is determined automatically based on the tags and the icon above. Don't worry about that!\nNB: if no presets are defined, the popup to add new points doesn't show up at all",
|
"description": "Presets for this layer.\nA preset shows up when clicking the map on a without data (or when right-clicking/long-pressing);\nit will prompt the user to add a new point.\n\nThe most important aspect are the tags, which define which tags the new point will have;\nThe title is shown in the dialog, along with the first sentence of the description.\n\nUpon confirmation, the full description is shown beneath the buttons - perfect to add pictures and examples.\n\nNote: the icon of the preset is determined automatically based on the tags and the icon above. Don't worry about that!\nNB: if no presets are defined, the popup to add new points doesn't show up at all\n\ngroup: basic",
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
|
@ -2010,7 +2006,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"tagRenderings": {
|
"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, ...\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",
|
"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\n\ngroup: tagrenderings",
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
"anyOf": [
|
"anyOf": [
|
||||||
|
@ -2070,7 +2066,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"filter": {
|
"filter": {
|
||||||
"description": "All the extra questions for filtering.\nIf a string is given, mapComplete will search in 'filters.json' for the appropriate filter or will try to parse it as `layername.filterid` and us that one",
|
"description": "All the extra questions for filtering.\nIf a string is given, mapComplete will search in 'filters.json' for the appropriate filter or will try to parse it as `layername.filterid` and us that one\n\ngroup: filters",
|
||||||
"anyOf": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"type": "array",
|
"type": "array",
|
||||||
|
@ -2099,7 +2095,7 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"deletion": {
|
"deletion": {
|
||||||
"description": "This block defines under what circumstances the delete dialog is shown for objects of this layer.\nIf set, a dialog is shown to the user to (soft) delete the point.\nThe dialog is built to be user friendly and to prevent mistakes.\nIf deletion is not possible, the dialog will hide itself and show the reason of non-deletability instead.\n\nTo configure, the following values are possible:\n\n- false: never ever show the delete button\n- true: show the default delete button\n- undefined: use the mapcomplete default to show deletion or not. Currently, this is the same as 'false' but this will change in the future\n- or: a hash with options (see below)\n\n The delete dialog\n =================\n\n\n\n#### Hard deletion if enough experience\n\nA feature can only be deleted from OpenStreetMap by mapcomplete if:\n\n- It is a node\n- No ways or relations use the node\n- The logged-in user has enough experience OR the user is the only one to have edited the point previously\n- The logged-in user has no unread messages (or has a ton of experience)\n- The user did not select one of the 'non-delete-options' (see below)\n\nIn all other cases, a 'soft deletion' is used.\n\n#### Soft deletion\n\nA 'soft deletion' is when the point isn't deleted from OSM but retagged so that it'll won't how up in the mapcomplete theme anymore.\nThis makes it look like it was deleted, without doing damage. A fixme will be added to the point.\n\nNote that a soft deletion is _only_ possible if these tags are provided by the theme creator, as they'll be different for every theme\n\n#### No-delete options\n\nIn some cases, the contributor might want to delete something for the wrong reason (e.g. someone who wants to have a path removed \"because the path is on their private property\").\nHowever, the path exists in reality and should thus be on OSM - otherwise the next contributor will pass by and notice \"hey, there is a path missing here! Let me redraw it in OSM!)\n\nThe correct approach is to retag the feature in such a way that it is semantically correct *and* that it doesn't show up on the theme anymore.\nA no-delete option is offered as 'reason to delete it', but secretly retags.",
|
"description": "This block defines under what circumstances the delete dialog is shown for objects of this layer.\nIf set, a dialog is shown to the user to (soft) delete the point.\nThe dialog is built to be user friendly and to prevent mistakes.\nIf deletion is not possible, the dialog will hide itself and show the reason of non-deletability instead.\n\nTo configure, the following values are possible:\n\n- false: never ever show the delete button\n- true: show the default delete button\n- undefined: use the mapcomplete default to show deletion or not. Currently, this is the same as 'false' but this will change in the future\n- or: a hash with options (see below)\n\n The delete dialog\n =================\n\n\n\n#### Hard deletion if enough experience\n\nA feature can only be deleted from OpenStreetMap by mapcomplete if:\n\n- It is a node\n- No ways or relations use the node\n- The logged-in user has enough experience OR the user is the only one to have edited the point previously\n- The logged-in user has no unread messages (or has a ton of experience)\n- The user did not select one of the 'non-delete-options' (see below)\n\nIn all other cases, a 'soft deletion' is used.\n\n#### Soft deletion\n\nA 'soft deletion' is when the point isn't deleted from OSM but retagged so that it'll won't how up in the mapcomplete theme anymore.\nThis makes it look like it was deleted, without doing damage. A fixme will be added to the point.\n\nNote that a soft deletion is _only_ possible if these tags are provided by the theme creator, as they'll be different for every theme\n\n#### No-delete options\n\nIn some cases, the contributor might want to delete something for the wrong reason (e.g. someone who wants to have a path removed \"because the path is on their private property\").\nHowever, the path exists in reality and should thus be on OSM - otherwise the next contributor will pass by and notice \"hey, there is a path missing here! Let me redraw it in OSM!)\n\nThe correct approach is to retag the feature in such a way that it is semantically correct *and* that it doesn't show up on the theme anymore.\nA no-delete option is offered as 'reason to delete it', but secretly retags.\n\ngroup: editing",
|
||||||
"anyOf": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/DeleteConfigJson"
|
"$ref": "#/definitions/DeleteConfigJson"
|
||||||
|
@ -2110,7 +2106,7 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"allowMove": {
|
"allowMove": {
|
||||||
"description": "Indicates if a point can be moved and configures the modalities.\n\nA feature can be moved by MapComplete if:\n\n- It is a point\n- The point is _not_ part of a way or a a relation.\n\nOff by default. Can be enabled by setting this flag or by configuring.",
|
"description": "Indicates if a point can be moved and configures the modalities.\n\nA feature can be moved by MapComplete if:\n\n- It is a point\n- The point is _not_ part of a way or a a relation.\n\nOff by default. Can be enabled by setting this flag or by configuring.\n\ngroup: editing",
|
||||||
"anyOf": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/default_3"
|
"$ref": "#/definitions/default_3"
|
||||||
|
@ -2121,7 +2117,7 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"allowSplit": {
|
"allowSplit": {
|
||||||
"description": "If set, a 'split this way' button is shown on objects rendered as LineStrings, e.g. highways.\n\nIf the way is part of a relation, MapComplete will attempt to update this relation as well",
|
"description": "If set, a 'split this way' button is shown on objects rendered as LineStrings, e.g. highways.\n\nIf the way is part of a relation, MapComplete will attempt to update this relation as well\n\ngroup: editing",
|
||||||
"type": "boolean"
|
"type": "boolean"
|
||||||
},
|
},
|
||||||
"units": {
|
"units": {
|
||||||
|
@ -2131,7 +2127,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"syncSelection": {
|
"syncSelection": {
|
||||||
"description": "If set, synchronizes whether or not this layer is enabled.\n\nno: Do not sync at all, always revert to default\nlocal: keep selection on local storage\ntheme-only: sync via OSM, but this layer will only be toggled in this theme\nglobal: all layers with this ID will be synced accross all themes",
|
"description": "If set, synchronizes whether or not this layer is enabled.\n\nno: Do not sync at all, always revert to default\nlocal: keep selection on local storage\ntheme-only: sync via OSM, but this layer will only be toggled in this theme\nglobal: all layers with this ID will be synced accross all themes\n\ngroup: advanced",
|
||||||
"enum": [
|
"enum": [
|
||||||
"global",
|
"global",
|
||||||
"local",
|
"local",
|
||||||
|
@ -2141,8 +2137,16 @@
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"#": {
|
"#": {
|
||||||
"description": "Used for comments and/or to disable some checks\n\nno-question-hint-check: disables a check in MiscTagRenderingChecks which complains about 'div', 'span' or 'class=subtle'-HTML elements in the tagRendering",
|
"description": "Used for comments and/or to disable some checks\n\nno-question-hint-check: disables a check in MiscTagRenderingChecks which complains about 'div', 'span' or 'class=subtle'-HTML elements in the tagRendering\n\ngroup: special",
|
||||||
"type": "string"
|
"type": "string"
|
||||||
|
},
|
||||||
|
"popupInFloatover": {
|
||||||
|
"description": "If set, open the selectedElementView in a floatOver instead of on the right\n\ngroup: advanced",
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
|
"fullNodeDatabase": {
|
||||||
|
"description": "_Set automatically by MapComplete, please ignore_\n\ngroup: hidden",
|
||||||
|
"type": "boolean"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"required": [
|
"required": [
|
||||||
|
@ -2156,11 +2160,11 @@
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"id": {
|
"id": {
|
||||||
"description": "The id of this layer.\nThis should be a simple, lowercase, human readable string that is used to identify the layer.",
|
"description": "The id of this layer.\nThis should be a simple, lowercase, human readable string that is used to identify the layer.\n\ngroup: basic\nquestion: What is the identifier of this layer?",
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"name": {
|
"name": {
|
||||||
"description": "The name of this layer\nUsed in the layer control panel and the 'Personal theme'.\n\nIf not given, will be hidden (and thus not toggable) in the layer control",
|
"description": "Used in the layer control panel to toggle a layer on and of.\n\nifunset: This will hide the layer in the layer control, making it not filterable and not toggleable\n\ngroup: basic\nquestion: What is the name of this layer?",
|
||||||
"anyOf": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/Record<string,string>"
|
"$ref": "#/definitions/Record<string,string>"
|
||||||
|
@ -2171,7 +2175,7 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"description": {
|
"description": {
|
||||||
"description": "A description for this layer.\nShown in the layer selections and in the personel theme",
|
"description": "A description for the features shown in this layer.\nThis often resembles the introduction of the wiki.osm.org-page for this feature.\n\ngroup: basic\nquestion: How would you describe the features that are shown on this layer?",
|
||||||
"anyOf": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/Record<string,string>"
|
"$ref": "#/definitions/Record<string,string>"
|
||||||
|
@ -2238,18 +2242,18 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"calculatedTags": {
|
"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]\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]",
|
"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]\n\ngroup: advanced",
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"doNotDownload": {
|
"doNotDownload": {
|
||||||
"description": "If set, this layer will not query overpass; but it'll still match the tags above which are by chance returned by other layers.\nWorks well together with 'passAllFeatures', to add decoration",
|
"description": "If set, this layer will not query overpass; but it'll still match the tags above which are by chance returned by other layers.\nWorks well together with 'passAllFeatures', to add decoration\n\ngroup: advanced",
|
||||||
"type": "boolean"
|
"type": "boolean"
|
||||||
},
|
},
|
||||||
"isShown": {
|
"isShown": {
|
||||||
"description": "If set, only features matching this extra tag will be shown.\nThis is useful to hide certain features from view.\n\nImportant: hiding features does not work dynamically, but is only calculated when the data is first renders.\nThis implies that it is not possible to hide a feature after a tagging change\n\nThe default value is 'yes'",
|
"description": "If set, only features matching this extra tag will be shown.\nThis is useful to hide certain features from view.\n\nThe default value is 'yes'\n\ngroup: advanced",
|
||||||
"anyOf": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/AndTagConfigJson",
|
"$ref": "#/definitions/AndTagConfigJson",
|
||||||
|
@ -2265,23 +2269,23 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"forceLoad": {
|
"forceLoad": {
|
||||||
"description": "Advanced option - might be set by the theme compiler\n\nIf true, this data will _always_ be loaded, even if the theme is disabled",
|
"description": "Advanced option - might be set by the theme compiler\n\nIf true, this data will _always_ be loaded, even if the theme is disabled\n\ngroup: advanced",
|
||||||
"type": "boolean"
|
"type": "boolean"
|
||||||
},
|
},
|
||||||
"minzoom": {
|
"minzoom": {
|
||||||
"description": "The minimum needed zoomlevel required before loading of the data start\nDefault: 0",
|
"description": "The minimum needed zoomlevel required to start loading and displaying the data.\nThis can be used to only show common features (e.g. a bicycle parking) only when the map is zoomed in very much (17).\nThis prevents cluttering the map with thousands of parkings if one is looking to an entire city.\n\nDefault: 0\n\ngroup: basic\nquestion: At what zoom level should features of the layer be shown?\nifunset: Always load this layer, even if the entire world is in view.",
|
||||||
"type": "number"
|
"type": "number"
|
||||||
},
|
},
|
||||||
"shownByDefault": {
|
"shownByDefault": {
|
||||||
"description": "Indicates if this layer is shown by default;\ncan be used to hide a layer from start, or to load the layer but only to show it where appropriate (e.g. for snapping to it)",
|
"description": "Indicates if this layer is shown by default;\ncan be used to hide a layer from start, or to load the layer but only to show it where appropriate (e.g. for snapping to it)\n\ngroup: advanced",
|
||||||
"type": "boolean"
|
"type": "boolean"
|
||||||
},
|
},
|
||||||
"minzoomVisible": {
|
"minzoomVisible": {
|
||||||
"description": "The zoom level at which point the data is hidden again\nDefault: 100 (thus: always visible",
|
"description": "The zoom level at which point the data is hidden again\nDefault: 100 (thus: always visible\n\ngroup: advanced",
|
||||||
"type": "number"
|
"type": "number"
|
||||||
},
|
},
|
||||||
"title": {
|
"title": {
|
||||||
"description": "The title shown in a popup for elements of this layer.",
|
"description": "The title shown in a popup for elements of this layer.\n\ngroup: infobox",
|
||||||
"anyOf": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||||
|
@ -2292,7 +2296,7 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"titleIcons": {
|
"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 (which are added automatically)\n\nType: icon[]",
|
"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)\n\nType: icon[]\ngroup: infobox",
|
||||||
"anyOf": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"type": "array",
|
"type": "array",
|
||||||
|
@ -2323,7 +2327,7 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"mapRendering": {
|
"mapRendering": {
|
||||||
"description": "Visualisation of the items on the map",
|
"description": "Visualisation of the items on the map\n\ngroup: maprendering",
|
||||||
"anyOf": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"type": "array",
|
"type": "array",
|
||||||
|
@ -2347,11 +2351,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"passAllFeatures": {
|
"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",
|
"description": "If set, this layer will pass all the features it receives onto the next layer.\nThis is ideal for decoration, e.g. directions on cameras\n\ngroup: advanced",
|
||||||
"type": "boolean"
|
"type": "boolean"
|
||||||
},
|
},
|
||||||
"presets": {
|
"presets": {
|
||||||
"description": "Presets for this layer.\nA preset shows up when clicking the map on a without data (or when right-clicking/long-pressing);\nit will prompt the user to add a new point.\n\nThe most important aspect are the tags, which define which tags the new point will have;\nThe title is shown in the dialog, along with the first sentence of the description.\n\nUpon confirmation, the full description is shown beneath the buttons - perfect to add pictures and examples.\n\nNote: the icon of the preset is determined automatically based on the tags and the icon above. Don't worry about that!\nNB: if no presets are defined, the popup to add new points doesn't show up at all",
|
"description": "Presets for this layer.\nA preset shows up when clicking the map on a without data (or when right-clicking/long-pressing);\nit will prompt the user to add a new point.\n\nThe most important aspect are the tags, which define which tags the new point will have;\nThe title is shown in the dialog, along with the first sentence of the description.\n\nUpon confirmation, the full description is shown beneath the buttons - perfect to add pictures and examples.\n\nNote: the icon of the preset is determined automatically based on the tags and the icon above. Don't worry about that!\nNB: if no presets are defined, the popup to add new points doesn't show up at all\n\ngroup: basic",
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
|
@ -2448,7 +2452,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"tagRenderings": {
|
"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, ...\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",
|
"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\n\ngroup: tagrenderings",
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
"anyOf": [
|
"anyOf": [
|
||||||
|
@ -2508,7 +2512,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"filter": {
|
"filter": {
|
||||||
"description": "All the extra questions for filtering.\nIf a string is given, mapComplete will search in 'filters.json' for the appropriate filter or will try to parse it as `layername.filterid` and us that one",
|
"description": "All the extra questions for filtering.\nIf a string is given, mapComplete will search in 'filters.json' for the appropriate filter or will try to parse it as `layername.filterid` and us that one\n\ngroup: filters",
|
||||||
"anyOf": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"type": "array",
|
"type": "array",
|
||||||
|
@ -2537,7 +2541,7 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"deletion": {
|
"deletion": {
|
||||||
"description": "This block defines under what circumstances the delete dialog is shown for objects of this layer.\nIf set, a dialog is shown to the user to (soft) delete the point.\nThe dialog is built to be user friendly and to prevent mistakes.\nIf deletion is not possible, the dialog will hide itself and show the reason of non-deletability instead.\n\nTo configure, the following values are possible:\n\n- false: never ever show the delete button\n- true: show the default delete button\n- undefined: use the mapcomplete default to show deletion or not. Currently, this is the same as 'false' but this will change in the future\n- or: a hash with options (see below)\n\n The delete dialog\n =================\n\n\n\n#### Hard deletion if enough experience\n\nA feature can only be deleted from OpenStreetMap by mapcomplete if:\n\n- It is a node\n- No ways or relations use the node\n- The logged-in user has enough experience OR the user is the only one to have edited the point previously\n- The logged-in user has no unread messages (or has a ton of experience)\n- The user did not select one of the 'non-delete-options' (see below)\n\nIn all other cases, a 'soft deletion' is used.\n\n#### Soft deletion\n\nA 'soft deletion' is when the point isn't deleted from OSM but retagged so that it'll won't how up in the mapcomplete theme anymore.\nThis makes it look like it was deleted, without doing damage. A fixme will be added to the point.\n\nNote that a soft deletion is _only_ possible if these tags are provided by the theme creator, as they'll be different for every theme\n\n#### No-delete options\n\nIn some cases, the contributor might want to delete something for the wrong reason (e.g. someone who wants to have a path removed \"because the path is on their private property\").\nHowever, the path exists in reality and should thus be on OSM - otherwise the next contributor will pass by and notice \"hey, there is a path missing here! Let me redraw it in OSM!)\n\nThe correct approach is to retag the feature in such a way that it is semantically correct *and* that it doesn't show up on the theme anymore.\nA no-delete option is offered as 'reason to delete it', but secretly retags.",
|
"description": "This block defines under what circumstances the delete dialog is shown for objects of this layer.\nIf set, a dialog is shown to the user to (soft) delete the point.\nThe dialog is built to be user friendly and to prevent mistakes.\nIf deletion is not possible, the dialog will hide itself and show the reason of non-deletability instead.\n\nTo configure, the following values are possible:\n\n- false: never ever show the delete button\n- true: show the default delete button\n- undefined: use the mapcomplete default to show deletion or not. Currently, this is the same as 'false' but this will change in the future\n- or: a hash with options (see below)\n\n The delete dialog\n =================\n\n\n\n#### Hard deletion if enough experience\n\nA feature can only be deleted from OpenStreetMap by mapcomplete if:\n\n- It is a node\n- No ways or relations use the node\n- The logged-in user has enough experience OR the user is the only one to have edited the point previously\n- The logged-in user has no unread messages (or has a ton of experience)\n- The user did not select one of the 'non-delete-options' (see below)\n\nIn all other cases, a 'soft deletion' is used.\n\n#### Soft deletion\n\nA 'soft deletion' is when the point isn't deleted from OSM but retagged so that it'll won't how up in the mapcomplete theme anymore.\nThis makes it look like it was deleted, without doing damage. A fixme will be added to the point.\n\nNote that a soft deletion is _only_ possible if these tags are provided by the theme creator, as they'll be different for every theme\n\n#### No-delete options\n\nIn some cases, the contributor might want to delete something for the wrong reason (e.g. someone who wants to have a path removed \"because the path is on their private property\").\nHowever, the path exists in reality and should thus be on OSM - otherwise the next contributor will pass by and notice \"hey, there is a path missing here! Let me redraw it in OSM!)\n\nThe correct approach is to retag the feature in such a way that it is semantically correct *and* that it doesn't show up on the theme anymore.\nA no-delete option is offered as 'reason to delete it', but secretly retags.\n\ngroup: editing",
|
||||||
"anyOf": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/DeleteConfigJson"
|
"$ref": "#/definitions/DeleteConfigJson"
|
||||||
|
@ -2548,7 +2552,7 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"allowMove": {
|
"allowMove": {
|
||||||
"description": "Indicates if a point can be moved and configures the modalities.\n\nA feature can be moved by MapComplete if:\n\n- It is a point\n- The point is _not_ part of a way or a a relation.\n\nOff by default. Can be enabled by setting this flag or by configuring.",
|
"description": "Indicates if a point can be moved and configures the modalities.\n\nA feature can be moved by MapComplete if:\n\n- It is a point\n- The point is _not_ part of a way or a a relation.\n\nOff by default. Can be enabled by setting this flag or by configuring.\n\ngroup: editing",
|
||||||
"anyOf": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/default_3"
|
"$ref": "#/definitions/default_3"
|
||||||
|
@ -2559,7 +2563,7 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"allowSplit": {
|
"allowSplit": {
|
||||||
"description": "If set, a 'split this way' button is shown on objects rendered as LineStrings, e.g. highways.\n\nIf the way is part of a relation, MapComplete will attempt to update this relation as well",
|
"description": "If set, a 'split this way' button is shown on objects rendered as LineStrings, e.g. highways.\n\nIf the way is part of a relation, MapComplete will attempt to update this relation as well\n\ngroup: editing",
|
||||||
"type": "boolean"
|
"type": "boolean"
|
||||||
},
|
},
|
||||||
"units": {
|
"units": {
|
||||||
|
@ -2569,7 +2573,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"syncSelection": {
|
"syncSelection": {
|
||||||
"description": "If set, synchronizes whether or not this layer is enabled.\n\nno: Do not sync at all, always revert to default\nlocal: keep selection on local storage\ntheme-only: sync via OSM, but this layer will only be toggled in this theme\nglobal: all layers with this ID will be synced accross all themes",
|
"description": "If set, synchronizes whether or not this layer is enabled.\n\nno: Do not sync at all, always revert to default\nlocal: keep selection on local storage\ntheme-only: sync via OSM, but this layer will only be toggled in this theme\nglobal: all layers with this ID will be synced accross all themes\n\ngroup: advanced",
|
||||||
"enum": [
|
"enum": [
|
||||||
"global",
|
"global",
|
||||||
"local",
|
"local",
|
||||||
|
@ -2579,8 +2583,16 @@
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"#": {
|
"#": {
|
||||||
"description": "Used for comments and/or to disable some checks\n\nno-question-hint-check: disables a check in MiscTagRenderingChecks which complains about 'div', 'span' or 'class=subtle'-HTML elements in the tagRendering",
|
"description": "Used for comments and/or to disable some checks\n\nno-question-hint-check: disables a check in MiscTagRenderingChecks which complains about 'div', 'span' or 'class=subtle'-HTML elements in the tagRendering\n\ngroup: special",
|
||||||
"type": "string"
|
"type": "string"
|
||||||
|
},
|
||||||
|
"popupInFloatover": {
|
||||||
|
"description": "If set, open the selectedElementView in a floatOver instead of on the right\n\ngroup: advanced",
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
|
"fullNodeDatabase": {
|
||||||
|
"description": "_Set automatically by MapComplete, please ignore_\n\ngroup: hidden",
|
||||||
|
"type": "boolean"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"additionalProperties": false
|
"additionalProperties": false
|
||||||
|
|
|
@ -460,7 +460,7 @@ export default {
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"description": {
|
"description": {
|
||||||
"description": "A human-readable text explaining what this tagRendering does",
|
"description": "A human-readable text explaining what this tagRendering does.\nMostly used for the shared tagrenderings",
|
||||||
"anyOf": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/Record<string,string>"
|
"$ref": "#/definitions/Record<string,string>"
|
||||||
|
@ -617,7 +617,15 @@ export default {
|
||||||
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation"
|
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation"
|
||||||
},
|
},
|
||||||
"then": {
|
"then": {
|
||||||
"description": "Shown if the 'if is fulfilled\nType: rendered"
|
"description": "Shown if the 'if is fulfilled\nType: rendered",
|
||||||
|
"anyOf": [
|
||||||
|
{
|
||||||
|
"$ref": "#/definitions/Record<string,string>"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"icon": {
|
"icon": {
|
||||||
"description": "An extra icon supporting the choice\nType: icon",
|
"description": "An extra icon supporting the choice\nType: icon",
|
||||||
|
@ -931,23 +939,8 @@ export default {
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"fill": {
|
|
||||||
"description": "Whether or not to fill polygons",
|
|
||||||
"anyOf": [
|
|
||||||
{
|
|
||||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"enum": [
|
|
||||||
"no",
|
|
||||||
"yes"
|
|
||||||
],
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"fillColor": {
|
"fillColor": {
|
||||||
"description": "The color to fill a polygon with.\nIf undefined, this will be slightly more opaque version of the stroke line",
|
"description": "The color to fill a polygon with.\nIf undefined, this will be slightly more opaque version of the stroke line.\nUse '#00000000' to make the fill invisible",
|
||||||
"anyOf": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||||
|
@ -1126,7 +1119,7 @@ export default {
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"description": {
|
"description": {
|
||||||
"description": "A human-readable text explaining what this tagRendering does",
|
"description": "A human-readable text explaining what this tagRendering does.\nMostly used for the shared tagrenderings",
|
||||||
"anyOf": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/Record<string,string>"
|
"$ref": "#/definitions/Record<string,string>"
|
||||||
|
@ -1308,7 +1301,7 @@ export default {
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"description": {
|
"description": {
|
||||||
"description": "A human-readable text explaining what this tagRendering does",
|
"description": "A human-readable text explaining what this tagRendering does.\nMostly used for the shared tagrenderings",
|
||||||
"anyOf": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/Record<string,string>"
|
"$ref": "#/definitions/Record<string,string>"
|
||||||
|
@ -1603,7 +1596,7 @@ export default {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"appliesToKey": {
|
"appliesToKey": {
|
||||||
"description": "Every key from this list will be normalized.\n\nTo render a united value properly, use",
|
"description": "Every key from this list will be normalized.\n\nTo render the value properly (with a human readable denomination), use `{canonical(<key>)}`",
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
|
@ -1659,6 +1652,9 @@ export default {
|
||||||
"category": {
|
"category": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
|
"type": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
"attribution": {
|
"attribution": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
|
@ -1697,11 +1693,11 @@ export default {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"id": {
|
"id": {
|
||||||
"description": "The id of this layer.\nThis should be a simple, lowercase, human readable string that is used to identify the layer.",
|
"description": "The id of this layer.\nThis should be a simple, lowercase, human readable string that is used to identify the layer.\n\ngroup: basic\nquestion: What is the identifier of this layer?",
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"name": {
|
"name": {
|
||||||
"description": "The name of this layer\nUsed in the layer control panel and the 'Personal theme'.\n\nIf not given, will be hidden (and thus not toggable) in the layer control",
|
"description": "Used in the layer control panel to toggle a layer on and of.\n\nifunset: This will hide the layer in the layer control, making it not filterable and not toggleable\n\ngroup: basic\nquestion: What is the name of this layer?",
|
||||||
"anyOf": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/Record<string,string>"
|
"$ref": "#/definitions/Record<string,string>"
|
||||||
|
@ -1712,7 +1708,7 @@ export default {
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"description": {
|
"description": {
|
||||||
"description": "A description for this layer.\nShown in the layer selections and in the personel theme",
|
"description": "A description for the features shown in this layer.\nThis often resembles the introduction of the wiki.osm.org-page for this feature.\n\ngroup: basic\nquestion: How would you describe the features that are shown on this layer?",
|
||||||
"anyOf": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/Record<string,string>"
|
"$ref": "#/definitions/Record<string,string>"
|
||||||
|
@ -1779,18 +1775,18 @@ export default {
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"calculatedTags": {
|
"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]\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]",
|
"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]\n\ngroup: advanced",
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"doNotDownload": {
|
"doNotDownload": {
|
||||||
"description": "If set, this layer will not query overpass; but it'll still match the tags above which are by chance returned by other layers.\nWorks well together with 'passAllFeatures', to add decoration",
|
"description": "If set, this layer will not query overpass; but it'll still match the tags above which are by chance returned by other layers.\nWorks well together with 'passAllFeatures', to add decoration\n\ngroup: advanced",
|
||||||
"type": "boolean"
|
"type": "boolean"
|
||||||
},
|
},
|
||||||
"isShown": {
|
"isShown": {
|
||||||
"description": "If set, only features matching this extra tag will be shown.\nThis is useful to hide certain features from view.\n\nImportant: hiding features does not work dynamically, but is only calculated when the data is first renders.\nThis implies that it is not possible to hide a feature after a tagging change\n\nThe default value is 'yes'",
|
"description": "If set, only features matching this extra tag will be shown.\nThis is useful to hide certain features from view.\n\nThe default value is 'yes'\n\ngroup: advanced",
|
||||||
"anyOf": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/AndTagConfigJson",
|
"$ref": "#/definitions/AndTagConfigJson",
|
||||||
|
@ -1806,23 +1802,23 @@ export default {
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"forceLoad": {
|
"forceLoad": {
|
||||||
"description": "Advanced option - might be set by the theme compiler\n\nIf true, this data will _always_ be loaded, even if the theme is disabled",
|
"description": "Advanced option - might be set by the theme compiler\n\nIf true, this data will _always_ be loaded, even if the theme is disabled\n\ngroup: advanced",
|
||||||
"type": "boolean"
|
"type": "boolean"
|
||||||
},
|
},
|
||||||
"minzoom": {
|
"minzoom": {
|
||||||
"description": "The minimum needed zoomlevel required before loading of the data start\nDefault: 0",
|
"description": "The minimum needed zoomlevel required to start loading and displaying the data.\nThis can be used to only show common features (e.g. a bicycle parking) only when the map is zoomed in very much (17).\nThis prevents cluttering the map with thousands of parkings if one is looking to an entire city.\n\nDefault: 0\n\ngroup: basic\nquestion: At what zoom level should features of the layer be shown?\nifunset: Always load this layer, even if the entire world is in view.",
|
||||||
"type": "number"
|
"type": "number"
|
||||||
},
|
},
|
||||||
"shownByDefault": {
|
"shownByDefault": {
|
||||||
"description": "Indicates if this layer is shown by default;\ncan be used to hide a layer from start, or to load the layer but only to show it where appropriate (e.g. for snapping to it)",
|
"description": "Indicates if this layer is shown by default;\ncan be used to hide a layer from start, or to load the layer but only to show it where appropriate (e.g. for snapping to it)\n\ngroup: advanced",
|
||||||
"type": "boolean"
|
"type": "boolean"
|
||||||
},
|
},
|
||||||
"minzoomVisible": {
|
"minzoomVisible": {
|
||||||
"description": "The zoom level at which point the data is hidden again\nDefault: 100 (thus: always visible",
|
"description": "The zoom level at which point the data is hidden again\nDefault: 100 (thus: always visible\n\ngroup: advanced",
|
||||||
"type": "number"
|
"type": "number"
|
||||||
},
|
},
|
||||||
"title": {
|
"title": {
|
||||||
"description": "The title shown in a popup for elements of this layer.",
|
"description": "The title shown in a popup for elements of this layer.\n\ngroup: infobox",
|
||||||
"anyOf": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||||
|
@ -1833,7 +1829,7 @@ export default {
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"titleIcons": {
|
"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 (which are added automatically)\n\nType: icon[]",
|
"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)\n\nType: icon[]\ngroup: infobox",
|
||||||
"anyOf": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"type": "array",
|
"type": "array",
|
||||||
|
@ -1864,7 +1860,7 @@ export default {
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"mapRendering": {
|
"mapRendering": {
|
||||||
"description": "Visualisation of the items on the map",
|
"description": "Visualisation of the items on the map\n\ngroup: maprendering",
|
||||||
"anyOf": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"type": "array",
|
"type": "array",
|
||||||
|
@ -1888,11 +1884,11 @@ export default {
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"passAllFeatures": {
|
"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",
|
"description": "If set, this layer will pass all the features it receives onto the next layer.\nThis is ideal for decoration, e.g. directions on cameras\n\ngroup: advanced",
|
||||||
"type": "boolean"
|
"type": "boolean"
|
||||||
},
|
},
|
||||||
"presets": {
|
"presets": {
|
||||||
"description": "Presets for this layer.\nA preset shows up when clicking the map on a without data (or when right-clicking/long-pressing);\nit will prompt the user to add a new point.\n\nThe most important aspect are the tags, which define which tags the new point will have;\nThe title is shown in the dialog, along with the first sentence of the description.\n\nUpon confirmation, the full description is shown beneath the buttons - perfect to add pictures and examples.\n\nNote: the icon of the preset is determined automatically based on the tags and the icon above. Don't worry about that!\nNB: if no presets are defined, the popup to add new points doesn't show up at all",
|
"description": "Presets for this layer.\nA preset shows up when clicking the map on a without data (or when right-clicking/long-pressing);\nit will prompt the user to add a new point.\n\nThe most important aspect are the tags, which define which tags the new point will have;\nThe title is shown in the dialog, along with the first sentence of the description.\n\nUpon confirmation, the full description is shown beneath the buttons - perfect to add pictures and examples.\n\nNote: the icon of the preset is determined automatically based on the tags and the icon above. Don't worry about that!\nNB: if no presets are defined, the popup to add new points doesn't show up at all\n\ngroup: basic",
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
|
@ -1989,7 +1985,7 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"tagRenderings": {
|
"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, ...\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",
|
"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\n\ngroup: tagrenderings",
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
"anyOf": [
|
"anyOf": [
|
||||||
|
@ -2049,7 +2045,7 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"filter": {
|
"filter": {
|
||||||
"description": "All the extra questions for filtering.\nIf a string is given, mapComplete will search in 'filters.json' for the appropriate filter or will try to parse it as `layername.filterid` and us that one",
|
"description": "All the extra questions for filtering.\nIf a string is given, mapComplete will search in 'filters.json' for the appropriate filter or will try to parse it as `layername.filterid` and us that one\n\ngroup: filters",
|
||||||
"anyOf": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"type": "array",
|
"type": "array",
|
||||||
|
@ -2078,7 +2074,7 @@ export default {
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"deletion": {
|
"deletion": {
|
||||||
"description": "This block defines under what circumstances the delete dialog is shown for objects of this layer.\nIf set, a dialog is shown to the user to (soft) delete the point.\nThe dialog is built to be user friendly and to prevent mistakes.\nIf deletion is not possible, the dialog will hide itself and show the reason of non-deletability instead.\n\nTo configure, the following values are possible:\n\n- false: never ever show the delete button\n- true: show the default delete button\n- undefined: use the mapcomplete default to show deletion or not. Currently, this is the same as 'false' but this will change in the future\n- or: a hash with options (see below)\n\n The delete dialog\n =================\n\n\n\n#### Hard deletion if enough experience\n\nA feature can only be deleted from OpenStreetMap by mapcomplete if:\n\n- It is a node\n- No ways or relations use the node\n- The logged-in user has enough experience OR the user is the only one to have edited the point previously\n- The logged-in user has no unread messages (or has a ton of experience)\n- The user did not select one of the 'non-delete-options' (see below)\n\nIn all other cases, a 'soft deletion' is used.\n\n#### Soft deletion\n\nA 'soft deletion' is when the point isn't deleted from OSM but retagged so that it'll won't how up in the mapcomplete theme anymore.\nThis makes it look like it was deleted, without doing damage. A fixme will be added to the point.\n\nNote that a soft deletion is _only_ possible if these tags are provided by the theme creator, as they'll be different for every theme\n\n#### No-delete options\n\nIn some cases, the contributor might want to delete something for the wrong reason (e.g. someone who wants to have a path removed \"because the path is on their private property\").\nHowever, the path exists in reality and should thus be on OSM - otherwise the next contributor will pass by and notice \"hey, there is a path missing here! Let me redraw it in OSM!)\n\nThe correct approach is to retag the feature in such a way that it is semantically correct *and* that it doesn't show up on the theme anymore.\nA no-delete option is offered as 'reason to delete it', but secretly retags.",
|
"description": "This block defines under what circumstances the delete dialog is shown for objects of this layer.\nIf set, a dialog is shown to the user to (soft) delete the point.\nThe dialog is built to be user friendly and to prevent mistakes.\nIf deletion is not possible, the dialog will hide itself and show the reason of non-deletability instead.\n\nTo configure, the following values are possible:\n\n- false: never ever show the delete button\n- true: show the default delete button\n- undefined: use the mapcomplete default to show deletion or not. Currently, this is the same as 'false' but this will change in the future\n- or: a hash with options (see below)\n\n The delete dialog\n =================\n\n\n\n#### Hard deletion if enough experience\n\nA feature can only be deleted from OpenStreetMap by mapcomplete if:\n\n- It is a node\n- No ways or relations use the node\n- The logged-in user has enough experience OR the user is the only one to have edited the point previously\n- The logged-in user has no unread messages (or has a ton of experience)\n- The user did not select one of the 'non-delete-options' (see below)\n\nIn all other cases, a 'soft deletion' is used.\n\n#### Soft deletion\n\nA 'soft deletion' is when the point isn't deleted from OSM but retagged so that it'll won't how up in the mapcomplete theme anymore.\nThis makes it look like it was deleted, without doing damage. A fixme will be added to the point.\n\nNote that a soft deletion is _only_ possible if these tags are provided by the theme creator, as they'll be different for every theme\n\n#### No-delete options\n\nIn some cases, the contributor might want to delete something for the wrong reason (e.g. someone who wants to have a path removed \"because the path is on their private property\").\nHowever, the path exists in reality and should thus be on OSM - otherwise the next contributor will pass by and notice \"hey, there is a path missing here! Let me redraw it in OSM!)\n\nThe correct approach is to retag the feature in such a way that it is semantically correct *and* that it doesn't show up on the theme anymore.\nA no-delete option is offered as 'reason to delete it', but secretly retags.\n\ngroup: editing",
|
||||||
"anyOf": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/DeleteConfigJson"
|
"$ref": "#/definitions/DeleteConfigJson"
|
||||||
|
@ -2089,7 +2085,7 @@ export default {
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"allowMove": {
|
"allowMove": {
|
||||||
"description": "Indicates if a point can be moved and configures the modalities.\n\nA feature can be moved by MapComplete if:\n\n- It is a point\n- The point is _not_ part of a way or a a relation.\n\nOff by default. Can be enabled by setting this flag or by configuring.",
|
"description": "Indicates if a point can be moved and configures the modalities.\n\nA feature can be moved by MapComplete if:\n\n- It is a point\n- The point is _not_ part of a way or a a relation.\n\nOff by default. Can be enabled by setting this flag or by configuring.\n\ngroup: editing",
|
||||||
"anyOf": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/default_3"
|
"$ref": "#/definitions/default_3"
|
||||||
|
@ -2100,7 +2096,7 @@ export default {
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"allowSplit": {
|
"allowSplit": {
|
||||||
"description": "If set, a 'split this way' button is shown on objects rendered as LineStrings, e.g. highways.\n\nIf the way is part of a relation, MapComplete will attempt to update this relation as well",
|
"description": "If set, a 'split this way' button is shown on objects rendered as LineStrings, e.g. highways.\n\nIf the way is part of a relation, MapComplete will attempt to update this relation as well\n\ngroup: editing",
|
||||||
"type": "boolean"
|
"type": "boolean"
|
||||||
},
|
},
|
||||||
"units": {
|
"units": {
|
||||||
|
@ -2110,7 +2106,7 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"syncSelection": {
|
"syncSelection": {
|
||||||
"description": "If set, synchronizes whether or not this layer is enabled.\n\nno: Do not sync at all, always revert to default\nlocal: keep selection on local storage\ntheme-only: sync via OSM, but this layer will only be toggled in this theme\nglobal: all layers with this ID will be synced accross all themes",
|
"description": "If set, synchronizes whether or not this layer is enabled.\n\nno: Do not sync at all, always revert to default\nlocal: keep selection on local storage\ntheme-only: sync via OSM, but this layer will only be toggled in this theme\nglobal: all layers with this ID will be synced accross all themes\n\ngroup: advanced",
|
||||||
"enum": [
|
"enum": [
|
||||||
"global",
|
"global",
|
||||||
"local",
|
"local",
|
||||||
|
@ -2120,8 +2116,16 @@ export default {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"#": {
|
"#": {
|
||||||
"description": "Used for comments and/or to disable some checks\n\nno-question-hint-check: disables a check in MiscTagRenderingChecks which complains about 'div', 'span' or 'class=subtle'-HTML elements in the tagRendering",
|
"description": "Used for comments and/or to disable some checks\n\nno-question-hint-check: disables a check in MiscTagRenderingChecks which complains about 'div', 'span' or 'class=subtle'-HTML elements in the tagRendering\n\ngroup: special",
|
||||||
"type": "string"
|
"type": "string"
|
||||||
|
},
|
||||||
|
"popupInFloatover": {
|
||||||
|
"description": "If set, open the selectedElementView in a floatOver instead of on the right\n\ngroup: advanced",
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
|
"fullNodeDatabase": {
|
||||||
|
"description": "_Set automatically by MapComplete, please ignore_\n\ngroup: hidden",
|
||||||
|
"type": "boolean"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"required": [
|
"required": [
|
||||||
|
@ -2134,11 +2138,11 @@ export default {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"id": {
|
"id": {
|
||||||
"description": "The id of this layer.\nThis should be a simple, lowercase, human readable string that is used to identify the layer.",
|
"description": "The id of this layer.\nThis should be a simple, lowercase, human readable string that is used to identify the layer.\n\ngroup: basic\nquestion: What is the identifier of this layer?",
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"name": {
|
"name": {
|
||||||
"description": "The name of this layer\nUsed in the layer control panel and the 'Personal theme'.\n\nIf not given, will be hidden (and thus not toggable) in the layer control",
|
"description": "Used in the layer control panel to toggle a layer on and of.\n\nifunset: This will hide the layer in the layer control, making it not filterable and not toggleable\n\ngroup: basic\nquestion: What is the name of this layer?",
|
||||||
"anyOf": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/Record<string,string>"
|
"$ref": "#/definitions/Record<string,string>"
|
||||||
|
@ -2149,7 +2153,7 @@ export default {
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"description": {
|
"description": {
|
||||||
"description": "A description for this layer.\nShown in the layer selections and in the personel theme",
|
"description": "A description for the features shown in this layer.\nThis often resembles the introduction of the wiki.osm.org-page for this feature.\n\ngroup: basic\nquestion: How would you describe the features that are shown on this layer?",
|
||||||
"anyOf": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/Record<string,string>"
|
"$ref": "#/definitions/Record<string,string>"
|
||||||
|
@ -2216,18 +2220,18 @@ export default {
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"calculatedTags": {
|
"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]\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]",
|
"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]\n\ngroup: advanced",
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"doNotDownload": {
|
"doNotDownload": {
|
||||||
"description": "If set, this layer will not query overpass; but it'll still match the tags above which are by chance returned by other layers.\nWorks well together with 'passAllFeatures', to add decoration",
|
"description": "If set, this layer will not query overpass; but it'll still match the tags above which are by chance returned by other layers.\nWorks well together with 'passAllFeatures', to add decoration\n\ngroup: advanced",
|
||||||
"type": "boolean"
|
"type": "boolean"
|
||||||
},
|
},
|
||||||
"isShown": {
|
"isShown": {
|
||||||
"description": "If set, only features matching this extra tag will be shown.\nThis is useful to hide certain features from view.\n\nImportant: hiding features does not work dynamically, but is only calculated when the data is first renders.\nThis implies that it is not possible to hide a feature after a tagging change\n\nThe default value is 'yes'",
|
"description": "If set, only features matching this extra tag will be shown.\nThis is useful to hide certain features from view.\n\nThe default value is 'yes'\n\ngroup: advanced",
|
||||||
"anyOf": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/AndTagConfigJson",
|
"$ref": "#/definitions/AndTagConfigJson",
|
||||||
|
@ -2243,23 +2247,23 @@ export default {
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"forceLoad": {
|
"forceLoad": {
|
||||||
"description": "Advanced option - might be set by the theme compiler\n\nIf true, this data will _always_ be loaded, even if the theme is disabled",
|
"description": "Advanced option - might be set by the theme compiler\n\nIf true, this data will _always_ be loaded, even if the theme is disabled\n\ngroup: advanced",
|
||||||
"type": "boolean"
|
"type": "boolean"
|
||||||
},
|
},
|
||||||
"minzoom": {
|
"minzoom": {
|
||||||
"description": "The minimum needed zoomlevel required before loading of the data start\nDefault: 0",
|
"description": "The minimum needed zoomlevel required to start loading and displaying the data.\nThis can be used to only show common features (e.g. a bicycle parking) only when the map is zoomed in very much (17).\nThis prevents cluttering the map with thousands of parkings if one is looking to an entire city.\n\nDefault: 0\n\ngroup: basic\nquestion: At what zoom level should features of the layer be shown?\nifunset: Always load this layer, even if the entire world is in view.",
|
||||||
"type": "number"
|
"type": "number"
|
||||||
},
|
},
|
||||||
"shownByDefault": {
|
"shownByDefault": {
|
||||||
"description": "Indicates if this layer is shown by default;\ncan be used to hide a layer from start, or to load the layer but only to show it where appropriate (e.g. for snapping to it)",
|
"description": "Indicates if this layer is shown by default;\ncan be used to hide a layer from start, or to load the layer but only to show it where appropriate (e.g. for snapping to it)\n\ngroup: advanced",
|
||||||
"type": "boolean"
|
"type": "boolean"
|
||||||
},
|
},
|
||||||
"minzoomVisible": {
|
"minzoomVisible": {
|
||||||
"description": "The zoom level at which point the data is hidden again\nDefault: 100 (thus: always visible",
|
"description": "The zoom level at which point the data is hidden again\nDefault: 100 (thus: always visible\n\ngroup: advanced",
|
||||||
"type": "number"
|
"type": "number"
|
||||||
},
|
},
|
||||||
"title": {
|
"title": {
|
||||||
"description": "The title shown in a popup for elements of this layer.",
|
"description": "The title shown in a popup for elements of this layer.\n\ngroup: infobox",
|
||||||
"anyOf": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||||
|
@ -2270,7 +2274,7 @@ export default {
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"titleIcons": {
|
"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 (which are added automatically)\n\nType: icon[]",
|
"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)\n\nType: icon[]\ngroup: infobox",
|
||||||
"anyOf": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"type": "array",
|
"type": "array",
|
||||||
|
@ -2301,7 +2305,7 @@ export default {
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"mapRendering": {
|
"mapRendering": {
|
||||||
"description": "Visualisation of the items on the map",
|
"description": "Visualisation of the items on the map\n\ngroup: maprendering",
|
||||||
"anyOf": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"type": "array",
|
"type": "array",
|
||||||
|
@ -2325,11 +2329,11 @@ export default {
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"passAllFeatures": {
|
"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",
|
"description": "If set, this layer will pass all the features it receives onto the next layer.\nThis is ideal for decoration, e.g. directions on cameras\n\ngroup: advanced",
|
||||||
"type": "boolean"
|
"type": "boolean"
|
||||||
},
|
},
|
||||||
"presets": {
|
"presets": {
|
||||||
"description": "Presets for this layer.\nA preset shows up when clicking the map on a without data (or when right-clicking/long-pressing);\nit will prompt the user to add a new point.\n\nThe most important aspect are the tags, which define which tags the new point will have;\nThe title is shown in the dialog, along with the first sentence of the description.\n\nUpon confirmation, the full description is shown beneath the buttons - perfect to add pictures and examples.\n\nNote: the icon of the preset is determined automatically based on the tags and the icon above. Don't worry about that!\nNB: if no presets are defined, the popup to add new points doesn't show up at all",
|
"description": "Presets for this layer.\nA preset shows up when clicking the map on a without data (or when right-clicking/long-pressing);\nit will prompt the user to add a new point.\n\nThe most important aspect are the tags, which define which tags the new point will have;\nThe title is shown in the dialog, along with the first sentence of the description.\n\nUpon confirmation, the full description is shown beneath the buttons - perfect to add pictures and examples.\n\nNote: the icon of the preset is determined automatically based on the tags and the icon above. Don't worry about that!\nNB: if no presets are defined, the popup to add new points doesn't show up at all\n\ngroup: basic",
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
|
@ -2426,7 +2430,7 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"tagRenderings": {
|
"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, ...\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",
|
"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\n\ngroup: tagrenderings",
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
"anyOf": [
|
"anyOf": [
|
||||||
|
@ -2486,7 +2490,7 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"filter": {
|
"filter": {
|
||||||
"description": "All the extra questions for filtering.\nIf a string is given, mapComplete will search in 'filters.json' for the appropriate filter or will try to parse it as `layername.filterid` and us that one",
|
"description": "All the extra questions for filtering.\nIf a string is given, mapComplete will search in 'filters.json' for the appropriate filter or will try to parse it as `layername.filterid` and us that one\n\ngroup: filters",
|
||||||
"anyOf": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"type": "array",
|
"type": "array",
|
||||||
|
@ -2515,7 +2519,7 @@ export default {
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"deletion": {
|
"deletion": {
|
||||||
"description": "This block defines under what circumstances the delete dialog is shown for objects of this layer.\nIf set, a dialog is shown to the user to (soft) delete the point.\nThe dialog is built to be user friendly and to prevent mistakes.\nIf deletion is not possible, the dialog will hide itself and show the reason of non-deletability instead.\n\nTo configure, the following values are possible:\n\n- false: never ever show the delete button\n- true: show the default delete button\n- undefined: use the mapcomplete default to show deletion or not. Currently, this is the same as 'false' but this will change in the future\n- or: a hash with options (see below)\n\n The delete dialog\n =================\n\n\n\n#### Hard deletion if enough experience\n\nA feature can only be deleted from OpenStreetMap by mapcomplete if:\n\n- It is a node\n- No ways or relations use the node\n- The logged-in user has enough experience OR the user is the only one to have edited the point previously\n- The logged-in user has no unread messages (or has a ton of experience)\n- The user did not select one of the 'non-delete-options' (see below)\n\nIn all other cases, a 'soft deletion' is used.\n\n#### Soft deletion\n\nA 'soft deletion' is when the point isn't deleted from OSM but retagged so that it'll won't how up in the mapcomplete theme anymore.\nThis makes it look like it was deleted, without doing damage. A fixme will be added to the point.\n\nNote that a soft deletion is _only_ possible if these tags are provided by the theme creator, as they'll be different for every theme\n\n#### No-delete options\n\nIn some cases, the contributor might want to delete something for the wrong reason (e.g. someone who wants to have a path removed \"because the path is on their private property\").\nHowever, the path exists in reality and should thus be on OSM - otherwise the next contributor will pass by and notice \"hey, there is a path missing here! Let me redraw it in OSM!)\n\nThe correct approach is to retag the feature in such a way that it is semantically correct *and* that it doesn't show up on the theme anymore.\nA no-delete option is offered as 'reason to delete it', but secretly retags.",
|
"description": "This block defines under what circumstances the delete dialog is shown for objects of this layer.\nIf set, a dialog is shown to the user to (soft) delete the point.\nThe dialog is built to be user friendly and to prevent mistakes.\nIf deletion is not possible, the dialog will hide itself and show the reason of non-deletability instead.\n\nTo configure, the following values are possible:\n\n- false: never ever show the delete button\n- true: show the default delete button\n- undefined: use the mapcomplete default to show deletion or not. Currently, this is the same as 'false' but this will change in the future\n- or: a hash with options (see below)\n\n The delete dialog\n =================\n\n\n\n#### Hard deletion if enough experience\n\nA feature can only be deleted from OpenStreetMap by mapcomplete if:\n\n- It is a node\n- No ways or relations use the node\n- The logged-in user has enough experience OR the user is the only one to have edited the point previously\n- The logged-in user has no unread messages (or has a ton of experience)\n- The user did not select one of the 'non-delete-options' (see below)\n\nIn all other cases, a 'soft deletion' is used.\n\n#### Soft deletion\n\nA 'soft deletion' is when the point isn't deleted from OSM but retagged so that it'll won't how up in the mapcomplete theme anymore.\nThis makes it look like it was deleted, without doing damage. A fixme will be added to the point.\n\nNote that a soft deletion is _only_ possible if these tags are provided by the theme creator, as they'll be different for every theme\n\n#### No-delete options\n\nIn some cases, the contributor might want to delete something for the wrong reason (e.g. someone who wants to have a path removed \"because the path is on their private property\").\nHowever, the path exists in reality and should thus be on OSM - otherwise the next contributor will pass by and notice \"hey, there is a path missing here! Let me redraw it in OSM!)\n\nThe correct approach is to retag the feature in such a way that it is semantically correct *and* that it doesn't show up on the theme anymore.\nA no-delete option is offered as 'reason to delete it', but secretly retags.\n\ngroup: editing",
|
||||||
"anyOf": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/DeleteConfigJson"
|
"$ref": "#/definitions/DeleteConfigJson"
|
||||||
|
@ -2526,7 +2530,7 @@ export default {
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"allowMove": {
|
"allowMove": {
|
||||||
"description": "Indicates if a point can be moved and configures the modalities.\n\nA feature can be moved by MapComplete if:\n\n- It is a point\n- The point is _not_ part of a way or a a relation.\n\nOff by default. Can be enabled by setting this flag or by configuring.",
|
"description": "Indicates if a point can be moved and configures the modalities.\n\nA feature can be moved by MapComplete if:\n\n- It is a point\n- The point is _not_ part of a way or a a relation.\n\nOff by default. Can be enabled by setting this flag or by configuring.\n\ngroup: editing",
|
||||||
"anyOf": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/default_3"
|
"$ref": "#/definitions/default_3"
|
||||||
|
@ -2537,7 +2541,7 @@ export default {
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"allowSplit": {
|
"allowSplit": {
|
||||||
"description": "If set, a 'split this way' button is shown on objects rendered as LineStrings, e.g. highways.\n\nIf the way is part of a relation, MapComplete will attempt to update this relation as well",
|
"description": "If set, a 'split this way' button is shown on objects rendered as LineStrings, e.g. highways.\n\nIf the way is part of a relation, MapComplete will attempt to update this relation as well\n\ngroup: editing",
|
||||||
"type": "boolean"
|
"type": "boolean"
|
||||||
},
|
},
|
||||||
"units": {
|
"units": {
|
||||||
|
@ -2547,7 +2551,7 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"syncSelection": {
|
"syncSelection": {
|
||||||
"description": "If set, synchronizes whether or not this layer is enabled.\n\nno: Do not sync at all, always revert to default\nlocal: keep selection on local storage\ntheme-only: sync via OSM, but this layer will only be toggled in this theme\nglobal: all layers with this ID will be synced accross all themes",
|
"description": "If set, synchronizes whether or not this layer is enabled.\n\nno: Do not sync at all, always revert to default\nlocal: keep selection on local storage\ntheme-only: sync via OSM, but this layer will only be toggled in this theme\nglobal: all layers with this ID will be synced accross all themes\n\ngroup: advanced",
|
||||||
"enum": [
|
"enum": [
|
||||||
"global",
|
"global",
|
||||||
"local",
|
"local",
|
||||||
|
@ -2557,8 +2561,16 @@ export default {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"#": {
|
"#": {
|
||||||
"description": "Used for comments and/or to disable some checks\n\nno-question-hint-check: disables a check in MiscTagRenderingChecks which complains about 'div', 'span' or 'class=subtle'-HTML elements in the tagRendering",
|
"description": "Used for comments and/or to disable some checks\n\nno-question-hint-check: disables a check in MiscTagRenderingChecks which complains about 'div', 'span' or 'class=subtle'-HTML elements in the tagRendering\n\ngroup: special",
|
||||||
"type": "string"
|
"type": "string"
|
||||||
|
},
|
||||||
|
"popupInFloatover": {
|
||||||
|
"description": "If set, open the selectedElementView in a floatOver instead of on the right\n\ngroup: advanced",
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
|
"fullNodeDatabase": {
|
||||||
|
"description": "_Set automatically by MapComplete, please ignore_\n\ngroup: hidden",
|
||||||
|
"type": "boolean"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -49,23 +49,8 @@
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"fill": {
|
|
||||||
"description": "Whether or not to fill polygons",
|
|
||||||
"anyOf": [
|
|
||||||
{
|
|
||||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"enum": [
|
|
||||||
"no",
|
|
||||||
"yes"
|
|
||||||
],
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"fillColor": {
|
"fillColor": {
|
||||||
"description": "The color to fill a polygon with.\nIf undefined, this will be slightly more opaque version of the stroke line",
|
"description": "The color to fill a polygon with.\nIf undefined, this will be slightly more opaque version of the stroke line.\nUse '#00000000' to make the fill invisible",
|
||||||
"anyOf": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||||
|
@ -248,7 +233,7 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"description": {
|
"description": {
|
||||||
"description": "A human-readable text explaining what this tagRendering does",
|
"description": "A human-readable text explaining what this tagRendering does.\nMostly used for the shared tagrenderings",
|
||||||
"anyOf": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/Record<string,string>"
|
"$ref": "#/definitions/Record<string,string>"
|
||||||
|
|
|
@ -49,23 +49,8 @@ export default {
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"fill": {
|
|
||||||
"description": "Whether or not to fill polygons",
|
|
||||||
"anyOf": [
|
|
||||||
{
|
|
||||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"enum": [
|
|
||||||
"no",
|
|
||||||
"yes"
|
|
||||||
],
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"fillColor": {
|
"fillColor": {
|
||||||
"description": "The color to fill a polygon with.\nIf undefined, this will be slightly more opaque version of the stroke line",
|
"description": "The color to fill a polygon with.\nIf undefined, this will be slightly more opaque version of the stroke line.\nUse '#00000000' to make the fill invisible",
|
||||||
"anyOf": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||||
|
@ -243,7 +228,7 @@ export default {
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"description": {
|
"description": {
|
||||||
"description": "A human-readable text explaining what this tagRendering does",
|
"description": "A human-readable text explaining what this tagRendering does.\nMostly used for the shared tagrenderings",
|
||||||
"anyOf": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/Record<string,string>"
|
"$ref": "#/definitions/Record<string,string>"
|
||||||
|
|
|
@ -6,7 +6,15 @@
|
||||||
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation"
|
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation"
|
||||||
},
|
},
|
||||||
"then": {
|
"then": {
|
||||||
"description": "Shown if the 'if is fulfilled\nType: rendered"
|
"description": "Shown if the 'if is fulfilled\nType: rendered",
|
||||||
|
"anyOf": [
|
||||||
|
{
|
||||||
|
"$ref": "#/definitions/Record<string,string>"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"icon": {
|
"icon": {
|
||||||
"description": "An extra icon supporting the choice\nType: icon",
|
"description": "An extra icon supporting the choice\nType: icon",
|
||||||
|
@ -264,7 +272,7 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"description": {
|
"description": {
|
||||||
"description": "A human-readable text explaining what this tagRendering does",
|
"description": "A human-readable text explaining what this tagRendering does.\nMostly used for the shared tagrenderings",
|
||||||
"anyOf": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/Record<string,string>"
|
"$ref": "#/definitions/Record<string,string>"
|
||||||
|
|
|
@ -6,7 +6,15 @@ export default {
|
||||||
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation"
|
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation"
|
||||||
},
|
},
|
||||||
"then": {
|
"then": {
|
||||||
"description": "Shown if the 'if is fulfilled\nType: rendered"
|
"description": "Shown if the 'if is fulfilled\nType: rendered",
|
||||||
|
"anyOf": [
|
||||||
|
{
|
||||||
|
"$ref": "#/definitions/Record<string,string>"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"icon": {
|
"icon": {
|
||||||
"description": "An extra icon supporting the choice\nType: icon",
|
"description": "An extra icon supporting the choice\nType: icon",
|
||||||
|
@ -259,7 +267,7 @@ export default {
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"description": {
|
"description": {
|
||||||
"description": "A human-readable text explaining what this tagRendering does",
|
"description": "A human-readable text explaining what this tagRendering does.\nMostly used for the shared tagrenderings",
|
||||||
"anyOf": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/Record<string,string>"
|
"$ref": "#/definitions/Record<string,string>"
|
||||||
|
|
|
@ -320,7 +320,7 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"description": {
|
"description": {
|
||||||
"description": "A human-readable text explaining what this tagRendering does",
|
"description": "A human-readable text explaining what this tagRendering does.\nMostly used for the shared tagrenderings",
|
||||||
"anyOf": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/Record<string,string>"
|
"$ref": "#/definitions/Record<string,string>"
|
||||||
|
|
|
@ -315,7 +315,7 @@ export default {
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"description": {
|
"description": {
|
||||||
"description": "A human-readable text explaining what this tagRendering does",
|
"description": "A human-readable text explaining what this tagRendering does.\nMostly used for the shared tagrenderings",
|
||||||
"anyOf": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/Record<string,string>"
|
"$ref": "#/definitions/Record<string,string>"
|
||||||
|
|
|
@ -100,7 +100,7 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"description": {
|
"description": {
|
||||||
"description": "A human-readable text explaining what this tagRendering does",
|
"description": "A human-readable text explaining what this tagRendering does.\nMostly used for the shared tagrenderings",
|
||||||
"anyOf": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/Record<string,string>"
|
"$ref": "#/definitions/Record<string,string>"
|
||||||
|
@ -341,7 +341,7 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"description": {
|
"description": {
|
||||||
"description": "A human-readable text explaining what this tagRendering does",
|
"description": "A human-readable text explaining what this tagRendering does.\nMostly used for the shared tagrenderings",
|
||||||
"anyOf": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/Record<string,string>"
|
"$ref": "#/definitions/Record<string,string>"
|
||||||
|
@ -500,7 +500,15 @@
|
||||||
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation"
|
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation"
|
||||||
},
|
},
|
||||||
"then": {
|
"then": {
|
||||||
"description": "Shown if the 'if is fulfilled\nType: rendered"
|
"description": "Shown if the 'if is fulfilled\nType: rendered",
|
||||||
|
"anyOf": [
|
||||||
|
{
|
||||||
|
"$ref": "#/definitions/Record<string,string>"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"icon": {
|
"icon": {
|
||||||
"description": "An extra icon supporting the choice\nType: icon",
|
"description": "An extra icon supporting the choice\nType: icon",
|
||||||
|
|
|
@ -100,7 +100,7 @@ export default {
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"description": {
|
"description": {
|
||||||
"description": "A human-readable text explaining what this tagRendering does",
|
"description": "A human-readable text explaining what this tagRendering does.\nMostly used for the shared tagrenderings",
|
||||||
"anyOf": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/Record<string,string>"
|
"$ref": "#/definitions/Record<string,string>"
|
||||||
|
@ -336,7 +336,7 @@ export default {
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"description": {
|
"description": {
|
||||||
"description": "A human-readable text explaining what this tagRendering does",
|
"description": "A human-readable text explaining what this tagRendering does.\nMostly used for the shared tagrenderings",
|
||||||
"anyOf": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/Record<string,string>"
|
"$ref": "#/definitions/Record<string,string>"
|
||||||
|
@ -493,7 +493,15 @@ export default {
|
||||||
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation"
|
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation"
|
||||||
},
|
},
|
||||||
"then": {
|
"then": {
|
||||||
"description": "Shown if the 'if is fulfilled\nType: rendered"
|
"description": "Shown if the 'if is fulfilled\nType: rendered",
|
||||||
|
"anyOf": [
|
||||||
|
{
|
||||||
|
"$ref": "#/definitions/Record<string,string>"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"icon": {
|
"icon": {
|
||||||
"description": "An extra icon supporting the choice\nType: icon",
|
"description": "An extra icon supporting the choice\nType: icon",
|
||||||
|
|
|
@ -193,7 +193,7 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"description": {
|
"description": {
|
||||||
"description": "A human-readable text explaining what this tagRendering does",
|
"description": "A human-readable text explaining what this tagRendering does.\nMostly used for the shared tagrenderings",
|
||||||
"anyOf": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/Record<string,string>"
|
"$ref": "#/definitions/Record<string,string>"
|
||||||
|
@ -352,7 +352,15 @@
|
||||||
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation"
|
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation"
|
||||||
},
|
},
|
||||||
"then": {
|
"then": {
|
||||||
"description": "Shown if the 'if is fulfilled\nType: rendered"
|
"description": "Shown if the 'if is fulfilled\nType: rendered",
|
||||||
|
"anyOf": [
|
||||||
|
{
|
||||||
|
"$ref": "#/definitions/Record<string,string>"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"icon": {
|
"icon": {
|
||||||
"description": "An extra icon supporting the choice\nType: icon",
|
"description": "An extra icon supporting the choice\nType: icon",
|
||||||
|
|
|
@ -188,7 +188,7 @@ export default {
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"description": {
|
"description": {
|
||||||
"description": "A human-readable text explaining what this tagRendering does",
|
"description": "A human-readable text explaining what this tagRendering does.\nMostly used for the shared tagrenderings",
|
||||||
"anyOf": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/Record<string,string>"
|
"$ref": "#/definitions/Record<string,string>"
|
||||||
|
@ -345,7 +345,15 @@ export default {
|
||||||
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation"
|
"description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation"
|
||||||
},
|
},
|
||||||
"then": {
|
"then": {
|
||||||
"description": "Shown if the 'if is fulfilled\nType: rendered"
|
"description": "Shown if the 'if is fulfilled\nType: rendered",
|
||||||
|
"anyOf": [
|
||||||
|
{
|
||||||
|
"$ref": "#/definitions/Record<string,string>"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"icon": {
|
"icon": {
|
||||||
"description": "An extra icon supporting the choice\nType: icon",
|
"description": "An extra icon supporting the choice\nType: icon",
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"description": {
|
"description": {
|
||||||
"description": "A human-readable text explaining what this tagRendering does",
|
"description": "A human-readable text explaining what this tagRendering does.\nMostly used for the shared tagrenderings",
|
||||||
"anyOf": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/Record<string,string>"
|
"$ref": "#/definitions/Record<string,string>"
|
||||||
|
|
|
@ -28,7 +28,7 @@ export default {
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"description": {
|
"description": {
|
||||||
"description": "A human-readable text explaining what this tagRendering does",
|
"description": "A human-readable text explaining what this tagRendering does.\nMostly used for the shared tagrenderings",
|
||||||
"anyOf": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/Record<string,string>"
|
"$ref": "#/definitions/Record<string,string>"
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"appliesToKey": {
|
"appliesToKey": {
|
||||||
"description": "Every key from this list will be normalized.\n\nTo render a united value properly, use",
|
"description": "Every key from this list will be normalized.\n\nTo render the value properly (with a human readable denomination), use `{canonical(<key>)}`",
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
|
|
|
@ -3,7 +3,7 @@ export default {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"appliesToKey": {
|
"appliesToKey": {
|
||||||
"description": "Every key from this list will be normalized.\n\nTo render a united value properly, use",
|
"description": "Every key from this list will be normalized.\n\nTo render the value properly (with a human readable denomination), use `{canonical(<key>)}`",
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
|
|
|
@ -13,15 +13,17 @@ export class ExtractImages extends Conversion<
|
||||||
private _isOfficial: boolean
|
private _isOfficial: boolean
|
||||||
private _sharedTagRenderings: Set<string>
|
private _sharedTagRenderings: Set<string>
|
||||||
|
|
||||||
private static readonly layoutMetaPaths = metapaths.filter(
|
private static readonly layoutMetaPaths = metapaths.filter((mp) => {
|
||||||
(mp) =>
|
const typeHint = mp.hints.typehint
|
||||||
|
return (
|
||||||
ExtractImages.mightBeTagRendering(<any>mp) ||
|
ExtractImages.mightBeTagRendering(<any>mp) ||
|
||||||
(mp.typeHint !== undefined &&
|
(typeHint !== undefined &&
|
||||||
(mp.typeHint === "image" ||
|
(typeHint === "image" ||
|
||||||
mp.typeHint === "icon" ||
|
typeHint === "icon" ||
|
||||||
mp.typeHint === "image[]" ||
|
typeHint === "image[]" ||
|
||||||
mp.typeHint === "icon[]"))
|
typeHint === "icon[]"))
|
||||||
)
|
)
|
||||||
|
})
|
||||||
private static readonly tagRenderingMetaPaths = tagrenderingmetapaths
|
private static readonly tagRenderingMetaPaths = tagrenderingmetapaths
|
||||||
|
|
||||||
constructor(isOfficial: boolean, sharedTagRenderings: Set<string>) {
|
constructor(isOfficial: boolean, sharedTagRenderings: Set<string>) {
|
||||||
|
@ -94,7 +96,7 @@ export class ExtractImages extends Conversion<
|
||||||
for (const metapath of ExtractImages.layoutMetaPaths) {
|
for (const metapath of ExtractImages.layoutMetaPaths) {
|
||||||
const mightBeTr = ExtractImages.mightBeTagRendering(<any>metapath)
|
const mightBeTr = ExtractImages.mightBeTagRendering(<any>metapath)
|
||||||
const allRenderedValuesAreImages =
|
const allRenderedValuesAreImages =
|
||||||
metapath.typeHint === "icon" || metapath.typeHint === "image"
|
metapath.hints.typehint === "icon" || metapath.hints.typehint === "image"
|
||||||
const found = Utils.CollectPath(metapath.path, json)
|
const found = Utils.CollectPath(metapath.path, json)
|
||||||
if (mightBeTr) {
|
if (mightBeTr) {
|
||||||
// We might have tagRenderingConfigs containing icons here
|
// We might have tagRenderingConfigs containing icons here
|
||||||
|
@ -124,9 +126,10 @@ export class ExtractImages extends Conversion<
|
||||||
for (const trpath of ExtractImages.tagRenderingMetaPaths) {
|
for (const trpath of ExtractImages.tagRenderingMetaPaths) {
|
||||||
// Inspect all the rendered values
|
// Inspect all the rendered values
|
||||||
const fromPath = Utils.CollectPath(trpath.path, foundImage)
|
const fromPath = Utils.CollectPath(trpath.path, foundImage)
|
||||||
const isRendered = trpath.typeHint === "rendered"
|
const isRendered = trpath.hints.typehint === "rendered"
|
||||||
const isImage =
|
const isImage =
|
||||||
trpath.typeHint === "icon" || trpath.typeHint === "image"
|
trpath.hints.typehint === "icon" ||
|
||||||
|
trpath.hints.typehint === "image"
|
||||||
for (const img of fromPath) {
|
for (const img of fromPath) {
|
||||||
if (allRenderedValuesAreImages && isRendered) {
|
if (allRenderedValuesAreImages && isRendered) {
|
||||||
// What we found is an image
|
// What we found is an image
|
||||||
|
@ -310,7 +313,7 @@ export class FixImages extends DesugaringStep<LayoutConfigJson> {
|
||||||
json = Utils.Clone(json)
|
json = Utils.Clone(json)
|
||||||
|
|
||||||
for (const metapath of metapaths) {
|
for (const metapath of metapaths) {
|
||||||
if (metapath.typeHint !== "image" && metapath.typeHint !== "icon") {
|
if (metapath.hints.typehint !== "image" && metapath.hints.typehint !== "icon") {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
const mightBeTr = ExtractImages.mightBeTagRendering(<any>metapath)
|
const mightBeTr = ExtractImages.mightBeTagRendering(<any>metapath)
|
||||||
|
@ -323,7 +326,7 @@ export class FixImages extends DesugaringStep<LayoutConfigJson> {
|
||||||
// We might have reached a tagRenderingConfig containing icons
|
// We might have reached a tagRenderingConfig containing icons
|
||||||
// lets walk every rendered value and fix the images in there
|
// lets walk every rendered value and fix the images in there
|
||||||
for (const trpath of tagrenderingmetapaths) {
|
for (const trpath of tagrenderingmetapaths) {
|
||||||
if (trpath.typeHint !== "rendered") {
|
if (trpath.hints.typehint !== "rendered") {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
Utils.WalkPath(trpath.path, leaf, (rendered) => {
|
Utils.WalkPath(trpath.path, leaf, (rendered) => {
|
||||||
|
|
|
@ -16,20 +16,28 @@ export interface LayerConfigJson {
|
||||||
/**
|
/**
|
||||||
* The id of this layer.
|
* The id of this layer.
|
||||||
* This should be a simple, lowercase, human readable string that is used to identify the layer.
|
* This should be a simple, lowercase, human readable string that is used to identify the layer.
|
||||||
|
*
|
||||||
|
* group: basic
|
||||||
|
* question: What is the identifier of this layer?
|
||||||
*/
|
*/
|
||||||
id: string
|
id: string
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The name of this layer
|
* Used in the layer control panel to toggle a layer on and of.
|
||||||
* Used in the layer control panel and the 'Personal theme'.
|
|
||||||
*
|
*
|
||||||
* If not given, will be hidden (and thus not toggable) in the layer control
|
* ifunset: This will hide the layer in the layer control, making it not filterable and not toggleable
|
||||||
|
*
|
||||||
|
* group: basic
|
||||||
|
* question: What is the name of this layer?
|
||||||
*/
|
*/
|
||||||
name?: string | Record<string, string>
|
name?: string | Record<string, string>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A description for this layer.
|
* A description for the features shown in this layer.
|
||||||
* Shown in the layer selections and in the personel theme
|
* This often resembles the introduction of the wiki.osm.org-page for this feature.
|
||||||
|
*
|
||||||
|
* group: basic
|
||||||
|
* question: How would you describe the features that are shown on this layer?
|
||||||
*/
|
*/
|
||||||
description?: string | Record<string, string>
|
description?: string | Record<string, string>
|
||||||
|
|
||||||
|
@ -41,6 +49,7 @@ export interface LayerConfigJson {
|
||||||
* Every source _must_ define which tags _must_ be present in order to be picked up.
|
* Every source _must_ define which tags _must_ be present in order to be picked up.
|
||||||
*
|
*
|
||||||
* Note: a source must always be defined. 'special' is only allowed if this is a builtin-layer
|
* Note: a source must always be defined. 'special' is only allowed if this is a builtin-layer
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
source:
|
source:
|
||||||
| "special"
|
| "special"
|
||||||
|
@ -111,12 +120,16 @@ export interface LayerConfigJson {
|
||||||
* "_some_key:=some_javascript_expression"
|
* "_some_key:=some_javascript_expression"
|
||||||
* ]
|
* ]
|
||||||
*
|
*
|
||||||
|
* group: advanced
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
calculatedTags?: string[]
|
calculatedTags?: string[]
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* If set, this layer will not query overpass; but it'll still match the tags above which are by chance returned by other layers.
|
* If set, this layer will not query overpass; but it'll still match the tags above which are by chance returned by other layers.
|
||||||
* Works well together with 'passAllFeatures', to add decoration
|
* Works well together with 'passAllFeatures', to add decoration
|
||||||
|
*
|
||||||
|
* group: advanced
|
||||||
*/
|
*/
|
||||||
doNotDownload?: boolean
|
doNotDownload?: boolean
|
||||||
|
|
||||||
|
@ -125,6 +138,8 @@ export interface LayerConfigJson {
|
||||||
* This is useful to hide certain features from view.
|
* This is useful to hide certain features from view.
|
||||||
*
|
*
|
||||||
* The default value is 'yes'
|
* The default value is 'yes'
|
||||||
|
*
|
||||||
|
* group: advanced
|
||||||
*/
|
*/
|
||||||
isShown?: TagConfigJson
|
isShown?: TagConfigJson
|
||||||
|
|
||||||
|
@ -132,29 +147,44 @@ export interface LayerConfigJson {
|
||||||
* Advanced option - might be set by the theme compiler
|
* Advanced option - might be set by the theme compiler
|
||||||
*
|
*
|
||||||
* If true, this data will _always_ be loaded, even if the theme is disabled
|
* If true, this data will _always_ be loaded, even if the theme is disabled
|
||||||
|
*
|
||||||
|
* group: advanced
|
||||||
*/
|
*/
|
||||||
forceLoad?: false | boolean
|
forceLoad?: false | boolean
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The minimum needed zoomlevel required before loading the data
|
* The minimum needed zoomlevel required to start loading and displaying the data.
|
||||||
|
* This can be used to only show common features (e.g. a bicycle parking) only when the map is zoomed in very much (17).
|
||||||
|
* This prevents cluttering the map with thousands of parkings if one is looking to an entire city.
|
||||||
|
*
|
||||||
* Default: 0
|
* Default: 0
|
||||||
|
*
|
||||||
|
* group: basic
|
||||||
|
* question: At what zoom level should features of the layer be shown?
|
||||||
|
* ifunset: Always load this layer, even if the entire world is in view.
|
||||||
*/
|
*/
|
||||||
minzoom?: number
|
minzoom?: number
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Indicates if this layer is shown by default;
|
* Indicates if this layer is shown by default;
|
||||||
* can be used to hide a layer from start, or to load the layer but only to show it where appropriate (e.g. for snapping to it)
|
* can be used to hide a layer from start, or to load the layer but only to show it where appropriate (e.g. for snapping to it)
|
||||||
|
*
|
||||||
|
* group: advanced
|
||||||
*/
|
*/
|
||||||
shownByDefault?: true | boolean
|
shownByDefault?: true | boolean
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The zoom level at which point the data is hidden again
|
* The zoom level at which point the data is hidden again
|
||||||
* Default: 100 (thus: always visible
|
* Default: 100 (thus: always visible
|
||||||
|
*
|
||||||
|
* group: advanced
|
||||||
*/
|
*/
|
||||||
minzoomVisible?: number
|
minzoomVisible?: number
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The title shown in a popup for elements of this layer.
|
* The title shown in a popup for elements of this layer.
|
||||||
|
*
|
||||||
|
* group: infobox
|
||||||
*/
|
*/
|
||||||
title?: string | TagRenderingConfigJson
|
title?: string | TagRenderingConfigJson
|
||||||
|
|
||||||
|
@ -165,11 +195,14 @@ export interface LayerConfigJson {
|
||||||
* Note that "defaults" will insert all the default titleIcons (which are added automatically)
|
* Note that "defaults" will insert all the default titleIcons (which are added automatically)
|
||||||
*
|
*
|
||||||
* Type: icon[]
|
* Type: icon[]
|
||||||
|
* group: infobox
|
||||||
*/
|
*/
|
||||||
titleIcons?: (string | TagRenderingConfigJson)[] | ["defaults"]
|
titleIcons?: (string | TagRenderingConfigJson)[] | ["defaults"]
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Visualisation of the items on the map
|
* Visualisation of the items on the map
|
||||||
|
*
|
||||||
|
* group: maprendering
|
||||||
*/
|
*/
|
||||||
mapRendering:
|
mapRendering:
|
||||||
| null
|
| null
|
||||||
|
@ -186,7 +219,9 @@ export interface LayerConfigJson {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* If set, this layer will pass all the features it receives onto the next layer.
|
* If set, this layer will pass all the features it receives onto the next layer.
|
||||||
* This is ideal for decoration, e.g. directionss on cameras
|
* This is ideal for decoration, e.g. directions on cameras
|
||||||
|
*
|
||||||
|
* group: advanced
|
||||||
*/
|
*/
|
||||||
passAllFeatures?: boolean
|
passAllFeatures?: boolean
|
||||||
|
|
||||||
|
@ -202,6 +237,8 @@ export interface LayerConfigJson {
|
||||||
*
|
*
|
||||||
* Note: the icon of the preset is determined automatically based on the tags and the icon above. Don't worry about that!
|
* Note: the icon of the preset is determined automatically based on the tags and the icon above. Don't worry about that!
|
||||||
* NB: if no presets are defined, the popup to add new points doesn't show up at all
|
* NB: if no presets are defined, the popup to add new points doesn't show up at all
|
||||||
|
*
|
||||||
|
* group: basic
|
||||||
*/
|
*/
|
||||||
presets?: {
|
presets?: {
|
||||||
/**
|
/**
|
||||||
|
@ -284,6 +321,8 @@ export interface LayerConfigJson {
|
||||||
* At last, one can define a group of renderings where parts of all strings will be replaced by multiple other strings.
|
* At last, one can define a group of renderings where parts of all strings will be replaced by multiple other strings.
|
||||||
* This is mainly create questions for a 'left' and a 'right' side of the road.
|
* This is mainly create questions for a 'left' and a 'right' side of the road.
|
||||||
* These will be grouped and questions will be asked together
|
* These will be grouped and questions will be asked together
|
||||||
|
*
|
||||||
|
* group: tagrenderings
|
||||||
*/
|
*/
|
||||||
tagRenderings?: (
|
tagRenderings?: (
|
||||||
| string
|
| string
|
||||||
|
@ -305,6 +344,8 @@ export interface LayerConfigJson {
|
||||||
/**
|
/**
|
||||||
* All the extra questions for filtering.
|
* All the extra questions for filtering.
|
||||||
* If a string is given, mapComplete will search in 'filters.json' for the appropriate filter or will try to parse it as `layername.filterid` and us that one
|
* If a string is given, mapComplete will search in 'filters.json' for the appropriate filter or will try to parse it as `layername.filterid` and us that one
|
||||||
|
*
|
||||||
|
* group: filters
|
||||||
*/
|
*/
|
||||||
filter?: (FilterConfigJson | string)[] | { sameAs: string }
|
filter?: (FilterConfigJson | string)[] | { sameAs: string }
|
||||||
|
|
||||||
|
@ -353,6 +394,8 @@ export interface LayerConfigJson {
|
||||||
The correct approach is to retag the feature in such a way that it is semantically correct *and* that it doesn't show up on the theme anymore.
|
The correct approach is to retag the feature in such a way that it is semantically correct *and* that it doesn't show up on the theme anymore.
|
||||||
A no-delete option is offered as 'reason to delete it', but secretly retags.
|
A no-delete option is offered as 'reason to delete it', but secretly retags.
|
||||||
|
|
||||||
|
group: editing
|
||||||
|
|
||||||
*/
|
*/
|
||||||
deletion?: boolean | DeleteConfigJson
|
deletion?: boolean | DeleteConfigJson
|
||||||
|
|
||||||
|
@ -365,6 +408,8 @@ export interface LayerConfigJson {
|
||||||
* - The point is _not_ part of a way or a a relation.
|
* - The point is _not_ part of a way or a a relation.
|
||||||
*
|
*
|
||||||
* Off by default. Can be enabled by setting this flag or by configuring.
|
* Off by default. Can be enabled by setting this flag or by configuring.
|
||||||
|
*
|
||||||
|
* group: editing
|
||||||
*/
|
*/
|
||||||
allowMove?: boolean | MoveConfigJson
|
allowMove?: boolean | MoveConfigJson
|
||||||
|
|
||||||
|
@ -372,11 +417,15 @@ export interface LayerConfigJson {
|
||||||
* If set, a 'split this way' button is shown on objects rendered as LineStrings, e.g. highways.
|
* If set, a 'split this way' button is shown on objects rendered as LineStrings, e.g. highways.
|
||||||
*
|
*
|
||||||
* If the way is part of a relation, MapComplete will attempt to update this relation as well
|
* If the way is part of a relation, MapComplete will attempt to update this relation as well
|
||||||
|
*
|
||||||
|
* group: editing
|
||||||
*/
|
*/
|
||||||
allowSplit?: boolean
|
allowSplit?: boolean
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see UnitConfigJson
|
* @see UnitConfigJson
|
||||||
|
*
|
||||||
|
* group: editing
|
||||||
*/
|
*/
|
||||||
units?: UnitConfigJson[]
|
units?: UnitConfigJson[]
|
||||||
|
|
||||||
|
@ -387,6 +436,8 @@ export interface LayerConfigJson {
|
||||||
* local: keep selection on local storage
|
* local: keep selection on local storage
|
||||||
* theme-only: sync via OSM, but this layer will only be toggled in this theme
|
* theme-only: sync via OSM, but this layer will only be toggled in this theme
|
||||||
* global: all layers with this ID will be synced accross all themes
|
* global: all layers with this ID will be synced accross all themes
|
||||||
|
*
|
||||||
|
* group: advanced
|
||||||
*/
|
*/
|
||||||
syncSelection?: "no" | "local" | "theme-only" | "global"
|
syncSelection?: "no" | "local" | "theme-only" | "global"
|
||||||
|
|
||||||
|
@ -394,16 +445,22 @@ export interface LayerConfigJson {
|
||||||
* Used for comments and/or to disable some checks
|
* Used for comments and/or to disable some checks
|
||||||
*
|
*
|
||||||
* no-question-hint-check: disables a check in MiscTagRenderingChecks which complains about 'div', 'span' or 'class=subtle'-HTML elements in the tagRendering
|
* no-question-hint-check: disables a check in MiscTagRenderingChecks which complains about 'div', 'span' or 'class=subtle'-HTML elements in the tagRendering
|
||||||
|
*
|
||||||
|
* group: special
|
||||||
*/
|
*/
|
||||||
"#"?: string | "no-question-hint-check"
|
"#"?: string | "no-question-hint-check"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* If set, open the selectedElementView in a floatOver instead of on the right
|
* If set, open the selectedElementView in a floatOver instead of on the right
|
||||||
|
*
|
||||||
|
* group: advanced
|
||||||
*/
|
*/
|
||||||
popupInFloatover?: boolean
|
popupInFloatover?: boolean
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* _Set automatically by MapComplete, please ignore_
|
* _Set automatically by MapComplete, please ignore_
|
||||||
|
*
|
||||||
|
* group: hidden
|
||||||
*/
|
*/
|
||||||
fullNodeDatabase?: boolean
|
fullNodeDatabase?: boolean
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,7 +25,8 @@ export interface TagRenderingConfigJson {
|
||||||
classes?: string | string[]
|
classes?: string | string[]
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A human-readable text explaining what this tagRendering does
|
* A human-readable text explaining what this tagRendering does.
|
||||||
|
* Mostly used for the shared tagrenderings
|
||||||
*/
|
*/
|
||||||
description?: string | Record<string, string>
|
description?: string | Record<string, string>
|
||||||
|
|
||||||
|
|
|
@ -1,27 +1,23 @@
|
||||||
import LayoutConfig from "./ThemeConfig/LayoutConfig"
|
import LayoutConfig from "./ThemeConfig/LayoutConfig"
|
||||||
import { SpecialVisualizationState } from "../UI/SpecialVisualization"
|
import {SpecialVisualizationState} from "../UI/SpecialVisualization"
|
||||||
import { Changes } from "../Logic/Osm/Changes"
|
import {Changes} from "../Logic/Osm/Changes"
|
||||||
import { ImmutableStore, Store, UIEventSource } from "../Logic/UIEventSource"
|
import {ImmutableStore, Store, UIEventSource} from "../Logic/UIEventSource"
|
||||||
import {
|
import {FeatureSource, IndexedFeatureSource, WritableFeatureSource,} from "../Logic/FeatureSource/FeatureSource"
|
||||||
FeatureSource,
|
import {OsmConnection} from "../Logic/Osm/OsmConnection"
|
||||||
IndexedFeatureSource,
|
import {ExportableMap, MapProperties} from "./MapProperties"
|
||||||
WritableFeatureSource,
|
|
||||||
} from "../Logic/FeatureSource/FeatureSource"
|
|
||||||
import { OsmConnection } from "../Logic/Osm/OsmConnection"
|
|
||||||
import { ExportableMap, MapProperties } from "./MapProperties"
|
|
||||||
import LayerState from "../Logic/State/LayerState"
|
import LayerState from "../Logic/State/LayerState"
|
||||||
import { Feature, Point, Polygon } from "geojson"
|
import {Feature, Point, Polygon} from "geojson"
|
||||||
import FullNodeDatabaseSource from "../Logic/FeatureSource/TiledFeatureSource/FullNodeDatabaseSource"
|
import FullNodeDatabaseSource from "../Logic/FeatureSource/TiledFeatureSource/FullNodeDatabaseSource"
|
||||||
import { Map as MlMap } from "maplibre-gl"
|
import {Map as MlMap} from "maplibre-gl"
|
||||||
import InitialMapPositioning from "../Logic/Actors/InitialMapPositioning"
|
import InitialMapPositioning from "../Logic/Actors/InitialMapPositioning"
|
||||||
import { MapLibreAdaptor } from "../UI/Map/MapLibreAdaptor"
|
import {MapLibreAdaptor} from "../UI/Map/MapLibreAdaptor"
|
||||||
import { GeoLocationState } from "../Logic/State/GeoLocationState"
|
import {GeoLocationState} from "../Logic/State/GeoLocationState"
|
||||||
import FeatureSwitchState from "../Logic/State/FeatureSwitchState"
|
import FeatureSwitchState from "../Logic/State/FeatureSwitchState"
|
||||||
import { QueryParameters } from "../Logic/Web/QueryParameters"
|
import {QueryParameters} from "../Logic/Web/QueryParameters"
|
||||||
import UserRelatedState from "../Logic/State/UserRelatedState"
|
import UserRelatedState from "../Logic/State/UserRelatedState"
|
||||||
import LayerConfig from "./ThemeConfig/LayerConfig"
|
import LayerConfig from "./ThemeConfig/LayerConfig"
|
||||||
import GeoLocationHandler from "../Logic/Actors/GeoLocationHandler"
|
import GeoLocationHandler from "../Logic/Actors/GeoLocationHandler"
|
||||||
import { AvailableRasterLayers, RasterLayerPolygon, RasterLayerUtils } from "./RasterLayers"
|
import {AvailableRasterLayers, RasterLayerPolygon, RasterLayerUtils} from "./RasterLayers"
|
||||||
import LayoutSource from "../Logic/FeatureSource/Sources/LayoutSource"
|
import LayoutSource from "../Logic/FeatureSource/Sources/LayoutSource"
|
||||||
import StaticFeatureSource from "../Logic/FeatureSource/Sources/StaticFeatureSource"
|
import StaticFeatureSource from "../Logic/FeatureSource/Sources/StaticFeatureSource"
|
||||||
import FeaturePropertiesStore from "../Logic/FeatureSource/Actors/FeaturePropertiesStore"
|
import FeaturePropertiesStore from "../Logic/FeatureSource/Actors/FeaturePropertiesStore"
|
||||||
|
@ -32,27 +28,25 @@ import TitleHandler from "../Logic/Actors/TitleHandler"
|
||||||
import ChangeToElementsActor from "../Logic/Actors/ChangeToElementsActor"
|
import ChangeToElementsActor from "../Logic/Actors/ChangeToElementsActor"
|
||||||
import PendingChangesUploader from "../Logic/Actors/PendingChangesUploader"
|
import PendingChangesUploader from "../Logic/Actors/PendingChangesUploader"
|
||||||
import SelectedElementTagsUpdater from "../Logic/Actors/SelectedElementTagsUpdater"
|
import SelectedElementTagsUpdater from "../Logic/Actors/SelectedElementTagsUpdater"
|
||||||
import { BBox } from "../Logic/BBox"
|
import {BBox} from "../Logic/BBox"
|
||||||
import Constants from "./Constants"
|
import Constants from "./Constants"
|
||||||
import Hotkeys from "../UI/Base/Hotkeys"
|
import Hotkeys from "../UI/Base/Hotkeys"
|
||||||
import Translations from "../UI/i18n/Translations"
|
import Translations from "../UI/i18n/Translations"
|
||||||
import { GeoIndexedStoreForLayer } from "../Logic/FeatureSource/Actors/GeoIndexedStore"
|
import {GeoIndexedStoreForLayer} from "../Logic/FeatureSource/Actors/GeoIndexedStore"
|
||||||
import { LastClickFeatureSource } from "../Logic/FeatureSource/Sources/LastClickFeatureSource"
|
import {LastClickFeatureSource} from "../Logic/FeatureSource/Sources/LastClickFeatureSource"
|
||||||
import { MenuState } from "./MenuState"
|
import {MenuState} from "./MenuState"
|
||||||
import MetaTagging from "../Logic/MetaTagging"
|
import MetaTagging from "../Logic/MetaTagging"
|
||||||
import ChangeGeometryApplicator from "../Logic/FeatureSource/Sources/ChangeGeometryApplicator"
|
import ChangeGeometryApplicator from "../Logic/FeatureSource/Sources/ChangeGeometryApplicator"
|
||||||
import { NewGeometryFromChangesFeatureSource } from "../Logic/FeatureSource/Sources/NewGeometryFromChangesFeatureSource"
|
import {NewGeometryFromChangesFeatureSource} from "../Logic/FeatureSource/Sources/NewGeometryFromChangesFeatureSource"
|
||||||
import OsmObjectDownloader from "../Logic/Osm/OsmObjectDownloader"
|
import OsmObjectDownloader from "../Logic/Osm/OsmObjectDownloader"
|
||||||
import ShowOverlayRasterLayer from "../UI/Map/ShowOverlayRasterLayer"
|
import ShowOverlayRasterLayer from "../UI/Map/ShowOverlayRasterLayer"
|
||||||
import { Utils } from "../Utils"
|
import {Utils} from "../Utils"
|
||||||
import { EliCategory } from "./RasterLayerProperties"
|
import {EliCategory} from "./RasterLayerProperties"
|
||||||
import BackgroundLayerResetter from "../Logic/Actors/BackgroundLayerResetter"
|
import BackgroundLayerResetter from "../Logic/Actors/BackgroundLayerResetter"
|
||||||
import SaveFeatureSourceToLocalStorage from "../Logic/FeatureSource/Actors/SaveFeatureSourceToLocalStorage"
|
import SaveFeatureSourceToLocalStorage from "../Logic/FeatureSource/Actors/SaveFeatureSourceToLocalStorage"
|
||||||
import BBoxFeatureSource from "../Logic/FeatureSource/Sources/TouchesBboxFeatureSource"
|
import BBoxFeatureSource from "../Logic/FeatureSource/Sources/TouchesBboxFeatureSource"
|
||||||
import ThemeViewStateHashActor from "../Logic/Web/ThemeViewStateHashActor"
|
import ThemeViewStateHashActor from "../Logic/Web/ThemeViewStateHashActor"
|
||||||
import NoElementsInViewDetector, {
|
import NoElementsInViewDetector, {FeatureViewState,} from "../Logic/Actors/NoElementsInViewDetector"
|
||||||
FeatureViewState,
|
|
||||||
} from "../Logic/Actors/NoElementsInViewDetector"
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
|
|
@ -1,116 +1,118 @@
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { UIEventSource } from "../../Logic/UIEventSource"
|
import {UIEventSource} from "../../Logic/UIEventSource"
|
||||||
import type { ValidatorType } from "./Validators"
|
import type {ValidatorType} from "./Validators"
|
||||||
import Validators from "./Validators"
|
import Validators from "./Validators"
|
||||||
import { ExclamationIcon } from "@rgossiaux/svelte-heroicons/solid"
|
import {ExclamationIcon} from "@rgossiaux/svelte-heroicons/solid"
|
||||||
import { Translation } from "../i18n/Translation"
|
import {Translation} from "../i18n/Translation"
|
||||||
import { createEventDispatcher, onDestroy } from "svelte"
|
import {createEventDispatcher, onDestroy} from "svelte"
|
||||||
import { Validator } from "./Validator"
|
import {Validator} from "./Validator"
|
||||||
import { Unit } from "../../Models/Unit"
|
import {Unit} from "../../Models/Unit"
|
||||||
import UnitInput from "../Popup/UnitInput.svelte"
|
import UnitInput from "../Popup/UnitInput.svelte"
|
||||||
|
|
||||||
export let type: ValidatorType
|
export let type: ValidatorType
|
||||||
export let feedback: UIEventSource<Translation> | undefined = undefined
|
export let feedback: UIEventSource<Translation> | undefined = undefined
|
||||||
export let getCountry: () => string | undefined
|
export let getCountry: () => string | undefined
|
||||||
export let placeholder: string | Translation | undefined
|
export let placeholder: string | Translation | undefined
|
||||||
export let unit: Unit = undefined
|
export let unit: Unit = undefined
|
||||||
|
|
||||||
export let value: UIEventSource<string>
|
export let value: UIEventSource<string>
|
||||||
/**
|
/**
|
||||||
* Internal state bound to the input element.
|
* Internal state bound to the input element.
|
||||||
*
|
*
|
||||||
* This is only copied to 'value' when appropriate so that no invalid values leak outside;
|
* This is only copied to 'value' when appropriate so that no invalid values leak outside;
|
||||||
* Additionally, the unit is added when copying
|
* Additionally, the unit is added when copying
|
||||||
*/
|
*/
|
||||||
let _value = new UIEventSource(value.data ?? "")
|
let _value = new UIEventSource(value.data ?? "")
|
||||||
|
|
||||||
let validator: Validator = Validators.get(type ?? "string")
|
let validator: Validator = Validators.get(type ?? "string")
|
||||||
let selectedUnit: UIEventSource<string> = new UIEventSource<string>(undefined)
|
let selectedUnit: UIEventSource<string> = new UIEventSource<string>(undefined)
|
||||||
let _placeholder = placeholder ?? validator?.getPlaceholder() ?? type
|
let _placeholder = placeholder ?? validator?.getPlaceholder() ?? type
|
||||||
|
|
||||||
function initValueAndDenom() {
|
function initValueAndDenom() {
|
||||||
if (unit && value.data) {
|
if (unit && value.data) {
|
||||||
const [v, denom] = unit?.findDenomination(value.data, getCountry)
|
const [v, denom] = unit?.findDenomination(value.data, getCountry)
|
||||||
if (denom) {
|
if (denom) {
|
||||||
_value.setData(v)
|
_value.setData(v)
|
||||||
selectedUnit.setData(denom.canonical)
|
selectedUnit.setData(denom.canonical)
|
||||||
} else {
|
} else {
|
||||||
_value.setData(value.data ?? "")
|
_value.setData(value.data ?? "")
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
_value.setData(value.data ?? "")
|
_value.setData(value.data ?? "")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
initValueAndDenom()
|
|
||||||
|
|
||||||
$: {
|
|
||||||
// The type changed -> reset some values
|
|
||||||
validator = Validators.get(type ?? "string")
|
|
||||||
_placeholder = placeholder ?? validator?.getPlaceholder() ?? type
|
|
||||||
feedback = feedback?.setData(validator?.getFeedback(_value.data, getCountry))
|
|
||||||
|
|
||||||
initValueAndDenom()
|
initValueAndDenom()
|
||||||
}
|
|
||||||
|
|
||||||
function setValues() {
|
$: {
|
||||||
// Update the value stores
|
// The type changed -> reset some values
|
||||||
const v = _value.data
|
validator = Validators.get(type ?? "string")
|
||||||
if (!validator.isValid(v, getCountry) || v === "") {
|
_placeholder = placeholder ?? validator?.getPlaceholder() ?? type
|
||||||
value.setData(undefined)
|
feedback = feedback?.setData(validator?.getFeedback(_value.data, getCountry))
|
||||||
feedback?.setData(validator.getFeedback(v, getCountry))
|
|
||||||
return
|
initValueAndDenom()
|
||||||
}
|
}
|
||||||
|
|
||||||
if (unit && isNaN(Number(v))) {
|
function setValues() {
|
||||||
value.setData(undefined)
|
// Update the value stores
|
||||||
return
|
const v = _value.data
|
||||||
|
if (!validator.isValid(v, getCountry) || v === "") {
|
||||||
|
value.setData(undefined)
|
||||||
|
feedback?.setData(validator.getFeedback(v, getCountry))
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
if (unit && isNaN(Number(v))) {
|
||||||
|
value.setData(undefined)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
feedback?.setData(undefined)
|
||||||
|
value.setData(v + (selectedUnit.data ?? ""))
|
||||||
}
|
}
|
||||||
|
|
||||||
feedback?.setData(undefined)
|
onDestroy(_value.addCallbackAndRun((_) => setValues()))
|
||||||
value.setData(v + (selectedUnit.data ?? ""))
|
onDestroy(selectedUnit.addCallback((_) => setValues()))
|
||||||
}
|
if (validator === undefined) {
|
||||||
|
throw "Not a valid type for a validator:" + type
|
||||||
onDestroy(_value.addCallbackAndRun((_) => setValues()))
|
}
|
||||||
onDestroy(selectedUnit.addCallback((_) => setValues()))
|
|
||||||
if (validator === undefined) {
|
const isValid = _value.map((v) => validator.isValid(v, getCountry))
|
||||||
throw "Not a valid type for a validator:" + type
|
|
||||||
}
|
let htmlElem: HTMLInputElement
|
||||||
|
|
||||||
const isValid = _value.map((v) => validator.isValid(v, getCountry))
|
let dispatch = createEventDispatcher<{ selected, submit }>()
|
||||||
|
$: {
|
||||||
let htmlElem: HTMLInputElement
|
if (htmlElem !== undefined) {
|
||||||
|
htmlElem.onfocus = () => dispatch("selected")
|
||||||
let dispatch = createEventDispatcher<{ selected }>()
|
}
|
||||||
$: {
|
|
||||||
if (htmlElem !== undefined) {
|
|
||||||
htmlElem.onfocus = () => dispatch("selected")
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{#if validator.textArea}
|
{#if validator.textArea}
|
||||||
|
<form on:submit|preventDefault={() => dispatch("submit")}>
|
||||||
|
|
||||||
<textarea
|
<textarea
|
||||||
class="w-full"
|
class="w-full"
|
||||||
bind:value={$_value}
|
bind:value={$_value}
|
||||||
inputmode={validator.inputmode ?? "text"}
|
inputmode={validator.inputmode ?? "text"}
|
||||||
placeholder={_placeholder}
|
placeholder={_placeholder}></textarea>
|
||||||
/>
|
</form>
|
||||||
{:else}
|
{:else}
|
||||||
<span class="inline-flex">
|
<form class="inline-flex" on:submit={() => dispatch("submit")}>
|
||||||
<input
|
<input
|
||||||
bind:this={htmlElem}
|
bind:this={htmlElem}
|
||||||
bind:value={$_value}
|
bind:value={$_value}
|
||||||
class="w-full"
|
class="w-full"
|
||||||
inputmode={validator.inputmode ?? "text"}
|
inputmode={validator.inputmode ?? "text"}
|
||||||
placeholder={_placeholder}
|
placeholder={_placeholder}
|
||||||
/>
|
/>
|
||||||
{#if !$isValid}
|
{#if !$isValid}
|
||||||
<ExclamationIcon class="-ml-6 h-6 w-6" />
|
<ExclamationIcon class="-ml-6 h-6 w-6"/>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
{#if unit !== undefined}
|
{#if unit !== undefined}
|
||||||
<UnitInput {unit} {selectedUnit} textValue={_value} upstreamValue={value} />
|
<UnitInput {unit} {selectedUnit} textValue={_value} upstreamValue={value}/>
|
||||||
{/if}
|
{/if}
|
||||||
</span>
|
</form>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
|
@ -17,12 +17,12 @@
|
||||||
* If given, this function will be called to embed the given tags hint into this translation
|
* If given, this function will be called to embed the given tags hint into this translation
|
||||||
*/
|
*/
|
||||||
export let embedIn: ((string: string) => Translation) | undefined = undefined
|
export let embedIn: ((string: string) => Translation) | undefined = undefined
|
||||||
const userDetails = state.osmConnection.userDetails
|
const userDetails = state?.osmConnection?.userDetails
|
||||||
let tagsExplanation = ""
|
let tagsExplanation = ""
|
||||||
$: tagsExplanation = tags?.asHumanString(true, false, currentProperties)
|
$: tagsExplanation = tags?.asHumanString(true, false, currentProperties)
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{#if $userDetails.loggedIn}
|
{#if !userDetails || $userDetails.loggedIn}
|
||||||
<div>
|
<div>
|
||||||
{#if tags === undefined}
|
{#if tags === undefined}
|
||||||
<slot name="no-tags">No tags</slot>
|
<slot name="no-tags">No tags</slot>
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
|
|
||||||
export let feedback: UIEventSource<Translation> = new UIEventSource<Translation>(undefined)
|
export let feedback: UIEventSource<Translation> = new UIEventSource<Translation>(undefined)
|
||||||
|
|
||||||
let dispatch = createEventDispatcher<{ selected }>()
|
let dispatch = createEventDispatcher<{ selected, submit }>()
|
||||||
onDestroy(
|
onDestroy(
|
||||||
value.addCallbackD(() => {
|
value.addCallbackD(() => {
|
||||||
dispatch("selected")
|
dispatch("selected")
|
||||||
|
@ -46,6 +46,8 @@
|
||||||
{getCountry}
|
{getCountry}
|
||||||
{unit}
|
{unit}
|
||||||
on:selected={() => dispatch("selected")}
|
on:selected={() => dispatch("selected")}
|
||||||
|
on:submit={() => dispatch("submit")}
|
||||||
|
|
||||||
type={config.freeform.type}
|
type={config.freeform.type}
|
||||||
{placeholder}
|
{placeholder}
|
||||||
{value}
|
{value}
|
||||||
|
@ -57,6 +59,7 @@
|
||||||
{getCountry}
|
{getCountry}
|
||||||
{unit}
|
{unit}
|
||||||
on:selected={() => dispatch("selected")}
|
on:selected={() => dispatch("selected")}
|
||||||
|
on:submit={() => dispatch("submit")}
|
||||||
type={config.freeform.type}
|
type={config.freeform.type}
|
||||||
{placeholder}
|
{placeholder}
|
||||||
{value}
|
{value}
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
export let state: SpecialVisualizationState
|
export let state: SpecialVisualizationState
|
||||||
export let tags: UIEventSource<Record<string, string>>
|
export let tags: UIEventSource<Record<string, string>>
|
||||||
export let feature: Feature
|
export let feature: Feature
|
||||||
export let layer: LayerConfig
|
export let layer: LayerConfig | undefined
|
||||||
|
|
||||||
let txt: string
|
let txt: string
|
||||||
$: onDestroy(
|
$: onDestroy(
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import TagRenderingConfig from "../../../Models/ThemeConfig/TagRenderingConfig"
|
import TagRenderingConfig from "../../../Models/ThemeConfig/TagRenderingConfig"
|
||||||
import { UIEventSource } from "../../../Logic/UIEventSource"
|
import {Store, UIEventSource} from "../../../Logic/UIEventSource"
|
||||||
import type { Feature } from "geojson"
|
import type { Feature } from "geojson"
|
||||||
import type { SpecialVisualizationState } from "../../SpecialVisualization"
|
import type { SpecialVisualizationState } from "../../SpecialVisualization"
|
||||||
import TagRenderingAnswer from "./TagRenderingAnswer.svelte"
|
import TagRenderingAnswer from "./TagRenderingAnswer.svelte"
|
||||||
|
@ -18,7 +18,7 @@
|
||||||
export let state: SpecialVisualizationState
|
export let state: SpecialVisualizationState
|
||||||
export let layer: LayerConfig
|
export let layer: LayerConfig
|
||||||
|
|
||||||
export let editingEnabled = state.featureSwitchUserbadge
|
export let editingEnabled : Store<boolean> | undefined = state?.featureSwitchUserbadge
|
||||||
|
|
||||||
export let highlightedRendering: UIEventSource<string> = undefined
|
export let highlightedRendering: UIEventSource<string> = undefined
|
||||||
export let showQuestionIfUnknown: boolean = false
|
export let showQuestionIfUnknown: boolean = false
|
||||||
|
@ -67,7 +67,7 @@
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div bind:this={htmlElem} class="">
|
<div bind:this={htmlElem} class="">
|
||||||
{#if config.question && $editingEnabled}
|
{#if config.question && (!editingEnabled || $editingEnabled)}
|
||||||
{#if editMode}
|
{#if editMode}
|
||||||
<TagRenderingQuestion {config} {tags} {selectedElement} {state} {layer}>
|
<TagRenderingQuestion {config} {tags} {selectedElement} {state} {layer}>
|
||||||
<button
|
<button
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { Store, UIEventSource } from "../../../Logic/UIEventSource"
|
import {ImmutableStore, Store, UIEventSource} from "../../../Logic/UIEventSource"
|
||||||
import type { SpecialVisualizationState } from "../../SpecialVisualization"
|
import type { SpecialVisualizationState } from "../../SpecialVisualization"
|
||||||
import Tr from "../../Base/Tr.svelte"
|
import Tr from "../../Base/Tr.svelte"
|
||||||
import type { Feature } from "geojson"
|
import type { Feature } from "geojson"
|
||||||
|
@ -27,11 +27,11 @@
|
||||||
export let tags: UIEventSource<Record<string, string>>
|
export let tags: UIEventSource<Record<string, string>>
|
||||||
export let selectedElement: Feature
|
export let selectedElement: Feature
|
||||||
export let state: SpecialVisualizationState
|
export let state: SpecialVisualizationState
|
||||||
export let layer: LayerConfig
|
export let layer: LayerConfig | undefined
|
||||||
|
|
||||||
let feedback: UIEventSource<Translation> = new UIEventSource<Translation>(undefined)
|
let feedback: UIEventSource<Translation> = new UIEventSource<Translation>(undefined)
|
||||||
|
|
||||||
let unit: Unit = layer.units?.find((unit) => unit.appliesToKeys.has(config.freeform?.key))
|
let unit: Unit = layer?.units?.find((unit) => unit.appliesToKeys.has(config.freeform?.key))
|
||||||
|
|
||||||
// Will be bound if a freeform is available
|
// Will be bound if a freeform is available
|
||||||
let freeformInput = new UIEventSource<string>(tags?.[config.freeform?.key])
|
let freeformInput = new UIEventSource<string>(tags?.[config.freeform?.key])
|
||||||
|
@ -45,7 +45,7 @@
|
||||||
return m.hideInAnswer.matchesProperties(tags.data)
|
return m.hideInAnswer.matchesProperties(tags.data)
|
||||||
})
|
})
|
||||||
// We received a new config -> reinit
|
// We received a new config -> reinit
|
||||||
unit = layer.units.find((unit) => unit.appliesToKeys.has(config.freeform?.key))
|
unit = layer?.units?.find((unit) => unit.appliesToKeys.has(config.freeform?.key))
|
||||||
|
|
||||||
if (
|
if (
|
||||||
config.mappings?.length > 0 &&
|
config.mappings?.length > 0 &&
|
||||||
|
@ -96,7 +96,7 @@
|
||||||
if (selectedTags === undefined) {
|
if (selectedTags === undefined) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (layer.source === null) {
|
if (layer === undefined || layer?.source === null) {
|
||||||
/**
|
/**
|
||||||
* This is a special, priviliged layer.
|
* This is a special, priviliged layer.
|
||||||
* We simply apply the tags onto the records
|
* We simply apply the tags onto the records
|
||||||
|
@ -128,12 +128,12 @@
|
||||||
.catch(console.error)
|
.catch(console.error)
|
||||||
}
|
}
|
||||||
|
|
||||||
let featureSwitchIsTesting = state.featureSwitchIsTesting
|
let featureSwitchIsTesting = state.featureSwitchIsTesting ?? new ImmutableStore(false)
|
||||||
let featureSwitchIsDebugging = state.featureSwitches.featureSwitchIsDebugging
|
let featureSwitchIsDebugging = state.featureSwitches?.featureSwitchIsDebugging ?? new ImmutableStore(false)
|
||||||
let showTags = state.userRelatedState.showTags
|
let showTags = state.userRelatedState?.showTags ?? new ImmutableStore(undefined)
|
||||||
let numberOfCs = state.osmConnection.userDetails.data.csCount
|
let numberOfCs = state.osmConnection.userDetails.data.csCount
|
||||||
onDestroy(
|
onDestroy(
|
||||||
state.osmConnection.userDetails.addCallbackAndRun((ud) => {
|
state.osmConnection?.userDetails?.addCallbackAndRun((ud) => {
|
||||||
numberOfCs = ud.csCount
|
numberOfCs = ud.csCount
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
|
@ -176,6 +176,7 @@
|
||||||
{unit}
|
{unit}
|
||||||
feature={selectedElement}
|
feature={selectedElement}
|
||||||
value={freeformInput}
|
value={freeformInput}
|
||||||
|
on:submit={onSave}
|
||||||
/>
|
/>
|
||||||
{:else if mappings !== undefined && !config.multiAnswer}
|
{:else if mappings !== undefined && !config.multiAnswer}
|
||||||
<!-- Simple radiobuttons as mapping -->
|
<!-- Simple radiobuttons as mapping -->
|
||||||
|
@ -215,6 +216,7 @@
|
||||||
feature={selectedElement}
|
feature={selectedElement}
|
||||||
value={freeformInput}
|
value={freeformInput}
|
||||||
on:selected={() => (selectedMapping = config.mappings?.length)}
|
on:selected={() => (selectedMapping = config.mappings?.length)}
|
||||||
|
on:submit={onSave}
|
||||||
/>
|
/>
|
||||||
</label>
|
</label>
|
||||||
{/if}
|
{/if}
|
||||||
|
@ -254,6 +256,7 @@
|
||||||
feature={selectedElement}
|
feature={selectedElement}
|
||||||
value={freeformInput}
|
value={freeformInput}
|
||||||
on:selected={() => (checkedMappings[config.mappings.length] = true)}
|
on:selected={() => (checkedMappings[config.mappings.length] = true)}
|
||||||
|
on:submit={onSave}
|
||||||
/>
|
/>
|
||||||
</label>
|
</label>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
45
UI/Studio/EditLayer.svelte
Normal file
45
UI/Studio/EditLayer.svelte
Normal file
|
@ -0,0 +1,45 @@
|
||||||
|
<script lang="ts">
|
||||||
|
|
||||||
|
import EditLayerState from "./EditLayerState";
|
||||||
|
import layerSchemaRaw from "../../assets/layerconfigmeta.json"
|
||||||
|
import Region from "./Region.svelte";
|
||||||
|
import TabbedGroup from "../Base/TabbedGroup.svelte";
|
||||||
|
import {UIEventSource} from "../../Logic/UIEventSource";
|
||||||
|
import type {ConfigMeta} from "./configMeta";
|
||||||
|
import {Utils} from "../../Utils";
|
||||||
|
|
||||||
|
|
||||||
|
let state = new EditLayerState()
|
||||||
|
let layer = state.layer
|
||||||
|
|
||||||
|
const layerSchema: ConfigMeta[] = layerSchemaRaw
|
||||||
|
const regions = Utils.Dedup(layerSchema.map(meta => meta.hints.group))
|
||||||
|
.filter(region => region !== undefined)
|
||||||
|
|
||||||
|
const perRegion: Record<string, ConfigMeta[]> = {}
|
||||||
|
for (const region of regions) {
|
||||||
|
perRegion[region] = layerSchema.filter(meta => meta.hints.group === region)
|
||||||
|
}
|
||||||
|
console.log({perRegion})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<h3>Edit layer {$layer?.id}</h3>
|
||||||
|
|
||||||
|
<TabbedGroup tab={new UIEventSource(0)}>
|
||||||
|
<div slot="title0">General properties</div>
|
||||||
|
<div class="flex flex-col" slot="content0">
|
||||||
|
{#each regions as region}
|
||||||
|
<Region {state} configs={perRegion[region]} title={region}/>
|
||||||
|
{/each}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div slot="title1">Information panel (questions and answers)</div>
|
||||||
|
<div slot="content1">
|
||||||
|
Information panel (todo)
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div slot="title2">Rendering on the map</div>
|
||||||
|
<div slot="content2">
|
||||||
|
TODO: rendering on the map
|
||||||
|
</div>
|
||||||
|
</TabbedGroup>
|
8
UI/Studio/EditLayerState.ts
Normal file
8
UI/Studio/EditLayerState.ts
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
import { OsmConnection } from "../../Logic/Osm/OsmConnection"
|
||||||
|
|
||||||
|
export default class EditLayerState {
|
||||||
|
public readonly osmConnection: OsmConnection
|
||||||
|
constructor() {
|
||||||
|
this.osmConnection = new OsmConnection({})
|
||||||
|
}
|
||||||
|
}
|
21
UI/Studio/Region.svelte
Normal file
21
UI/Studio/Region.svelte
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
<script lang="ts">/***
|
||||||
|
* A 'region' is a collection of properties that can be edited which are somewhat related.
|
||||||
|
* They will typically be a subset of some properties
|
||||||
|
*/
|
||||||
|
import SchemaBasedField from "./SchemaBasedField.svelte";
|
||||||
|
import type {ConfigMeta} from "./configMeta";
|
||||||
|
import EditLayerState from "./EditLayerState";
|
||||||
|
|
||||||
|
export let state : EditLayerState
|
||||||
|
export let configs: ConfigMeta[]
|
||||||
|
export let title: string
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<h3>{title}</h3>
|
||||||
|
<div class="pl-2 border border-black flex flex-col gap-y-1">
|
||||||
|
|
||||||
|
{#each configs as config}
|
||||||
|
<SchemaBasedField {state} schema={config} title={config.path.at(-1)}></SchemaBasedField>
|
||||||
|
{/each}
|
||||||
|
</div>
|
6
UI/Studio/SchemaBasedArray.svelte
Normal file
6
UI/Studio/SchemaBasedArray.svelte
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
<script lang="ts">
|
||||||
|
export let title
|
||||||
|
export let description
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
55
UI/Studio/SchemaBasedField.svelte
Normal file
55
UI/Studio/SchemaBasedField.svelte
Normal file
|
@ -0,0 +1,55 @@
|
||||||
|
<script lang="ts">
|
||||||
|
|
||||||
|
import {UIEventSource} from "../../Logic/UIEventSource";
|
||||||
|
import {Translation} from "../i18n/Translation";
|
||||||
|
import type {ConfigMeta} from "./configMeta";
|
||||||
|
import TagRenderingEditable from "../Popup/TagRendering/TagRenderingEditable.svelte";
|
||||||
|
import TagRenderingConfig from "../../Models/ThemeConfig/TagRenderingConfig";
|
||||||
|
import type {
|
||||||
|
QuestionableTagRenderingConfigJson
|
||||||
|
} from "../../Models/ThemeConfig/Json/QuestionableTagRenderingConfigJson";
|
||||||
|
import EditLayerState from "./EditLayerState";
|
||||||
|
|
||||||
|
|
||||||
|
export let state: EditLayerState
|
||||||
|
export let schema: ConfigMeta
|
||||||
|
export let title: string | undefined
|
||||||
|
|
||||||
|
let value = new UIEventSource<string>(undefined)
|
||||||
|
let feedback = new UIEventSource<Translation>(undefined)
|
||||||
|
|
||||||
|
const configJson: QuestionableTagRenderingConfigJson = {
|
||||||
|
id: schema.path.join("."),
|
||||||
|
render: schema.path.at(-1) + ": <b>{value}</b>",
|
||||||
|
question: schema.hints.question,
|
||||||
|
questionHint: schema.description,
|
||||||
|
freeform: {
|
||||||
|
key: "value",
|
||||||
|
type: schema.hints.typehint ?? "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!schema.required) {
|
||||||
|
configJson.mappings = [{
|
||||||
|
if: "value=",
|
||||||
|
then: schema.path.at(-1) + " is not set. " + (schema.hints.ifunset ?? ""),
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
let config: TagRenderingConfig
|
||||||
|
let err: string = undefined
|
||||||
|
try {
|
||||||
|
config = new TagRenderingConfig(configJson, "config based on " + schema.path.join("."))
|
||||||
|
} catch (e) {
|
||||||
|
console.error(e, config)
|
||||||
|
err = e
|
||||||
|
}
|
||||||
|
let tags = new UIEventSource<Record<string, string>>({})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
{#if err !== undefined}
|
||||||
|
<span class="alert">{err}</span>
|
||||||
|
{:else}
|
||||||
|
<div>
|
||||||
|
<TagRenderingEditable {config} showQuestionIfUnknown={true} {state} {tags}/>
|
||||||
|
</div>
|
||||||
|
{/if}
|
14
UI/Studio/configMeta.ts
Normal file
14
UI/Studio/configMeta.ts
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
import { JsonSchema, JsonSchemaType } from "./jsonSchema"
|
||||||
|
|
||||||
|
export interface ConfigMeta {
|
||||||
|
path: string[]
|
||||||
|
type: JsonSchemaType | JsonSchema[]
|
||||||
|
hints: {
|
||||||
|
group?: string
|
||||||
|
typehint?: string
|
||||||
|
question?: string
|
||||||
|
ifunset?: string
|
||||||
|
}
|
||||||
|
required: boolean
|
||||||
|
description: string
|
||||||
|
}
|
20
UI/Studio/jsonSchema.ts
Normal file
20
UI/Studio/jsonSchema.ts
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
/**
|
||||||
|
* Extracts the data from the scheme file and writes them in a flatter structure
|
||||||
|
*/
|
||||||
|
|
||||||
|
export type JsonSchemaType =
|
||||||
|
| string
|
||||||
|
| { $ref: string; description: string }
|
||||||
|
| { type: string }
|
||||||
|
| JsonSchemaType[]
|
||||||
|
export interface JsonSchema {
|
||||||
|
description?: string
|
||||||
|
type?: JsonSchemaType
|
||||||
|
properties?: any
|
||||||
|
items?: JsonSchema
|
||||||
|
allOf?: JsonSchema[]
|
||||||
|
anyOf: JsonSchema[]
|
||||||
|
enum: JsonSchema[]
|
||||||
|
$ref: string
|
||||||
|
required: string[]
|
||||||
|
}
|
7
UI/StudioGUI.svelte
Normal file
7
UI/StudioGUI.svelte
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
<script lang="ts">
|
||||||
|
|
||||||
|
|
||||||
|
import EditLayer from "./Studio/EditLayer.svelte";
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<EditLayer/>
|
10
UI/StudioGui.ts
Normal file
10
UI/StudioGui.ts
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
import SvelteUIElement from "./Base/SvelteUIElement"
|
||||||
|
import StudioGUI from "./StudioGUI.svelte"
|
||||||
|
|
||||||
|
export default class StudioGui {
|
||||||
|
public setup() {
|
||||||
|
new SvelteUIElement(StudioGUI, {}).AttachTo("main")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
new StudioGui().setup()
|
37871
assets/layerconfigmeta.json
Normal file
37871
assets/layerconfigmeta.json
Normal file
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -1,6 +1,7 @@
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"path": [],
|
"path": [],
|
||||||
|
"hints": {},
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"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."
|
"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."
|
||||||
},
|
},
|
||||||
|
@ -8,6 +9,7 @@
|
||||||
"path": [
|
"path": [
|
||||||
"question"
|
"question"
|
||||||
],
|
],
|
||||||
|
"hints": {},
|
||||||
"type": [
|
"type": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/Record<string,string>"
|
"$ref": "#/definitions/Record<string,string>"
|
||||||
|
@ -22,6 +24,7 @@
|
||||||
"path": [
|
"path": [
|
||||||
"questionHint"
|
"questionHint"
|
||||||
],
|
],
|
||||||
|
"hints": {},
|
||||||
"type": [
|
"type": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/Record<string,string>"
|
"$ref": "#/definitions/Record<string,string>"
|
||||||
|
@ -36,6 +39,7 @@
|
||||||
"path": [
|
"path": [
|
||||||
"freeform"
|
"freeform"
|
||||||
],
|
],
|
||||||
|
"hints": {},
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"description": "Allow freeform text input from the user"
|
"description": "Allow freeform text input from the user"
|
||||||
},
|
},
|
||||||
|
@ -44,6 +48,7 @@
|
||||||
"freeform",
|
"freeform",
|
||||||
"type"
|
"type"
|
||||||
],
|
],
|
||||||
|
"hints": {},
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"description": "The type of the text-field, e.g. 'string', 'nat', 'float', 'date',...\nSee Docs/SpecialInputElements.md and UI/Input/ValidatedTextField.ts for supported values"
|
"description": "The type of the text-field, e.g. 'string', 'nat', 'float', 'date',...\nSee Docs/SpecialInputElements.md and UI/Input/ValidatedTextField.ts for supported values"
|
||||||
},
|
},
|
||||||
|
@ -52,6 +57,7 @@
|
||||||
"freeform",
|
"freeform",
|
||||||
"placeholder"
|
"placeholder"
|
||||||
],
|
],
|
||||||
|
"hints": {},
|
||||||
"description": "A (translated) text that is shown (as gray text) within the textfield"
|
"description": "A (translated) text that is shown (as gray text) within the textfield"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -59,6 +65,7 @@
|
||||||
"freeform",
|
"freeform",
|
||||||
"helperArgs"
|
"helperArgs"
|
||||||
],
|
],
|
||||||
|
"hints": {},
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"description": "Extra parameters to initialize the input helper arguments.\nFor semantics, see the 'SpecialInputElements.md'"
|
"description": "Extra parameters to initialize the input helper arguments.\nFor semantics, see the 'SpecialInputElements.md'"
|
||||||
},
|
},
|
||||||
|
@ -67,6 +74,7 @@
|
||||||
"freeform",
|
"freeform",
|
||||||
"addExtraTags"
|
"addExtraTags"
|
||||||
],
|
],
|
||||||
|
"hints": {},
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"description": "If a value is added with the textfield, these extra tag is addded.\nUseful to add a 'fixme=freeform textfield used - to be checked'"
|
"description": "If a value is added with the textfield, these extra tag is addded.\nUseful to add a 'fixme=freeform textfield used - to be checked'"
|
||||||
},
|
},
|
||||||
|
@ -75,6 +83,7 @@
|
||||||
"freeform",
|
"freeform",
|
||||||
"inline"
|
"inline"
|
||||||
],
|
],
|
||||||
|
"hints": {},
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"description": "When set, influences the way a question is asked.\nInstead of showing a full-width text field, the text field will be shown within the rendering of the question.\n\nThis combines badly with special input elements, as it'll distort the layout.\nNote that this will be set automatically if no special elements are present."
|
"description": "When set, influences the way a question is asked.\nInstead of showing a full-width text field, the text field will be shown within the rendering of the question.\n\nThis combines badly with special input elements, as it'll distort the layout.\nNote that this will be set automatically if no special elements are present."
|
||||||
},
|
},
|
||||||
|
@ -83,6 +92,7 @@
|
||||||
"freeform",
|
"freeform",
|
||||||
"default"
|
"default"
|
||||||
],
|
],
|
||||||
|
"hints": {},
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"description": "default value to enter if no previous tagging is present.\nNormally undefined (aka do not enter anything)"
|
"description": "default value to enter if no previous tagging is present.\nNormally undefined (aka do not enter anything)"
|
||||||
},
|
},
|
||||||
|
@ -90,6 +100,7 @@
|
||||||
"path": [
|
"path": [
|
||||||
"multiAnswer"
|
"multiAnswer"
|
||||||
],
|
],
|
||||||
|
"hints": {},
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"description": "If true, use checkboxes instead of radio buttons when asking the question"
|
"description": "If true, use checkboxes instead of radio buttons when asking the question"
|
||||||
},
|
},
|
||||||
|
@ -97,6 +108,7 @@
|
||||||
"path": [
|
"path": [
|
||||||
"mappings"
|
"mappings"
|
||||||
],
|
],
|
||||||
|
"hints": {},
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes"
|
"description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes"
|
||||||
},
|
},
|
||||||
|
@ -105,6 +117,7 @@
|
||||||
"mappings",
|
"mappings",
|
||||||
"if"
|
"if"
|
||||||
],
|
],
|
||||||
|
"hints": {},
|
||||||
"type": [
|
"type": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/AndTagConfigJson"
|
"$ref": "#/definitions/AndTagConfigJson"
|
||||||
|
@ -135,6 +148,7 @@
|
||||||
"mappings",
|
"mappings",
|
||||||
"if"
|
"if"
|
||||||
],
|
],
|
||||||
|
"hints": {},
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||||
},
|
},
|
||||||
|
@ -143,6 +157,7 @@
|
||||||
"mappings",
|
"mappings",
|
||||||
"if"
|
"if"
|
||||||
],
|
],
|
||||||
|
"hints": {},
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||||
},
|
},
|
||||||
|
@ -151,15 +166,27 @@
|
||||||
"mappings",
|
"mappings",
|
||||||
"then"
|
"then"
|
||||||
],
|
],
|
||||||
"typeHint": "rendered",
|
"hints": {
|
||||||
"description": "Shown if the 'if is fulfilled\nType: rendered"
|
"typehint": "rendered"
|
||||||
|
},
|
||||||
|
"type": [
|
||||||
|
{
|
||||||
|
"$ref": "#/definitions/Record<string,string>"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Shown if the 'if is fulfilled"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": [
|
"path": [
|
||||||
"mappings",
|
"mappings",
|
||||||
"icon"
|
"icon"
|
||||||
],
|
],
|
||||||
"typeHint": "icon",
|
"hints": {
|
||||||
|
"typehint": "icon"
|
||||||
|
},
|
||||||
"type": [
|
"type": [
|
||||||
{
|
{
|
||||||
"type": "object",
|
"type": "object",
|
||||||
|
@ -181,7 +208,7 @@
|
||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"description": "An extra icon supporting the choice\nType: icon"
|
"description": "An extra icon supporting the choice"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": [
|
"path": [
|
||||||
|
@ -189,9 +216,11 @@
|
||||||
"icon",
|
"icon",
|
||||||
"path"
|
"path"
|
||||||
],
|
],
|
||||||
"typeHint": "icon",
|
"hints": {
|
||||||
|
"typehint": "icon"
|
||||||
|
},
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"description": "The path to the icon\nType: icon"
|
"description": "The path to the icon"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": [
|
"path": [
|
||||||
|
@ -199,6 +228,7 @@
|
||||||
"icon",
|
"icon",
|
||||||
"class"
|
"class"
|
||||||
],
|
],
|
||||||
|
"hints": {},
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"description": "Size of the image"
|
"description": "Size of the image"
|
||||||
},
|
},
|
||||||
|
@ -207,6 +237,7 @@
|
||||||
"mappings",
|
"mappings",
|
||||||
"hideInAnswer"
|
"hideInAnswer"
|
||||||
],
|
],
|
||||||
|
"hints": {},
|
||||||
"type": [
|
"type": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/AndTagConfigJson",
|
"$ref": "#/definitions/AndTagConfigJson",
|
||||||
|
@ -230,6 +261,7 @@
|
||||||
"mappings",
|
"mappings",
|
||||||
"hideInAnswer"
|
"hideInAnswer"
|
||||||
],
|
],
|
||||||
|
"hints": {},
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||||
},
|
},
|
||||||
|
@ -239,6 +271,7 @@
|
||||||
"hideInAnswer",
|
"hideInAnswer",
|
||||||
"and"
|
"and"
|
||||||
],
|
],
|
||||||
|
"hints": {},
|
||||||
"type": [
|
"type": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/AndTagConfigJson"
|
"$ref": "#/definitions/AndTagConfigJson"
|
||||||
|
@ -270,6 +303,7 @@
|
||||||
"hideInAnswer",
|
"hideInAnswer",
|
||||||
"and"
|
"and"
|
||||||
],
|
],
|
||||||
|
"hints": {},
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||||
},
|
},
|
||||||
|
@ -278,6 +312,7 @@
|
||||||
"mappings",
|
"mappings",
|
||||||
"hideInAnswer"
|
"hideInAnswer"
|
||||||
],
|
],
|
||||||
|
"hints": {},
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||||
},
|
},
|
||||||
|
@ -287,6 +322,7 @@
|
||||||
"hideInAnswer",
|
"hideInAnswer",
|
||||||
"or"
|
"or"
|
||||||
],
|
],
|
||||||
|
"hints": {},
|
||||||
"type": [
|
"type": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/AndTagConfigJson"
|
"$ref": "#/definitions/AndTagConfigJson"
|
||||||
|
@ -318,6 +354,7 @@
|
||||||
"hideInAnswer",
|
"hideInAnswer",
|
||||||
"or"
|
"or"
|
||||||
],
|
],
|
||||||
|
"hints": {},
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||||
},
|
},
|
||||||
|
@ -327,6 +364,7 @@
|
||||||
"hideInAnswer",
|
"hideInAnswer",
|
||||||
"or"
|
"or"
|
||||||
],
|
],
|
||||||
|
"hints": {},
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||||
},
|
},
|
||||||
|
@ -335,6 +373,7 @@
|
||||||
"mappings",
|
"mappings",
|
||||||
"ifnot"
|
"ifnot"
|
||||||
],
|
],
|
||||||
|
"hints": {},
|
||||||
"type": [
|
"type": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/AndTagConfigJson",
|
"$ref": "#/definitions/AndTagConfigJson",
|
||||||
|
@ -355,6 +394,7 @@
|
||||||
"mappings",
|
"mappings",
|
||||||
"ifnot"
|
"ifnot"
|
||||||
],
|
],
|
||||||
|
"hints": {},
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||||
},
|
},
|
||||||
|
@ -364,6 +404,7 @@
|
||||||
"ifnot",
|
"ifnot",
|
||||||
"and"
|
"and"
|
||||||
],
|
],
|
||||||
|
"hints": {},
|
||||||
"type": [
|
"type": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/AndTagConfigJson"
|
"$ref": "#/definitions/AndTagConfigJson"
|
||||||
|
@ -395,6 +436,7 @@
|
||||||
"ifnot",
|
"ifnot",
|
||||||
"and"
|
"and"
|
||||||
],
|
],
|
||||||
|
"hints": {},
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||||
},
|
},
|
||||||
|
@ -403,6 +445,7 @@
|
||||||
"mappings",
|
"mappings",
|
||||||
"ifnot"
|
"ifnot"
|
||||||
],
|
],
|
||||||
|
"hints": {},
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||||
},
|
},
|
||||||
|
@ -412,6 +455,7 @@
|
||||||
"ifnot",
|
"ifnot",
|
||||||
"or"
|
"or"
|
||||||
],
|
],
|
||||||
|
"hints": {},
|
||||||
"type": [
|
"type": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/AndTagConfigJson"
|
"$ref": "#/definitions/AndTagConfigJson"
|
||||||
|
@ -443,6 +487,7 @@
|
||||||
"ifnot",
|
"ifnot",
|
||||||
"or"
|
"or"
|
||||||
],
|
],
|
||||||
|
"hints": {},
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||||
},
|
},
|
||||||
|
@ -452,6 +497,7 @@
|
||||||
"ifnot",
|
"ifnot",
|
||||||
"or"
|
"or"
|
||||||
],
|
],
|
||||||
|
"hints": {},
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||||
},
|
},
|
||||||
|
@ -460,6 +506,7 @@
|
||||||
"mappings",
|
"mappings",
|
||||||
"addExtraTags"
|
"addExtraTags"
|
||||||
],
|
],
|
||||||
|
"hints": {},
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"description": "If chosen as answer, these tags will be applied as well onto the object.\nNot compatible with multiAnswer.\n\nThis can be used e.g. to erase other keys which indicate the 'not' value:\n```json\n{\n \"if\": \"crossing:marking=rainbow\",\n \"then\": \"This is a rainbow crossing\",\n \"addExtraTags\": \"not:crossing:marking=\"\n}\n```"
|
"description": "If chosen as answer, these tags will be applied as well onto the object.\nNot compatible with multiAnswer.\n\nThis can be used e.g. to erase other keys which indicate the 'not' value:\n```json\n{\n \"if\": \"crossing:marking=rainbow\",\n \"then\": \"This is a rainbow crossing\",\n \"addExtraTags\": \"not:crossing:marking=\"\n}\n```"
|
||||||
},
|
},
|
||||||
|
@ -468,6 +515,7 @@
|
||||||
"mappings",
|
"mappings",
|
||||||
"priorityIf"
|
"priorityIf"
|
||||||
],
|
],
|
||||||
|
"hints": {},
|
||||||
"type": [
|
"type": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/AndTagConfigJson",
|
"$ref": "#/definitions/AndTagConfigJson",
|
||||||
|
@ -488,6 +536,7 @@
|
||||||
"mappings",
|
"mappings",
|
||||||
"priorityIf"
|
"priorityIf"
|
||||||
],
|
],
|
||||||
|
"hints": {},
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||||
},
|
},
|
||||||
|
@ -497,6 +546,7 @@
|
||||||
"priorityIf",
|
"priorityIf",
|
||||||
"and"
|
"and"
|
||||||
],
|
],
|
||||||
|
"hints": {},
|
||||||
"type": [
|
"type": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/AndTagConfigJson"
|
"$ref": "#/definitions/AndTagConfigJson"
|
||||||
|
@ -528,6 +578,7 @@
|
||||||
"priorityIf",
|
"priorityIf",
|
||||||
"and"
|
"and"
|
||||||
],
|
],
|
||||||
|
"hints": {},
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||||
},
|
},
|
||||||
|
@ -536,6 +587,7 @@
|
||||||
"mappings",
|
"mappings",
|
||||||
"priorityIf"
|
"priorityIf"
|
||||||
],
|
],
|
||||||
|
"hints": {},
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||||
},
|
},
|
||||||
|
@ -545,6 +597,7 @@
|
||||||
"priorityIf",
|
"priorityIf",
|
||||||
"or"
|
"or"
|
||||||
],
|
],
|
||||||
|
"hints": {},
|
||||||
"type": [
|
"type": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/AndTagConfigJson"
|
"$ref": "#/definitions/AndTagConfigJson"
|
||||||
|
@ -576,6 +629,7 @@
|
||||||
"priorityIf",
|
"priorityIf",
|
||||||
"or"
|
"or"
|
||||||
],
|
],
|
||||||
|
"hints": {},
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||||
},
|
},
|
||||||
|
@ -585,6 +639,7 @@
|
||||||
"priorityIf",
|
"priorityIf",
|
||||||
"or"
|
"or"
|
||||||
],
|
],
|
||||||
|
"hints": {},
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||||
},
|
},
|
||||||
|
@ -593,6 +648,7 @@
|
||||||
"mappings",
|
"mappings",
|
||||||
"#"
|
"#"
|
||||||
],
|
],
|
||||||
|
"hints": {},
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"description": "Used for comments or to disable a validation\n\nignore-image-in-then: normally, a `then`-clause is not allowed to have an `img`-html-element as icons are preferred. In some cases (most notably title-icons), this is allowed"
|
"description": "Used for comments or to disable a validation\n\nignore-image-in-then: normally, a `then`-clause is not allowed to have an `img`-html-element as icons are preferred. In some cases (most notably title-icons), this is allowed"
|
||||||
},
|
},
|
||||||
|
@ -600,6 +656,7 @@
|
||||||
"path": [
|
"path": [
|
||||||
"id"
|
"id"
|
||||||
],
|
],
|
||||||
|
"hints": {},
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"description": "The id of the tagrendering, should be an unique string.\nUsed to keep the translations in sync. Only used in the tagRenderings-array of a layerConfig, not requered otherwise.\n\nUse 'questions' to trigger the question box of this group (if a group is defined)"
|
"description": "The id of the tagrendering, should be an unique string.\nUsed to keep the translations in sync. Only used in the tagRenderings-array of a layerConfig, not requered otherwise.\n\nUse 'questions' to trigger the question box of this group (if a group is defined)"
|
||||||
},
|
},
|
||||||
|
@ -607,6 +664,7 @@
|
||||||
"path": [
|
"path": [
|
||||||
"labels"
|
"labels"
|
||||||
],
|
],
|
||||||
|
"hints": {},
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"description": "A list of labels. These are strings that are used for various purposes, e.g. to filter them away"
|
"description": "A list of labels. These are strings that are used for various purposes, e.g. to filter them away"
|
||||||
},
|
},
|
||||||
|
@ -614,6 +672,7 @@
|
||||||
"path": [
|
"path": [
|
||||||
"classes"
|
"classes"
|
||||||
],
|
],
|
||||||
|
"hints": {},
|
||||||
"type": [
|
"type": [
|
||||||
{
|
{
|
||||||
"type": "array",
|
"type": "array",
|
||||||
|
@ -631,6 +690,7 @@
|
||||||
"path": [
|
"path": [
|
||||||
"description"
|
"description"
|
||||||
],
|
],
|
||||||
|
"hints": {},
|
||||||
"type": [
|
"type": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/Record<string,string>"
|
"$ref": "#/definitions/Record<string,string>"
|
||||||
|
@ -639,13 +699,15 @@
|
||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"description": "A human-readable text explaining what this tagRendering does"
|
"description": "A human-readable text explaining what this tagRendering does.\nMostly used for the shared tagrenderings"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": [
|
"path": [
|
||||||
"render"
|
"render"
|
||||||
],
|
],
|
||||||
"typeHint": "rendered",
|
"hints": {
|
||||||
|
"typehint": "rendered"
|
||||||
|
},
|
||||||
"type": [
|
"type": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/Record<string,string>"
|
"$ref": "#/definitions/Record<string,string>"
|
||||||
|
@ -680,12 +742,13 @@
|
||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"description": "Renders this value. Note that \"{key}\"-parts are substituted by the corresponding values of the element.\nIf neither 'textFieldQuestion' nor 'mappings' are defined, this text is simply shown as default value.\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered"
|
"description": "Renders this value. Note that \"{key}\"-parts are substituted by the corresponding values of the element.\nIf neither 'textFieldQuestion' nor 'mappings' are defined, this text is simply shown as default value.\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": [
|
"path": [
|
||||||
"condition"
|
"condition"
|
||||||
],
|
],
|
||||||
|
"hints": {},
|
||||||
"type": [
|
"type": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/AndTagConfigJson",
|
"$ref": "#/definitions/AndTagConfigJson",
|
||||||
|
@ -705,6 +768,7 @@
|
||||||
"path": [
|
"path": [
|
||||||
"condition"
|
"condition"
|
||||||
],
|
],
|
||||||
|
"hints": {},
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||||
},
|
},
|
||||||
|
@ -713,6 +777,7 @@
|
||||||
"condition",
|
"condition",
|
||||||
"and"
|
"and"
|
||||||
],
|
],
|
||||||
|
"hints": {},
|
||||||
"type": [
|
"type": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/AndTagConfigJson"
|
"$ref": "#/definitions/AndTagConfigJson"
|
||||||
|
@ -743,6 +808,7 @@
|
||||||
"condition",
|
"condition",
|
||||||
"and"
|
"and"
|
||||||
],
|
],
|
||||||
|
"hints": {},
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||||
},
|
},
|
||||||
|
@ -750,6 +816,7 @@
|
||||||
"path": [
|
"path": [
|
||||||
"condition"
|
"condition"
|
||||||
],
|
],
|
||||||
|
"hints": {},
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||||
},
|
},
|
||||||
|
@ -758,6 +825,7 @@
|
||||||
"condition",
|
"condition",
|
||||||
"or"
|
"or"
|
||||||
],
|
],
|
||||||
|
"hints": {},
|
||||||
"type": [
|
"type": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/AndTagConfigJson"
|
"$ref": "#/definitions/AndTagConfigJson"
|
||||||
|
@ -788,6 +856,7 @@
|
||||||
"condition",
|
"condition",
|
||||||
"or"
|
"or"
|
||||||
],
|
],
|
||||||
|
"hints": {},
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||||
},
|
},
|
||||||
|
@ -796,6 +865,7 @@
|
||||||
"condition",
|
"condition",
|
||||||
"or"
|
"or"
|
||||||
],
|
],
|
||||||
|
"hints": {},
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||||
},
|
},
|
||||||
|
@ -803,6 +873,7 @@
|
||||||
"path": [
|
"path": [
|
||||||
"metacondition"
|
"metacondition"
|
||||||
],
|
],
|
||||||
|
"hints": {},
|
||||||
"type": [
|
"type": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/AndTagConfigJson",
|
"$ref": "#/definitions/AndTagConfigJson",
|
||||||
|
@ -822,6 +893,7 @@
|
||||||
"path": [
|
"path": [
|
||||||
"metacondition"
|
"metacondition"
|
||||||
],
|
],
|
||||||
|
"hints": {},
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||||
},
|
},
|
||||||
|
@ -830,6 +902,7 @@
|
||||||
"metacondition",
|
"metacondition",
|
||||||
"and"
|
"and"
|
||||||
],
|
],
|
||||||
|
"hints": {},
|
||||||
"type": [
|
"type": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/AndTagConfigJson"
|
"$ref": "#/definitions/AndTagConfigJson"
|
||||||
|
@ -860,6 +933,7 @@
|
||||||
"metacondition",
|
"metacondition",
|
||||||
"and"
|
"and"
|
||||||
],
|
],
|
||||||
|
"hints": {},
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||||
},
|
},
|
||||||
|
@ -867,6 +941,7 @@
|
||||||
"path": [
|
"path": [
|
||||||
"metacondition"
|
"metacondition"
|
||||||
],
|
],
|
||||||
|
"hints": {},
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||||
},
|
},
|
||||||
|
@ -875,6 +950,7 @@
|
||||||
"metacondition",
|
"metacondition",
|
||||||
"or"
|
"or"
|
||||||
],
|
],
|
||||||
|
"hints": {},
|
||||||
"type": [
|
"type": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/AndTagConfigJson"
|
"$ref": "#/definitions/AndTagConfigJson"
|
||||||
|
@ -905,6 +981,7 @@
|
||||||
"metacondition",
|
"metacondition",
|
||||||
"or"
|
"or"
|
||||||
],
|
],
|
||||||
|
"hints": {},
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||||
},
|
},
|
||||||
|
@ -913,6 +990,7 @@
|
||||||
"metacondition",
|
"metacondition",
|
||||||
"or"
|
"or"
|
||||||
],
|
],
|
||||||
|
"hints": {},
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"path": [],
|
"path": [],
|
||||||
|
"hints": {},
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"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"
|
"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"
|
||||||
},
|
},
|
||||||
|
@ -8,6 +9,7 @@
|
||||||
"path": [
|
"path": [
|
||||||
"id"
|
"id"
|
||||||
],
|
],
|
||||||
|
"hints": {},
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"description": "The id of the tagrendering, should be an unique string.\nUsed to keep the translations in sync. Only used in the tagRenderings-array of a layerConfig, not requered otherwise.\n\nUse 'questions' to trigger the question box of this group (if a group is defined)"
|
"description": "The id of the tagrendering, should be an unique string.\nUsed to keep the translations in sync. Only used in the tagRenderings-array of a layerConfig, not requered otherwise.\n\nUse 'questions' to trigger the question box of this group (if a group is defined)"
|
||||||
},
|
},
|
||||||
|
@ -15,6 +17,7 @@
|
||||||
"path": [
|
"path": [
|
||||||
"labels"
|
"labels"
|
||||||
],
|
],
|
||||||
|
"hints": {},
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"description": "A list of labels. These are strings that are used for various purposes, e.g. to filter them away"
|
"description": "A list of labels. These are strings that are used for various purposes, e.g. to filter them away"
|
||||||
},
|
},
|
||||||
|
@ -22,6 +25,7 @@
|
||||||
"path": [
|
"path": [
|
||||||
"classes"
|
"classes"
|
||||||
],
|
],
|
||||||
|
"hints": {},
|
||||||
"type": [
|
"type": [
|
||||||
{
|
{
|
||||||
"type": "array",
|
"type": "array",
|
||||||
|
@ -39,6 +43,7 @@
|
||||||
"path": [
|
"path": [
|
||||||
"description"
|
"description"
|
||||||
],
|
],
|
||||||
|
"hints": {},
|
||||||
"type": [
|
"type": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/Record<string,string>"
|
"$ref": "#/definitions/Record<string,string>"
|
||||||
|
@ -47,13 +52,15 @@
|
||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"description": "A human-readable text explaining what this tagRendering does"
|
"description": "A human-readable text explaining what this tagRendering does.\nMostly used for the shared tagrenderings"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": [
|
"path": [
|
||||||
"render"
|
"render"
|
||||||
],
|
],
|
||||||
"typeHint": "rendered",
|
"hints": {
|
||||||
|
"typehint": "rendered"
|
||||||
|
},
|
||||||
"type": [
|
"type": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/Record<string,string>"
|
"$ref": "#/definitions/Record<string,string>"
|
||||||
|
@ -88,12 +95,13 @@
|
||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"description": "Renders this value. Note that \"{key}\"-parts are substituted by the corresponding values of the element.\nIf neither 'textFieldQuestion' nor 'mappings' are defined, this text is simply shown as default value.\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered"
|
"description": "Renders this value. Note that \"{key}\"-parts are substituted by the corresponding values of the element.\nIf neither 'textFieldQuestion' nor 'mappings' are defined, this text is simply shown as default value.\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": [
|
"path": [
|
||||||
"condition"
|
"condition"
|
||||||
],
|
],
|
||||||
|
"hints": {},
|
||||||
"type": [
|
"type": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/AndTagConfigJson",
|
"$ref": "#/definitions/AndTagConfigJson",
|
||||||
|
@ -113,6 +121,7 @@
|
||||||
"path": [
|
"path": [
|
||||||
"condition"
|
"condition"
|
||||||
],
|
],
|
||||||
|
"hints": {},
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||||
},
|
},
|
||||||
|
@ -121,6 +130,7 @@
|
||||||
"condition",
|
"condition",
|
||||||
"and"
|
"and"
|
||||||
],
|
],
|
||||||
|
"hints": {},
|
||||||
"type": [
|
"type": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/AndTagConfigJson"
|
"$ref": "#/definitions/AndTagConfigJson"
|
||||||
|
@ -151,6 +161,7 @@
|
||||||
"condition",
|
"condition",
|
||||||
"and"
|
"and"
|
||||||
],
|
],
|
||||||
|
"hints": {},
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||||
},
|
},
|
||||||
|
@ -158,6 +169,7 @@
|
||||||
"path": [
|
"path": [
|
||||||
"condition"
|
"condition"
|
||||||
],
|
],
|
||||||
|
"hints": {},
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||||
},
|
},
|
||||||
|
@ -166,6 +178,7 @@
|
||||||
"condition",
|
"condition",
|
||||||
"or"
|
"or"
|
||||||
],
|
],
|
||||||
|
"hints": {},
|
||||||
"type": [
|
"type": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/AndTagConfigJson"
|
"$ref": "#/definitions/AndTagConfigJson"
|
||||||
|
@ -196,6 +209,7 @@
|
||||||
"condition",
|
"condition",
|
||||||
"or"
|
"or"
|
||||||
],
|
],
|
||||||
|
"hints": {},
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||||
},
|
},
|
||||||
|
@ -204,6 +218,7 @@
|
||||||
"condition",
|
"condition",
|
||||||
"or"
|
"or"
|
||||||
],
|
],
|
||||||
|
"hints": {},
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||||
},
|
},
|
||||||
|
@ -211,6 +226,7 @@
|
||||||
"path": [
|
"path": [
|
||||||
"metacondition"
|
"metacondition"
|
||||||
],
|
],
|
||||||
|
"hints": {},
|
||||||
"type": [
|
"type": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/AndTagConfigJson",
|
"$ref": "#/definitions/AndTagConfigJson",
|
||||||
|
@ -230,6 +246,7 @@
|
||||||
"path": [
|
"path": [
|
||||||
"metacondition"
|
"metacondition"
|
||||||
],
|
],
|
||||||
|
"hints": {},
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||||
},
|
},
|
||||||
|
@ -238,6 +255,7 @@
|
||||||
"metacondition",
|
"metacondition",
|
||||||
"and"
|
"and"
|
||||||
],
|
],
|
||||||
|
"hints": {},
|
||||||
"type": [
|
"type": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/AndTagConfigJson"
|
"$ref": "#/definitions/AndTagConfigJson"
|
||||||
|
@ -268,6 +286,7 @@
|
||||||
"metacondition",
|
"metacondition",
|
||||||
"and"
|
"and"
|
||||||
],
|
],
|
||||||
|
"hints": {},
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||||
},
|
},
|
||||||
|
@ -275,6 +294,7 @@
|
||||||
"path": [
|
"path": [
|
||||||
"metacondition"
|
"metacondition"
|
||||||
],
|
],
|
||||||
|
"hints": {},
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||||
},
|
},
|
||||||
|
@ -283,6 +303,7 @@
|
||||||
"metacondition",
|
"metacondition",
|
||||||
"or"
|
"or"
|
||||||
],
|
],
|
||||||
|
"hints": {},
|
||||||
"type": [
|
"type": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/AndTagConfigJson"
|
"$ref": "#/definitions/AndTagConfigJson"
|
||||||
|
@ -313,6 +334,7 @@
|
||||||
"metacondition",
|
"metacondition",
|
||||||
"or"
|
"or"
|
||||||
],
|
],
|
||||||
|
"hints": {},
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||||
},
|
},
|
||||||
|
@ -321,6 +343,7 @@
|
||||||
"metacondition",
|
"metacondition",
|
||||||
"or"
|
"or"
|
||||||
],
|
],
|
||||||
|
"hints": {},
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||||
},
|
},
|
||||||
|
@ -328,6 +351,7 @@
|
||||||
"path": [
|
"path": [
|
||||||
"freeform"
|
"freeform"
|
||||||
],
|
],
|
||||||
|
"hints": {},
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"description": "Allow freeform text input from the user"
|
"description": "Allow freeform text input from the user"
|
||||||
},
|
},
|
||||||
|
@ -336,6 +360,7 @@
|
||||||
"freeform",
|
"freeform",
|
||||||
"key"
|
"key"
|
||||||
],
|
],
|
||||||
|
"hints": {},
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"description": "If this key is present, then 'render' is used to display the value.\nIf this is undefined, the rendering is _always_ shown"
|
"description": "If this key is present, then 'render' is used to display the value.\nIf this is undefined, the rendering is _always_ shown"
|
||||||
},
|
},
|
||||||
|
@ -343,6 +368,7 @@
|
||||||
"path": [
|
"path": [
|
||||||
"mappings"
|
"mappings"
|
||||||
],
|
],
|
||||||
|
"hints": {},
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes"
|
"description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes"
|
||||||
},
|
},
|
||||||
|
@ -351,6 +377,7 @@
|
||||||
"mappings",
|
"mappings",
|
||||||
"if"
|
"if"
|
||||||
],
|
],
|
||||||
|
"hints": {},
|
||||||
"type": [
|
"type": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/AndTagConfigJson"
|
"$ref": "#/definitions/AndTagConfigJson"
|
||||||
|
@ -381,6 +408,7 @@
|
||||||
"mappings",
|
"mappings",
|
||||||
"if"
|
"if"
|
||||||
],
|
],
|
||||||
|
"hints": {},
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
"description": "Chain many tags, to match, a single of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||||
},
|
},
|
||||||
|
@ -389,6 +417,7 @@
|
||||||
"mappings",
|
"mappings",
|
||||||
"if"
|
"if"
|
||||||
],
|
],
|
||||||
|
"hints": {},
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
"description": "Chain many tags, to match, all of these should be true\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for documentation"
|
||||||
},
|
},
|
||||||
|
@ -397,7 +426,9 @@
|
||||||
"mappings",
|
"mappings",
|
||||||
"then"
|
"then"
|
||||||
],
|
],
|
||||||
"typeHint": "rendered",
|
"hints": {
|
||||||
|
"typehint": "rendered"
|
||||||
|
},
|
||||||
"type": [
|
"type": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/Record<string,string>"
|
"$ref": "#/definitions/Record<string,string>"
|
||||||
|
@ -406,14 +437,16 @@
|
||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"description": "If the condition `if` is met, the text `then` will be rendered.\nIf not known yet, the user will be presented with `then` as an option\nType: rendered"
|
"description": "If the condition `if` is met, the text `then` will be rendered.\nIf not known yet, the user will be presented with `then` as an option"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": [
|
"path": [
|
||||||
"mappings",
|
"mappings",
|
||||||
"icon"
|
"icon"
|
||||||
],
|
],
|
||||||
"typeHint": "icon",
|
"hints": {
|
||||||
|
"typehint": "icon"
|
||||||
|
},
|
||||||
"type": [
|
"type": [
|
||||||
{
|
{
|
||||||
"type": "object",
|
"type": "object",
|
||||||
|
@ -435,7 +468,7 @@
|
||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"description": "An icon supporting this mapping; typically shown pretty small\nType: icon"
|
"description": "An icon supporting this mapping; typically shown pretty small"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": [
|
"path": [
|
||||||
|
@ -443,9 +476,11 @@
|
||||||
"icon",
|
"icon",
|
||||||
"path"
|
"path"
|
||||||
],
|
],
|
||||||
"typeHint": "icon",
|
"hints": {
|
||||||
|
"typehint": "icon"
|
||||||
|
},
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"description": "The path to the icon\nType: icon"
|
"description": "The path to the icon"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": [
|
"path": [
|
||||||
|
@ -453,6 +488,7 @@
|
||||||
"icon",
|
"icon",
|
||||||
"class"
|
"class"
|
||||||
],
|
],
|
||||||
|
"hints": {},
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-<classtype>', so defining your own in combination with a custom CSS is possible (but discouraged)"
|
"description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-<classtype>', so defining your own in combination with a custom CSS is possible (but discouraged)"
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,26 +1,6 @@
|
||||||
import ScriptUtils from "./ScriptUtils"
|
import ScriptUtils from "./ScriptUtils"
|
||||||
import { readFileSync, writeFileSync } from "fs"
|
import { readFileSync, writeFileSync } from "fs"
|
||||||
|
import { JsonSchema } from "../UI/Studio/jsonSchema"
|
||||||
/**
|
|
||||||
* Extracts the data from the scheme file and writes them in a flatter structure
|
|
||||||
*/
|
|
||||||
|
|
||||||
export type JsonSchemaType =
|
|
||||||
| string
|
|
||||||
| { $ref: string; description: string }
|
|
||||||
| { type: string }
|
|
||||||
| JsonSchemaType[]
|
|
||||||
|
|
||||||
export interface JsonSchema {
|
|
||||||
description?: string
|
|
||||||
type?: JsonSchemaType
|
|
||||||
properties?: any
|
|
||||||
items?: JsonSchema
|
|
||||||
allOf?: JsonSchema[]
|
|
||||||
anyOf: JsonSchema[]
|
|
||||||
enum: JsonSchema[]
|
|
||||||
$ref: string
|
|
||||||
}
|
|
||||||
|
|
||||||
function WalkScheme<T>(
|
function WalkScheme<T>(
|
||||||
onEach: (schemePart: JsonSchema) => T,
|
onEach: (schemePart: JsonSchema) => T,
|
||||||
|
@ -52,7 +32,7 @@ function WalkScheme<T>(
|
||||||
}
|
}
|
||||||
|
|
||||||
fullScheme = fullScheme ?? scheme
|
fullScheme = fullScheme ?? scheme
|
||||||
var t = onEach(scheme)
|
let t = onEach(scheme)
|
||||||
if (t !== undefined) {
|
if (t !== undefined) {
|
||||||
results.push({
|
results.push({
|
||||||
path,
|
path,
|
||||||
|
@ -97,24 +77,51 @@ function WalkScheme<T>(
|
||||||
return results
|
return results
|
||||||
}
|
}
|
||||||
|
|
||||||
function extractMeta(typename: string, path: string) {
|
function addMetafields(fieldnames: string[], fullSchema: JsonSchema) {
|
||||||
const themeSchema = JSON.parse(
|
return WalkScheme((schemePart) => {
|
||||||
readFileSync("./Docs/Schemas/" + typename + ".schema.json", { encoding: "utf8" })
|
|
||||||
)
|
|
||||||
const withTypes = WalkScheme((schemePart) => {
|
|
||||||
if (schemePart.description === undefined) {
|
if (schemePart.description === undefined) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
const typeHint = schemePart.description
|
|
||||||
.split("\n")
|
|
||||||
.find((line) => line.trim().toLocaleLowerCase().startsWith("type:"))
|
|
||||||
?.substr("type:".length)
|
|
||||||
?.trim()
|
|
||||||
const type = schemePart.items?.anyOf ?? schemePart.type ?? schemePart.anyOf
|
const type = schemePart.items?.anyOf ?? schemePart.type ?? schemePart.anyOf
|
||||||
return { typeHint, type, description: schemePart.description }
|
const hints = {}
|
||||||
}, themeSchema)
|
let description = schemePart.description.split("\n")
|
||||||
|
for (const fieldname of fieldnames) {
|
||||||
|
const hintIndex = description.findIndex((line) =>
|
||||||
|
line
|
||||||
|
.trim()
|
||||||
|
.toLocaleLowerCase()
|
||||||
|
.startsWith(fieldname + ":")
|
||||||
|
)
|
||||||
|
if (hintIndex < 0) {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
const hintLine = description[hintIndex].substring((fieldname + ":").length).trim()
|
||||||
|
description.splice(hintIndex, 1)
|
||||||
|
if (fieldname === "type") {
|
||||||
|
hints["typehint"] = hintLine
|
||||||
|
} else {
|
||||||
|
hints[fieldname] = hintLine
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return { hints, type, description: description.join("\n") }
|
||||||
|
}, fullSchema)
|
||||||
|
}
|
||||||
|
|
||||||
|
function extractMeta(typename: string, path: string) {
|
||||||
|
let themeSchema: JsonSchema = JSON.parse(
|
||||||
|
readFileSync("./Docs/Schemas/" + typename + ".schema.json", { encoding: "utf8" })
|
||||||
|
)
|
||||||
|
|
||||||
|
const metakeys = ["type", "group", "question", "ifunset"]
|
||||||
|
|
||||||
|
const hints = addMetafields(metakeys, themeSchema)
|
||||||
|
const paths = hints.map(({ path, t }) => ({ path, ...t }))
|
||||||
|
|
||||||
|
themeSchema.required?.forEach((req) => {
|
||||||
|
paths.filter((p) => p.path.at(-1) === req).forEach((meta) => (meta["required"] = true))
|
||||||
|
})
|
||||||
|
|
||||||
const paths = withTypes.map(({ path, t }) => ({ path, ...t }))
|
|
||||||
writeFileSync("./assets/" + path + ".json", JSON.stringify(paths, null, " "))
|
writeFileSync("./assets/" + path + ".json", JSON.stringify(paths, null, " "))
|
||||||
console.log("Written meta to ./assets/" + path)
|
console.log("Written meta to ./assets/" + path)
|
||||||
}
|
}
|
||||||
|
@ -141,7 +148,7 @@ function main() {
|
||||||
encoding: "utf8",
|
encoding: "utf8",
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
extractMeta("LayerConfigJson", "layerconfigmeta")
|
||||||
extractMeta("LayoutConfigJson", "layoutconfigmeta")
|
extractMeta("LayoutConfigJson", "layoutconfigmeta")
|
||||||
extractMeta("TagRenderingConfigJson", "tagrenderingconfigmeta")
|
extractMeta("TagRenderingConfigJson", "tagrenderingconfigmeta")
|
||||||
extractMeta("QuestionableTagRenderingConfigJson", "questionabletagrenderingconfigmeta")
|
extractMeta("QuestionableTagRenderingConfigJson", "questionabletagrenderingconfigmeta")
|
||||||
|
|
20
studio.html
Normal file
20
studio.html
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<title>MapComplete statistics</title>
|
||||||
|
<meta content="width=device-width, initial-scale=1.0, user-scalable=no" name="viewport">
|
||||||
|
<link href="./css/mobile.css" rel="stylesheet"/>
|
||||||
|
<link href="./css/openinghourstable.css" rel="stylesheet"/>
|
||||||
|
<link href="./css/tagrendering.css" rel="stylesheet"/>
|
||||||
|
<link href="css/ReviewElement.css" rel="stylesheet"/>
|
||||||
|
<link href="./css/index-tailwind-output.css" rel="stylesheet"/>
|
||||||
|
<link href="./css/wikipedia.css" rel="stylesheet"/>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div id="main">Initing studio...</div>
|
||||||
|
<script src="./UI/StudioGui.ts" type="module"></script>
|
||||||
|
<script async data-goatcounter="https://pietervdvn.goatcounter.com/count" src="//gc.zgo.at/count.js"></script>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
Loading…
Reference in a new issue