diff --git a/Docs/Schemas/LayerConfigJson.schema.json b/Docs/Schemas/LayerConfigJson.schema.json index e7eb813fc..f018eb86e 100644 --- a/Docs/Schemas/LayerConfigJson.schema.json +++ b/Docs/Schemas/LayerConfigJson.schema.json @@ -3,11 +3,11 @@ "type": "object", "properties": { "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" }, "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": [ { "$ref": "#/definitions/Record" @@ -18,7 +18,7 @@ ] }, "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": [ { "$ref": "#/definitions/Record" @@ -85,18 +85,18 @@ ] }, "calculatedTags": { - "description": "A list of extra tags to calculate, specified as \"keyToAssignTo=javascript-expression\".\nThere are a few extra functions available. Refer to Docs/CalculatedTags.md 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 Docs/CalculatedTags.md 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", "items": { "type": "string" } }, "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" }, "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": [ { "$ref": "#/definitions/AndTagConfigJson", @@ -112,23 +112,23 @@ ] }, "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" }, "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" }, "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" }, "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" }, "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": [ { "$ref": "#/definitions/TagRenderingConfigJson" @@ -139,7 +139,7 @@ ] }, "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": [ { "type": "array", @@ -170,7 +170,7 @@ ] }, "mapRendering": { - "description": "Visualisation of the items on the map", + "description": "Visualisation of the items on the map\n\ngroup: maprendering", "anyOf": [ { "type": "array", @@ -194,11 +194,11 @@ ] }, "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" }, "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", "items": { "type": "object", @@ -295,7 +295,7 @@ } }, "tagRenderings": { - "description": "All the tag renderings.\nA tag rendering is a block that either shows the known value or asks a question.\n\nRefer to the class `TagRenderingConfigJson` to see the possibilities.\n\nNote that we can also use a string here - where the string refers to a tag rendering defined in `assets/questions/questions.json`,\nwhere a few very general questions are defined e.g. website, phone number, ...\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", "items": { "anyOf": [ @@ -355,7 +355,7 @@ } }, "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": [ { "type": "array", @@ -384,7 +384,7 @@ ] }, "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": [ { "$ref": "#/definitions/DeleteConfigJson" @@ -395,7 +395,7 @@ ] }, "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": [ { "$ref": "#/definitions/default_3" @@ -406,7 +406,7 @@ ] }, "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" }, "units": { @@ -416,7 +416,7 @@ } }, "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": [ "global", "local", @@ -426,8 +426,16 @@ "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" + }, + "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": [ @@ -596,7 +604,7 @@ ] }, "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": [ { "$ref": "#/definitions/Record" @@ -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" }, "then": { - "description": "Shown if the 'if is fulfilled\nType: rendered" + "description": "Shown if the 'if is fulfilled\nType: rendered", + "anyOf": [ + { + "$ref": "#/definitions/Record" + }, + { + "type": "string" + } + ] }, "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": { - "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": [ { "$ref": "#/definitions/TagRenderingConfigJson" @@ -1269,7 +1270,7 @@ ] }, "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": [ { "$ref": "#/definitions/Record" @@ -1452,7 +1453,7 @@ ] }, "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": [ { "$ref": "#/definitions/Record" @@ -1752,7 +1753,7 @@ "type": "object", "properties": { "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()}`", "type": "array", "items": { "type": "string" diff --git a/Docs/Schemas/LayerConfigJsonJSC.ts b/Docs/Schemas/LayerConfigJsonJSC.ts index 4eaf333ef..37308c79e 100644 --- a/Docs/Schemas/LayerConfigJsonJSC.ts +++ b/Docs/Schemas/LayerConfigJsonJSC.ts @@ -3,11 +3,11 @@ export default { "type": "object", "properties": { "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" }, "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": [ { "$ref": "#/definitions/Record" @@ -18,7 +18,7 @@ export default { ] }, "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": [ { "$ref": "#/definitions/Record" @@ -85,18 +85,18 @@ export default { ] }, "calculatedTags": { - "description": "A list of extra tags to calculate, specified as \"keyToAssignTo=javascript-expression\".\nThere are a few extra functions available. Refer to Docs/CalculatedTags.md 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 Docs/CalculatedTags.md 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", "items": { "type": "string" } }, "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" }, "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": [ { "$ref": "#/definitions/AndTagConfigJson", @@ -112,23 +112,23 @@ export default { ] }, "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" }, "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" }, "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" }, "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" }, "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": [ { "$ref": "#/definitions/TagRenderingConfigJson" @@ -139,7 +139,7 @@ export default { ] }, "titleIcons": { - "description": "Small icons shown next to the title.\nIf not specified, the OsmLink and wikipedia links will be used by default.\nUse an empty array to hide them.\nNote that \"defaults\" will insert all the default titleIcons (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": [ { "type": "array", @@ -170,7 +170,7 @@ export default { ] }, "mapRendering": { - "description": "Visualisation of the items on the map", + "description": "Visualisation of the items on the map\n\ngroup: maprendering", "anyOf": [ { "type": "array", @@ -194,11 +194,11 @@ export default { ] }, "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" }, "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", "items": { "type": "object", @@ -295,7 +295,7 @@ export default { } }, "tagRenderings": { - "description": "All the tag renderings.\nA tag rendering is a block that either shows the known value or asks a question.\n\nRefer to the class `TagRenderingConfigJson` to see the possibilities.\n\nNote that we can also use a string here - where the string refers to a tag rendering defined in `assets/questions/questions.json`,\nwhere a few very general questions are defined e.g. website, phone number, ...\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", "items": { "anyOf": [ @@ -355,7 +355,7 @@ export default { } }, "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": [ { "type": "array", @@ -384,7 +384,7 @@ export default { ] }, "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": [ { "$ref": "#/definitions/DeleteConfigJson" @@ -395,7 +395,7 @@ export default { ] }, "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": [ { "$ref": "#/definitions/default_3" @@ -406,7 +406,7 @@ export default { ] }, "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" }, "units": { @@ -416,7 +416,7 @@ export default { } }, "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": [ "global", "local", @@ -426,8 +426,16 @@ export default { "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" + }, + "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": [ @@ -591,7 +599,7 @@ export default { ] }, "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": [ { "$ref": "#/definitions/Record" @@ -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" }, "then": { - "description": "Shown if the 'if is fulfilled\nType: rendered" + "description": "Shown if the 'if is fulfilled\nType: rendered", + "anyOf": [ + { + "$ref": "#/definitions/Record" + }, + { + "type": "string" + } + ] }, "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": { - "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": [ { "$ref": "#/definitions/TagRenderingConfigJson" @@ -1257,7 +1258,7 @@ export default { ] }, "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": [ { "$ref": "#/definitions/Record" @@ -1439,7 +1440,7 @@ export default { ] }, "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": [ { "$ref": "#/definitions/Record" @@ -1734,7 +1735,7 @@ export default { "type": "object", "properties": { "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()}`", "type": "array", "items": { "type": "string" diff --git a/Docs/Schemas/LayoutConfigJson.schema.json b/Docs/Schemas/LayoutConfigJson.schema.json index c004dda31..f02b4f8fa 100644 --- a/Docs/Schemas/LayoutConfigJson.schema.json +++ b/Docs/Schemas/LayoutConfigJson.schema.json @@ -465,7 +465,7 @@ ] }, "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": [ { "$ref": "#/definitions/Record" @@ -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" }, "then": { - "description": "Shown if the 'if is fulfilled\nType: rendered" + "description": "Shown if the 'if is fulfilled\nType: rendered", + "anyOf": [ + { + "$ref": "#/definitions/Record" + }, + { + "type": "string" + } + ] }, "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": { - "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": [ { "$ref": "#/definitions/TagRenderingConfigJson" @@ -1138,7 +1131,7 @@ ] }, "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": [ { "$ref": "#/definitions/Record" @@ -1321,7 +1314,7 @@ ] }, "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": [ { "$ref": "#/definitions/Record" @@ -1621,7 +1614,7 @@ "type": "object", "properties": { "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()}`", "type": "array", "items": { "type": "string" @@ -1679,6 +1672,9 @@ "category": { "type": "string" }, + "type": { + "type": "string" + }, "attribution": { "type": "object", "properties": { @@ -1718,11 +1714,11 @@ "type": "object", "properties": { "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" }, "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": [ { "$ref": "#/definitions/Record" @@ -1733,7 +1729,7 @@ ] }, "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": [ { "$ref": "#/definitions/Record" @@ -1800,18 +1796,18 @@ ] }, "calculatedTags": { - "description": "A list of extra tags to calculate, specified as \"keyToAssignTo=javascript-expression\".\nThere are a few extra functions available. Refer to Docs/CalculatedTags.md 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 Docs/CalculatedTags.md 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", "items": { "type": "string" } }, "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" }, "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": [ { "$ref": "#/definitions/AndTagConfigJson", @@ -1827,23 +1823,23 @@ ] }, "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" }, "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" }, "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" }, "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" }, "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": [ { "$ref": "#/definitions/TagRenderingConfigJson" @@ -1854,7 +1850,7 @@ ] }, "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": [ { "type": "array", @@ -1885,7 +1881,7 @@ ] }, "mapRendering": { - "description": "Visualisation of the items on the map", + "description": "Visualisation of the items on the map\n\ngroup: maprendering", "anyOf": [ { "type": "array", @@ -1909,11 +1905,11 @@ ] }, "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" }, "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", "items": { "type": "object", @@ -2010,7 +2006,7 @@ } }, "tagRenderings": { - "description": "All the tag renderings.\nA tag rendering is a block that either shows the known value or asks a question.\n\nRefer to the class `TagRenderingConfigJson` to see the possibilities.\n\nNote that we can also use a string here - where the string refers to a tag rendering defined in `assets/questions/questions.json`,\nwhere a few very general questions are defined e.g. website, phone number, ...\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", "items": { "anyOf": [ @@ -2070,7 +2066,7 @@ } }, "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": [ { "type": "array", @@ -2099,7 +2095,7 @@ ] }, "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": [ { "$ref": "#/definitions/DeleteConfigJson" @@ -2110,7 +2106,7 @@ ] }, "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": [ { "$ref": "#/definitions/default_3" @@ -2121,7 +2117,7 @@ ] }, "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" }, "units": { @@ -2131,7 +2127,7 @@ } }, "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": [ "global", "local", @@ -2141,8 +2137,16 @@ "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" + }, + "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": [ @@ -2156,11 +2160,11 @@ "type": "object", "properties": { "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" }, "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": [ { "$ref": "#/definitions/Record" @@ -2171,7 +2175,7 @@ ] }, "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": [ { "$ref": "#/definitions/Record" @@ -2238,18 +2242,18 @@ ] }, "calculatedTags": { - "description": "A list of extra tags to calculate, specified as \"keyToAssignTo=javascript-expression\".\nThere are a few extra functions available. Refer to Docs/CalculatedTags.md 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 Docs/CalculatedTags.md 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", "items": { "type": "string" } }, "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" }, "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": [ { "$ref": "#/definitions/AndTagConfigJson", @@ -2265,23 +2269,23 @@ ] }, "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" }, "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" }, "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" }, "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" }, "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": [ { "$ref": "#/definitions/TagRenderingConfigJson" @@ -2292,7 +2296,7 @@ ] }, "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": [ { "type": "array", @@ -2323,7 +2327,7 @@ ] }, "mapRendering": { - "description": "Visualisation of the items on the map", + "description": "Visualisation of the items on the map\n\ngroup: maprendering", "anyOf": [ { "type": "array", @@ -2347,11 +2351,11 @@ ] }, "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" }, "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", "items": { "type": "object", @@ -2448,7 +2452,7 @@ } }, "tagRenderings": { - "description": "All the tag renderings.\nA tag rendering is a block that either shows the known value or asks a question.\n\nRefer to the class `TagRenderingConfigJson` to see the possibilities.\n\nNote that we can also use a string here - where the string refers to a tag rendering defined in `assets/questions/questions.json`,\nwhere a few very general questions are defined e.g. website, phone number, ...\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", "items": { "anyOf": [ @@ -2508,7 +2512,7 @@ } }, "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": [ { "type": "array", @@ -2537,7 +2541,7 @@ ] }, "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": [ { "$ref": "#/definitions/DeleteConfigJson" @@ -2548,7 +2552,7 @@ ] }, "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": [ { "$ref": "#/definitions/default_3" @@ -2559,7 +2563,7 @@ ] }, "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" }, "units": { @@ -2569,7 +2573,7 @@ } }, "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": [ "global", "local", @@ -2579,8 +2583,16 @@ "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" + }, + "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 diff --git a/Docs/Schemas/LayoutConfigJsonJSC.ts b/Docs/Schemas/LayoutConfigJsonJSC.ts index 7c396ce1e..758c89e5f 100644 --- a/Docs/Schemas/LayoutConfigJsonJSC.ts +++ b/Docs/Schemas/LayoutConfigJsonJSC.ts @@ -460,7 +460,7 @@ export default { ] }, "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": [ { "$ref": "#/definitions/Record" @@ -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" }, "then": { - "description": "Shown if the 'if is fulfilled\nType: rendered" + "description": "Shown if the 'if is fulfilled\nType: rendered", + "anyOf": [ + { + "$ref": "#/definitions/Record" + }, + { + "type": "string" + } + ] }, "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": { - "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": [ { "$ref": "#/definitions/TagRenderingConfigJson" @@ -1126,7 +1119,7 @@ export default { ] }, "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": [ { "$ref": "#/definitions/Record" @@ -1308,7 +1301,7 @@ export default { ] }, "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": [ { "$ref": "#/definitions/Record" @@ -1603,7 +1596,7 @@ export default { "type": "object", "properties": { "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()}`", "type": "array", "items": { "type": "string" @@ -1659,6 +1652,9 @@ export default { "category": { "type": "string" }, + "type": { + "type": "string" + }, "attribution": { "type": "object", "properties": { @@ -1697,11 +1693,11 @@ export default { "type": "object", "properties": { "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" }, "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": [ { "$ref": "#/definitions/Record" @@ -1712,7 +1708,7 @@ export default { ] }, "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": [ { "$ref": "#/definitions/Record" @@ -1779,18 +1775,18 @@ export default { ] }, "calculatedTags": { - "description": "A list of extra tags to calculate, specified as \"keyToAssignTo=javascript-expression\".\nThere are a few extra functions available. Refer to Docs/CalculatedTags.md 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 Docs/CalculatedTags.md 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", "items": { "type": "string" } }, "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" }, "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": [ { "$ref": "#/definitions/AndTagConfigJson", @@ -1806,23 +1802,23 @@ export default { ] }, "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" }, "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" }, "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" }, "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" }, "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": [ { "$ref": "#/definitions/TagRenderingConfigJson" @@ -1833,7 +1829,7 @@ export default { ] }, "titleIcons": { - "description": "Small icons shown next to the title.\nIf not specified, the OsmLink and wikipedia links will be used by default.\nUse an empty array to hide them.\nNote that \"defaults\" will insert all the default titleIcons (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": [ { "type": "array", @@ -1864,7 +1860,7 @@ export default { ] }, "mapRendering": { - "description": "Visualisation of the items on the map", + "description": "Visualisation of the items on the map\n\ngroup: maprendering", "anyOf": [ { "type": "array", @@ -1888,11 +1884,11 @@ export default { ] }, "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" }, "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", "items": { "type": "object", @@ -1989,7 +1985,7 @@ export default { } }, "tagRenderings": { - "description": "All the tag renderings.\nA tag rendering is a block that either shows the known value or asks a question.\n\nRefer to the class `TagRenderingConfigJson` to see the possibilities.\n\nNote that we can also use a string here - where the string refers to a tag rendering defined in `assets/questions/questions.json`,\nwhere a few very general questions are defined e.g. website, phone number, ...\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", "items": { "anyOf": [ @@ -2049,7 +2045,7 @@ export default { } }, "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": [ { "type": "array", @@ -2078,7 +2074,7 @@ export default { ] }, "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": [ { "$ref": "#/definitions/DeleteConfigJson" @@ -2089,7 +2085,7 @@ export default { ] }, "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": [ { "$ref": "#/definitions/default_3" @@ -2100,7 +2096,7 @@ export default { ] }, "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" }, "units": { @@ -2110,7 +2106,7 @@ export default { } }, "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": [ "global", "local", @@ -2120,8 +2116,16 @@ export default { "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" + }, + "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": [ @@ -2134,11 +2138,11 @@ export default { "type": "object", "properties": { "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" }, "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": [ { "$ref": "#/definitions/Record" @@ -2149,7 +2153,7 @@ export default { ] }, "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": [ { "$ref": "#/definitions/Record" @@ -2216,18 +2220,18 @@ export default { ] }, "calculatedTags": { - "description": "A list of extra tags to calculate, specified as \"keyToAssignTo=javascript-expression\".\nThere are a few extra functions available. Refer to Docs/CalculatedTags.md 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 Docs/CalculatedTags.md 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", "items": { "type": "string" } }, "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" }, "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": [ { "$ref": "#/definitions/AndTagConfigJson", @@ -2243,23 +2247,23 @@ export default { ] }, "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" }, "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" }, "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" }, "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" }, "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": [ { "$ref": "#/definitions/TagRenderingConfigJson" @@ -2270,7 +2274,7 @@ export default { ] }, "titleIcons": { - "description": "Small icons shown next to the title.\nIf not specified, the OsmLink and wikipedia links will be used by default.\nUse an empty array to hide them.\nNote that \"defaults\" will insert all the default titleIcons (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": [ { "type": "array", @@ -2301,7 +2305,7 @@ export default { ] }, "mapRendering": { - "description": "Visualisation of the items on the map", + "description": "Visualisation of the items on the map\n\ngroup: maprendering", "anyOf": [ { "type": "array", @@ -2325,11 +2329,11 @@ export default { ] }, "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" }, "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", "items": { "type": "object", @@ -2426,7 +2430,7 @@ export default { } }, "tagRenderings": { - "description": "All the tag renderings.\nA tag rendering is a block that either shows the known value or asks a question.\n\nRefer to the class `TagRenderingConfigJson` to see the possibilities.\n\nNote that we can also use a string here - where the string refers to a tag rendering defined in `assets/questions/questions.json`,\nwhere a few very general questions are defined e.g. website, phone number, ...\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", "items": { "anyOf": [ @@ -2486,7 +2490,7 @@ export default { } }, "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": [ { "type": "array", @@ -2515,7 +2519,7 @@ export default { ] }, "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": [ { "$ref": "#/definitions/DeleteConfigJson" @@ -2526,7 +2530,7 @@ export default { ] }, "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": [ { "$ref": "#/definitions/default_3" @@ -2537,7 +2541,7 @@ export default { ] }, "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" }, "units": { @@ -2547,7 +2551,7 @@ export default { } }, "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": [ "global", "local", @@ -2557,8 +2561,16 @@ export default { "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" + }, + "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" } } }, diff --git a/Docs/Schemas/LineRenderingConfigJson.schema.json b/Docs/Schemas/LineRenderingConfigJson.schema.json index 744b13d2b..6851470f5 100644 --- a/Docs/Schemas/LineRenderingConfigJson.schema.json +++ b/Docs/Schemas/LineRenderingConfigJson.schema.json @@ -49,23 +49,8 @@ } ] }, - "fill": { - "description": "Whether or not to fill polygons", - "anyOf": [ - { - "$ref": "#/definitions/TagRenderingConfigJson" - }, - { - "enum": [ - "no", - "yes" - ], - "type": "string" - } - ] - }, "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": [ { "$ref": "#/definitions/TagRenderingConfigJson" @@ -248,7 +233,7 @@ ] }, "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": [ { "$ref": "#/definitions/Record" diff --git a/Docs/Schemas/LineRenderingConfigJsonJSC.ts b/Docs/Schemas/LineRenderingConfigJsonJSC.ts index db7177b6f..a31659428 100644 --- a/Docs/Schemas/LineRenderingConfigJsonJSC.ts +++ b/Docs/Schemas/LineRenderingConfigJsonJSC.ts @@ -49,23 +49,8 @@ export default { } ] }, - "fill": { - "description": "Whether or not to fill polygons", - "anyOf": [ - { - "$ref": "#/definitions/TagRenderingConfigJson" - }, - { - "enum": [ - "no", - "yes" - ], - "type": "string" - } - ] - }, "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": [ { "$ref": "#/definitions/TagRenderingConfigJson" @@ -243,7 +228,7 @@ export default { ] }, "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": [ { "$ref": "#/definitions/Record" diff --git a/Docs/Schemas/MappingConfigJson.schema.json b/Docs/Schemas/MappingConfigJson.schema.json index 2b5926dd8..1d03bba21 100644 --- a/Docs/Schemas/MappingConfigJson.schema.json +++ b/Docs/Schemas/MappingConfigJson.schema.json @@ -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" }, "then": { - "description": "Shown if the 'if is fulfilled\nType: rendered" + "description": "Shown if the 'if is fulfilled\nType: rendered", + "anyOf": [ + { + "$ref": "#/definitions/Record" + }, + { + "type": "string" + } + ] }, "icon": { "description": "An extra icon supporting the choice\nType: icon", @@ -264,7 +272,7 @@ ] }, "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": [ { "$ref": "#/definitions/Record" diff --git a/Docs/Schemas/MappingConfigJsonJSC.ts b/Docs/Schemas/MappingConfigJsonJSC.ts index b53c9837b..dc6ab7272 100644 --- a/Docs/Schemas/MappingConfigJsonJSC.ts +++ b/Docs/Schemas/MappingConfigJsonJSC.ts @@ -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" }, "then": { - "description": "Shown if the 'if is fulfilled\nType: rendered" + "description": "Shown if the 'if is fulfilled\nType: rendered", + "anyOf": [ + { + "$ref": "#/definitions/Record" + }, + { + "type": "string" + } + ] }, "icon": { "description": "An extra icon supporting the choice\nType: icon", @@ -259,7 +267,7 @@ export default { ] }, "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": [ { "$ref": "#/definitions/Record" diff --git a/Docs/Schemas/PointRenderingConfigJson.schema.json b/Docs/Schemas/PointRenderingConfigJson.schema.json index a8c0069fd..4fce67ff2 100644 --- a/Docs/Schemas/PointRenderingConfigJson.schema.json +++ b/Docs/Schemas/PointRenderingConfigJson.schema.json @@ -320,7 +320,7 @@ ] }, "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": [ { "$ref": "#/definitions/Record" diff --git a/Docs/Schemas/PointRenderingConfigJsonJSC.ts b/Docs/Schemas/PointRenderingConfigJsonJSC.ts index 974a1735f..5aa23c5aa 100644 --- a/Docs/Schemas/PointRenderingConfigJsonJSC.ts +++ b/Docs/Schemas/PointRenderingConfigJsonJSC.ts @@ -315,7 +315,7 @@ export default { ] }, "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": [ { "$ref": "#/definitions/Record" diff --git a/Docs/Schemas/QuestionableTagRenderingConfigJson.schema.json b/Docs/Schemas/QuestionableTagRenderingConfigJson.schema.json index 2eabe2ca6..2d7d7e930 100644 --- a/Docs/Schemas/QuestionableTagRenderingConfigJson.schema.json +++ b/Docs/Schemas/QuestionableTagRenderingConfigJson.schema.json @@ -100,7 +100,7 @@ ] }, "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": [ { "$ref": "#/definitions/Record" @@ -341,7 +341,7 @@ ] }, "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": [ { "$ref": "#/definitions/Record" @@ -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" }, "then": { - "description": "Shown if the 'if is fulfilled\nType: rendered" + "description": "Shown if the 'if is fulfilled\nType: rendered", + "anyOf": [ + { + "$ref": "#/definitions/Record" + }, + { + "type": "string" + } + ] }, "icon": { "description": "An extra icon supporting the choice\nType: icon", diff --git a/Docs/Schemas/QuestionableTagRenderingConfigJsonJSC.ts b/Docs/Schemas/QuestionableTagRenderingConfigJsonJSC.ts index b0b2b1689..fe2a87c1e 100644 --- a/Docs/Schemas/QuestionableTagRenderingConfigJsonJSC.ts +++ b/Docs/Schemas/QuestionableTagRenderingConfigJsonJSC.ts @@ -100,7 +100,7 @@ export default { ] }, "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": [ { "$ref": "#/definitions/Record" @@ -336,7 +336,7 @@ export default { ] }, "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": [ { "$ref": "#/definitions/Record" @@ -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" }, "then": { - "description": "Shown if the 'if is fulfilled\nType: rendered" + "description": "Shown if the 'if is fulfilled\nType: rendered", + "anyOf": [ + { + "$ref": "#/definitions/Record" + }, + { + "type": "string" + } + ] }, "icon": { "description": "An extra icon supporting the choice\nType: icon", diff --git a/Docs/Schemas/RewritableConfigJson.schema.json b/Docs/Schemas/RewritableConfigJson.schema.json index 01dbd836f..f463aee8f 100644 --- a/Docs/Schemas/RewritableConfigJson.schema.json +++ b/Docs/Schemas/RewritableConfigJson.schema.json @@ -193,7 +193,7 @@ ] }, "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": [ { "$ref": "#/definitions/Record" @@ -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" }, "then": { - "description": "Shown if the 'if is fulfilled\nType: rendered" + "description": "Shown if the 'if is fulfilled\nType: rendered", + "anyOf": [ + { + "$ref": "#/definitions/Record" + }, + { + "type": "string" + } + ] }, "icon": { "description": "An extra icon supporting the choice\nType: icon", diff --git a/Docs/Schemas/RewritableConfigJsonJSC.ts b/Docs/Schemas/RewritableConfigJsonJSC.ts index b173395d5..3f13ebb62 100644 --- a/Docs/Schemas/RewritableConfigJsonJSC.ts +++ b/Docs/Schemas/RewritableConfigJsonJSC.ts @@ -188,7 +188,7 @@ export default { ] }, "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": [ { "$ref": "#/definitions/Record" @@ -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" }, "then": { - "description": "Shown if the 'if is fulfilled\nType: rendered" + "description": "Shown if the 'if is fulfilled\nType: rendered", + "anyOf": [ + { + "$ref": "#/definitions/Record" + }, + { + "type": "string" + } + ] }, "icon": { "description": "An extra icon supporting the choice\nType: icon", diff --git a/Docs/Schemas/TagRenderingConfigJson.schema.json b/Docs/Schemas/TagRenderingConfigJson.schema.json index 3453db4de..2b9e5fc90 100644 --- a/Docs/Schemas/TagRenderingConfigJson.schema.json +++ b/Docs/Schemas/TagRenderingConfigJson.schema.json @@ -28,7 +28,7 @@ ] }, "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": [ { "$ref": "#/definitions/Record" diff --git a/Docs/Schemas/TagRenderingConfigJsonJSC.ts b/Docs/Schemas/TagRenderingConfigJsonJSC.ts index c2bdd5fe0..b0610fa05 100644 --- a/Docs/Schemas/TagRenderingConfigJsonJSC.ts +++ b/Docs/Schemas/TagRenderingConfigJsonJSC.ts @@ -28,7 +28,7 @@ export default { ] }, "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": [ { "$ref": "#/definitions/Record" diff --git a/Docs/Schemas/UnitConfigJson.schema.json b/Docs/Schemas/UnitConfigJson.schema.json index 624997222..161f4f9c5 100644 --- a/Docs/Schemas/UnitConfigJson.schema.json +++ b/Docs/Schemas/UnitConfigJson.schema.json @@ -3,7 +3,7 @@ "type": "object", "properties": { "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()}`", "type": "array", "items": { "type": "string" diff --git a/Docs/Schemas/UnitConfigJsonJSC.ts b/Docs/Schemas/UnitConfigJsonJSC.ts index 857c15586..bd20a3e33 100644 --- a/Docs/Schemas/UnitConfigJsonJSC.ts +++ b/Docs/Schemas/UnitConfigJsonJSC.ts @@ -3,7 +3,7 @@ export default { "type": "object", "properties": { "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()}`", "type": "array", "items": { "type": "string" diff --git a/Models/ThemeConfig/Conversion/FixImages.ts b/Models/ThemeConfig/Conversion/FixImages.ts index 83be16804..876d298de 100644 --- a/Models/ThemeConfig/Conversion/FixImages.ts +++ b/Models/ThemeConfig/Conversion/FixImages.ts @@ -13,15 +13,17 @@ export class ExtractImages extends Conversion< private _isOfficial: boolean private _sharedTagRenderings: Set - private static readonly layoutMetaPaths = metapaths.filter( - (mp) => + private static readonly layoutMetaPaths = metapaths.filter((mp) => { + const typeHint = mp.hints.typehint + return ( ExtractImages.mightBeTagRendering(mp) || - (mp.typeHint !== undefined && - (mp.typeHint === "image" || - mp.typeHint === "icon" || - mp.typeHint === "image[]" || - mp.typeHint === "icon[]")) - ) + (typeHint !== undefined && + (typeHint === "image" || + typeHint === "icon" || + typeHint === "image[]" || + typeHint === "icon[]")) + ) + }) private static readonly tagRenderingMetaPaths = tagrenderingmetapaths constructor(isOfficial: boolean, sharedTagRenderings: Set) { @@ -94,7 +96,7 @@ export class ExtractImages extends Conversion< for (const metapath of ExtractImages.layoutMetaPaths) { const mightBeTr = ExtractImages.mightBeTagRendering(metapath) const allRenderedValuesAreImages = - metapath.typeHint === "icon" || metapath.typeHint === "image" + metapath.hints.typehint === "icon" || metapath.hints.typehint === "image" const found = Utils.CollectPath(metapath.path, json) if (mightBeTr) { // We might have tagRenderingConfigs containing icons here @@ -124,9 +126,10 @@ export class ExtractImages extends Conversion< for (const trpath of ExtractImages.tagRenderingMetaPaths) { // Inspect all the rendered values const fromPath = Utils.CollectPath(trpath.path, foundImage) - const isRendered = trpath.typeHint === "rendered" + const isRendered = trpath.hints.typehint === "rendered" const isImage = - trpath.typeHint === "icon" || trpath.typeHint === "image" + trpath.hints.typehint === "icon" || + trpath.hints.typehint === "image" for (const img of fromPath) { if (allRenderedValuesAreImages && isRendered) { // What we found is an image @@ -310,7 +313,7 @@ export class FixImages extends DesugaringStep { json = Utils.Clone(json) for (const metapath of metapaths) { - if (metapath.typeHint !== "image" && metapath.typeHint !== "icon") { + if (metapath.hints.typehint !== "image" && metapath.hints.typehint !== "icon") { continue } const mightBeTr = ExtractImages.mightBeTagRendering(metapath) @@ -323,7 +326,7 @@ export class FixImages extends DesugaringStep { // We might have reached a tagRenderingConfig containing icons // lets walk every rendered value and fix the images in there for (const trpath of tagrenderingmetapaths) { - if (trpath.typeHint !== "rendered") { + if (trpath.hints.typehint !== "rendered") { continue } Utils.WalkPath(trpath.path, leaf, (rendered) => { diff --git a/Models/ThemeConfig/Json/LayerConfigJson.ts b/Models/ThemeConfig/Json/LayerConfigJson.ts index 2bbee874f..899715b5d 100644 --- a/Models/ThemeConfig/Json/LayerConfigJson.ts +++ b/Models/ThemeConfig/Json/LayerConfigJson.ts @@ -16,20 +16,28 @@ export interface LayerConfigJson { /** * The id of this 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 /** - * The name of this layer - * Used in the layer control panel and the 'Personal theme'. + * Used in the layer control panel to toggle a layer on and of. * - * 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 /** - * A description for this layer. - * Shown in the layer selections and in the personel theme + * A description for the features shown in this layer. + * 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 @@ -41,6 +49,7 @@ export interface LayerConfigJson { * 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 + * */ source: | "special" @@ -111,12 +120,16 @@ export interface LayerConfigJson { * "_some_key:=some_javascript_expression" * ] * + * group: advanced + * */ 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. * Works well together with 'passAllFeatures', to add decoration + * + * group: advanced */ doNotDownload?: boolean @@ -125,6 +138,8 @@ export interface LayerConfigJson { * This is useful to hide certain features from view. * * The default value is 'yes' + * + * group: advanced */ isShown?: TagConfigJson @@ -132,29 +147,44 @@ export interface LayerConfigJson { * Advanced option - might be set by the theme compiler * * If true, this data will _always_ be loaded, even if the theme is disabled + * + * group: advanced */ 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 + * + * 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 /** * 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) + * + * group: advanced */ shownByDefault?: true | boolean /** * The zoom level at which point the data is hidden again * Default: 100 (thus: always visible + * + * group: advanced */ minzoomVisible?: number /** * The title shown in a popup for elements of this layer. + * + * group: infobox */ title?: string | TagRenderingConfigJson @@ -165,11 +195,14 @@ export interface LayerConfigJson { * Note that "defaults" will insert all the default titleIcons (which are added automatically) * * Type: icon[] + * group: infobox */ titleIcons?: (string | TagRenderingConfigJson)[] | ["defaults"] /** * Visualisation of the items on the map + * + * group: maprendering */ mapRendering: | null @@ -186,7 +219,9 @@ export interface LayerConfigJson { /** * 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 @@ -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! * NB: if no presets are defined, the popup to add new points doesn't show up at all + * + * group: basic */ 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. * 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 + * + * group: tagrenderings */ tagRenderings?: ( | string @@ -305,6 +344,8 @@ export interface LayerConfigJson { /** * 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 + * + * group: filters */ 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. A no-delete option is offered as 'reason to delete it', but secretly retags. + group: editing + */ deletion?: boolean | DeleteConfigJson @@ -365,6 +408,8 @@ export interface LayerConfigJson { * - 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. + * + * group: editing */ 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 the way is part of a relation, MapComplete will attempt to update this relation as well + * + * group: editing */ allowSplit?: boolean /** * @see UnitConfigJson + * + * group: editing */ units?: UnitConfigJson[] @@ -387,6 +436,8 @@ export interface LayerConfigJson { * local: keep selection on local storage * 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 + * + * group: advanced */ syncSelection?: "no" | "local" | "theme-only" | "global" @@ -394,16 +445,22 @@ export interface LayerConfigJson { * 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 + * + * group: special */ "#"?: string | "no-question-hint-check" /** * If set, open the selectedElementView in a floatOver instead of on the right + * + * group: advanced */ popupInFloatover?: boolean /** * _Set automatically by MapComplete, please ignore_ + * + * group: hidden */ fullNodeDatabase?: boolean } diff --git a/Models/ThemeConfig/Json/TagRenderingConfigJson.ts b/Models/ThemeConfig/Json/TagRenderingConfigJson.ts index 583294f3d..a520dd379 100644 --- a/Models/ThemeConfig/Json/TagRenderingConfigJson.ts +++ b/Models/ThemeConfig/Json/TagRenderingConfigJson.ts @@ -25,7 +25,8 @@ export interface TagRenderingConfigJson { 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 diff --git a/Models/ThemeViewState.ts b/Models/ThemeViewState.ts index 7cd7ca1b5..89bf09026 100644 --- a/Models/ThemeViewState.ts +++ b/Models/ThemeViewState.ts @@ -1,27 +1,23 @@ import LayoutConfig from "./ThemeConfig/LayoutConfig" -import { SpecialVisualizationState } from "../UI/SpecialVisualization" -import { Changes } from "../Logic/Osm/Changes" -import { ImmutableStore, Store, UIEventSource } from "../Logic/UIEventSource" -import { - FeatureSource, - IndexedFeatureSource, - WritableFeatureSource, -} from "../Logic/FeatureSource/FeatureSource" -import { OsmConnection } from "../Logic/Osm/OsmConnection" -import { ExportableMap, MapProperties } from "./MapProperties" +import {SpecialVisualizationState} from "../UI/SpecialVisualization" +import {Changes} from "../Logic/Osm/Changes" +import {ImmutableStore, Store, UIEventSource} from "../Logic/UIEventSource" +import {FeatureSource, IndexedFeatureSource, WritableFeatureSource,} from "../Logic/FeatureSource/FeatureSource" +import {OsmConnection} from "../Logic/Osm/OsmConnection" +import {ExportableMap, MapProperties} from "./MapProperties" 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 { Map as MlMap } from "maplibre-gl" +import {Map as MlMap} from "maplibre-gl" import InitialMapPositioning from "../Logic/Actors/InitialMapPositioning" -import { MapLibreAdaptor } from "../UI/Map/MapLibreAdaptor" -import { GeoLocationState } from "../Logic/State/GeoLocationState" +import {MapLibreAdaptor} from "../UI/Map/MapLibreAdaptor" +import {GeoLocationState} from "../Logic/State/GeoLocationState" 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 LayerConfig from "./ThemeConfig/LayerConfig" 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 StaticFeatureSource from "../Logic/FeatureSource/Sources/StaticFeatureSource" import FeaturePropertiesStore from "../Logic/FeatureSource/Actors/FeaturePropertiesStore" @@ -32,27 +28,25 @@ import TitleHandler from "../Logic/Actors/TitleHandler" import ChangeToElementsActor from "../Logic/Actors/ChangeToElementsActor" import PendingChangesUploader from "../Logic/Actors/PendingChangesUploader" import SelectedElementTagsUpdater from "../Logic/Actors/SelectedElementTagsUpdater" -import { BBox } from "../Logic/BBox" +import {BBox} from "../Logic/BBox" import Constants from "./Constants" import Hotkeys from "../UI/Base/Hotkeys" import Translations from "../UI/i18n/Translations" -import { GeoIndexedStoreForLayer } from "../Logic/FeatureSource/Actors/GeoIndexedStore" -import { LastClickFeatureSource } from "../Logic/FeatureSource/Sources/LastClickFeatureSource" -import { MenuState } from "./MenuState" +import {GeoIndexedStoreForLayer} from "../Logic/FeatureSource/Actors/GeoIndexedStore" +import {LastClickFeatureSource} from "../Logic/FeatureSource/Sources/LastClickFeatureSource" +import {MenuState} from "./MenuState" import MetaTagging from "../Logic/MetaTagging" 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 ShowOverlayRasterLayer from "../UI/Map/ShowOverlayRasterLayer" -import { Utils } from "../Utils" -import { EliCategory } from "./RasterLayerProperties" +import {Utils} from "../Utils" +import {EliCategory} from "./RasterLayerProperties" import BackgroundLayerResetter from "../Logic/Actors/BackgroundLayerResetter" import SaveFeatureSourceToLocalStorage from "../Logic/FeatureSource/Actors/SaveFeatureSourceToLocalStorage" import BBoxFeatureSource from "../Logic/FeatureSource/Sources/TouchesBboxFeatureSource" import ThemeViewStateHashActor from "../Logic/Web/ThemeViewStateHashActor" -import NoElementsInViewDetector, { - FeatureViewState, -} from "../Logic/Actors/NoElementsInViewDetector" +import NoElementsInViewDetector, {FeatureViewState,} from "../Logic/Actors/NoElementsInViewDetector" /** * diff --git a/UI/InputElement/ValidatedInput.svelte b/UI/InputElement/ValidatedInput.svelte index 3656e819f..d86b0d082 100644 --- a/UI/InputElement/ValidatedInput.svelte +++ b/UI/InputElement/ValidatedInput.svelte @@ -1,116 +1,118 @@ {#if validator.textArea} +
dispatch("submit")}> + +
{:else} - - - {#if !$isValid} - - {/if} +
dispatch("submit")}> + + {#if !$isValid} + + {/if} - {#if unit !== undefined} - - {/if} - + {#if unit !== undefined} + + {/if} + {/if} diff --git a/UI/Popup/TagHint.svelte b/UI/Popup/TagHint.svelte index fb07bad8e..ee3c607f8 100644 --- a/UI/Popup/TagHint.svelte +++ b/UI/Popup/TagHint.svelte @@ -17,12 +17,12 @@ * If given, this function will be called to embed the given tags hint into this translation */ export let embedIn: ((string: string) => Translation) | undefined = undefined - const userDetails = state.osmConnection.userDetails + const userDetails = state?.osmConnection?.userDetails let tagsExplanation = "" $: tagsExplanation = tags?.asHumanString(true, false, currentProperties) -{#if $userDetails.loggedIn} +{#if !userDetails || $userDetails.loggedIn}
{#if tags === undefined} No tags diff --git a/UI/Popup/TagRendering/FreeformInput.svelte b/UI/Popup/TagRendering/FreeformInput.svelte index 6dae0bf39..bf33a93e5 100644 --- a/UI/Popup/TagRendering/FreeformInput.svelte +++ b/UI/Popup/TagRendering/FreeformInput.svelte @@ -26,7 +26,7 @@ export let feedback: UIEventSource = new UIEventSource(undefined) - let dispatch = createEventDispatcher<{ selected }>() + let dispatch = createEventDispatcher<{ selected, submit }>() onDestroy( value.addCallbackD(() => { dispatch("selected") @@ -46,6 +46,8 @@ {getCountry} {unit} on:selected={() => dispatch("selected")} + on:submit={() => dispatch("submit")} + type={config.freeform.type} {placeholder} {value} @@ -57,6 +59,7 @@ {getCountry} {unit} on:selected={() => dispatch("selected")} + on:submit={() => dispatch("submit")} type={config.freeform.type} {placeholder} {value} diff --git a/UI/Popup/TagRendering/SpecialTranslation.svelte b/UI/Popup/TagRendering/SpecialTranslation.svelte index 0e4997a37..5969f6f55 100644 --- a/UI/Popup/TagRendering/SpecialTranslation.svelte +++ b/UI/Popup/TagRendering/SpecialTranslation.svelte @@ -23,7 +23,7 @@ export let state: SpecialVisualizationState export let tags: UIEventSource> export let feature: Feature - export let layer: LayerConfig + export let layer: LayerConfig | undefined let txt: string $: onDestroy( diff --git a/UI/Popup/TagRendering/TagRenderingEditable.svelte b/UI/Popup/TagRendering/TagRenderingEditable.svelte index 7da21475d..555cc1452 100644 --- a/UI/Popup/TagRendering/TagRenderingEditable.svelte +++ b/UI/Popup/TagRendering/TagRenderingEditable.svelte @@ -1,6 +1,6 @@
- {#if config.question && $editingEnabled} + {#if config.question && (!editingEnabled || $editingEnabled)} {#if editMode}