[ { "path": [], "required": false, "hints": {}, "type": "object", "description": "Configuration for a single layer" }, { "path": [ "id" ], "required": true, "hints": { "group": "Basic", "question": "What is the identifier of this layer?" }, "type": "string", "description": "The id of this layer.\nThis should be a simple, lowercase, human readable string that is used to identify the layer." }, { "path": [ "name" ], "required": false, "hints": { "group": "Basic", "question": "What is the name of this layer?", "ifunset": "This will hide the layer in the layer control, making it not filterable and not toggleable" }, "type": [ { "$ref": "#/definitions/Record" }, { "type": "string" } ], "description": "Used in the layer control panel to toggle a layer on and of." }, { "path": [ "description" ], "required": false, "hints": { "group": "Basic", "question": "How would you describe the features that are shown on this layer?" }, "type": [ { "$ref": "#/definitions/Record" }, { "type": "string" } ], "description": "A description for the features shown in this layer.\nThis often resembles the introduction of the wiki.osm.org-page for this feature." }, { "path": [ "source" ], "required": true, "hints": { "types": "Load data with specific tags from OpenStreetMap ; Load data from an external geojson source ;", "typesdefault": "0", "group": "Basic", "question": "Where should the data be fetched from?", "title": "Data Source" }, "type": [ { "type": "object", "properties": { "osmTags": { "$ref": "#/definitions/TagConfigJson", "description": "question: Which tags must be present on the feature to show it in this layer?\nEvery source must set which tags have to be present in order to load the given layer." }, "maxCacheAge": { "description": "question: How long (in seconds) is the data allowed to remain cached until it must be refreshed?\nThe maximum amount of seconds that a tile is allowed to linger in the cache\n\ntype: nat\ndefault: 30 days", "type": "number" } }, "required": [ "osmTags" ] }, { "type": "object", "properties": { "geoJson": { "description": "The actual source of the data to load, if loaded via geojson.\n\n# A single geojson-file\nsource: {geoJson: \"https://my.source.net/some-geo-data.geojson\"}\n fetches a geojson from a third party source\n\n# A tiled geojson source\nsource: {geoJson: \"https://my.source.net/some-tile-geojson-{layer}-{z}-{x}-{y}.geojson\", geoJsonZoomLevel: 14}\n to use a tiled geojson source. The web server must offer multiple geojsons. {z}, {x} and {y} are substituted by the location; {layer} is substituted with the id of the loaded layer\n\nSome API's use a BBOX instead of a tile, this can be used by specifying {y_min}, {y_max}, {x_min} and {x_max}\n\nquestion: What is the URL of the geojson?\ntype: url", "type": "string" }, "geoJsonZoomLevel": { "description": "To load a tiled geojson layer, set the zoomlevel of the tiles\n\nquestion: If using a tiled geojson, what is the zoomlevel of the tiles?\nifunset: This is not a tiled geojson", "type": "number" }, "isOsmCache": { "description": "Indicates that the upstream geojson data is OSM-derived.\nUseful for e.g. merging or for scripts generating this cache.\nThis also indicates that making changes on this data is possible\n\nquestion: Is this geojson a cache of OpenStreetMap data?\nifunset: This is not an OpenStreetMap cache\niftrue: this is based on OpenStreetMap and can thus be edited", "type": "boolean" }, "mercatorCrs": { "description": "Some API's use a mercator-projection (EPSG:900913) instead of WGS84. Set the flag `mercatorCrs: true` in the source for this\n\nquestion: Does this geojson use EPSG:900913 instead of WGS84 as projection?\niftrue: This geojson uses EPSG:900913 instead of WGS84\nifunset: This geojson uses WGS84 just like most geojson (default)", "type": "boolean" }, "idKey": { "description": "Some API's have an id-field, but give it a different name.\nSetting this key will rename this field into 'id'\n\nifunset: An id with key `id` will be assigned automatically if no attribute `id` is set\ninline: This geojson uses {value} as attribute to set the id\nquestion: What is the name of the attribute containing the ID of the object?", "type": "string" } }, "required": [ "geoJson" ] }, { "enum": [ "special", "special:library" ], "type": "string" } ], "description": "This determines where the data for the layer is fetched: from OSM or from an external geojson dataset.\nIf no 'geojson' is defined, data will be fetched from overpass and the OSM-API.\nEvery source _must_ define which tags _must_ be present in order to be picked up.\nNote: a source must always be defined. 'special' is only allowed if this is a builtin-layer" }, { "path": [ "source", "osmTags" ], "required": true, "hints": { "typehint": "tag", "question": "Which tags must be present on the feature to show it in this layer?" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "Every source must set which tags have to be present in order to load the given layer." }, { "path": [ "source", "maxCacheAge" ], "required": false, "hints": { "typehint": "nat", "default": "30 days", "question": "How long (in seconds) is the data allowed to remain cached until it must be refreshed?" }, "type": "number", "description": "The maximum amount of seconds that a tile is allowed to linger in the cache" }, { "path": [ "source", "geoJson" ], "required": true, "hints": { "typehint": "url", "question": "What is the URL of the geojson?" }, "type": "string", "description": "The actual source of the data to load, if loaded via geojson.\n# A single geojson-file\nsource: {geoJson: \"https://my.source.net/some-geo-data.geojson\"}\n fetches a geojson from a third party source\n# A tiled geojson source\nsource: {geoJson: \"https://my.source.net/some-tile-geojson-{layer}-{z}-{x}-{y}.geojson\", geoJsonZoomLevel: 14}\n to use a tiled geojson source. The web server must offer multiple geojsons. {z}, {x} and {y} are substituted by the location; {layer} is substituted with the id of the loaded layer\nSome API's use a BBOX instead of a tile, this can be used by specifying {y_min}, {y_max}, {x_min} and {x_max}" }, { "path": [ "source", "geoJsonZoomLevel" ], "required": false, "hints": { "question": "If using a tiled geojson, what is the zoomlevel of the tiles?", "ifunset": "This is not a tiled geojson" }, "type": "number", "description": "To load a tiled geojson layer, set the zoomlevel of the tiles" }, { "path": [ "source", "isOsmCache" ], "required": false, "hints": { "question": "Is this geojson a cache of OpenStreetMap data?", "iftrue": "this is based on OpenStreetMap and can thus be edited", "ifunset": "This is not an OpenStreetMap cache" }, "type": "boolean", "description": "Indicates that the upstream geojson data is OSM-derived.\nUseful for e.g. merging or for scripts generating this cache.\nThis also indicates that making changes on this data is possible" }, { "path": [ "source", "mercatorCrs" ], "required": false, "hints": { "question": "Does this geojson use EPSG:900913 instead of WGS84 as projection?", "iftrue": "This geojson uses EPSG:900913 instead of WGS84", "ifunset": "This geojson uses WGS84 just like most geojson (default)" }, "type": "boolean", "description": "Some API's use a mercator-projection (EPSG:900913) instead of WGS84. Set the flag `mercatorCrs: true` in the source for this" }, { "path": [ "source", "idKey" ], "required": false, "hints": { "question": "What is the name of the attribute containing the ID of the object?", "ifunset": "An id with key `id` will be assigned automatically if no attribute `id` is set", "inline": "This geojson uses {value} as attribute to set the id" }, "type": "string", "description": "Some API's have an id-field, but give it a different name.\nSetting this key will rename this field into 'id'" }, { "path": [ "calculatedTags" ], "required": false, "hints": { "group": "expert", "question": "What extra attributes should be calculated with javascript?" }, "type": "array", "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]\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.\nIf a tag has to be evaluated strictly, use ':=' instead:\n[\n\"_some_key:=some_javascript_expression\"\n]\nSee the full documentation on [https://github.com/pietervdvn/MapComplete/blob/master/Docs/CalculatedTags.md]" }, { "path": [ "isShown" ], "required": false, "hints": { "group": "advanced", "question": "What other tags should features match for being shown?", "ifunset": "all features which match the 'source'-specification are shown." }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "$ref": "#/definitions/{or:TagConfigJson[];}" }, { "type": "string" } ], "description": "If set, only features matching this extra tag will be shown.\nThis is useful to hide certain features from view based on a calculated tag or if the features are provided by a different layer." }, { "path": [ "isShown", "and" ], "required": false, "hints": { "typehint": "tag" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" }, { "path": [ "isShown", "or" ], "required": false, "hints": { "typehint": "tag" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" }, { "path": [ "minzoom" ], "required": false, "hints": { "typehint": "nat", "group": "Basic", "default": "0", "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." }, "type": "number", "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." }, { "path": [ "shownByDefault" ], "required": false, "hints": { "group": "advanced", "default": "true", "question": "Should this layer be enabled when opening the map for the first time?", "iftrue": "the layer is enabled when opening the map", "iffalse": "the layer is hidden until the contributor enables it. (If the filter-popup is disabled, this might never get enabled nor loaded)" }, "type": "boolean", "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 when appropriate (e.g. for advanced users)" }, { "path": [ "minzoomVisible" ], "required": false, "hints": { "group": "expert", "default": "100 (thus: always visible" }, "type": "number", "description": "The zoom level at which point the data is hidden again" }, { "path": [ "title" ], "required": false, "hints": { "typehint": "translation", "types": "use a fixed translation ; Use a dynamic tagRendering ; hidden", "typesdefault": "1", "group": "title", "question": "What title should be shown on the infobox?" }, "type": [ { "$ref": "#/definitions/Record" }, { "description": "A TagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nFor an _editable_ tagRendering, use 'QuestionableTagRenderingConfigJson' instead, which extends this one", "type": "object", "properties": { "render": { "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nNote that \"&LBRACEkey&RBRACE\"-parts are substituted by the corresponding values of the element.\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered", "anyOf": [ { "$ref": "#/definitions/Record" }, { "type": "object", "properties": { "special": { "allOf": [ { "$ref": "#/definitions/Record>" }, { "type": "object", "properties": { "type": { "type": "string" } }, "required": [ "type" ] } ] } }, "required": [ "special" ] }, { "type": "string" } ] }, "icon": { "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon", "anyOf": [ { "type": "object", "properties": { "path": { "description": "The path to the icon\nType: icon", "type": "string" }, "class": { "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)", "type": "string" } }, "required": [ "path" ] }, { "type": "string" } ] }, "condition": { "description": "question: When should this item be shown?\n\nOnly show this tagrendering (or ask the question) if the selected object also matches the tags specified as `condition`.\n\nThis is useful to ask a follow-up question.\nFor example, within toilets, asking _where_ the diaper changing table is is only useful _if_ there is one.\nThis can be done by adding `\"condition\": \"changing_table=yes\"`\n\nA full example would be:\n```json\n {\n \"question\": \"Where is the changing table located?\",\n \"render\": \"The changing table is located at {changing_table:location}\",\n \"condition\": \"changing_table=yes\",\n \"freeform\": {\n \"key\": \"changing_table:location\",\n \"inline\": true\n },\n \"mappings\": [\n {\n \"then\": \"The changing table is in the toilet for women.\",\n \"if\": \"changing_table:location=female_toilet\"\n },\n {\n \"then\": \"The changing table is in the toilet for men.\",\n \"if\": \"changing_table:location=male_toilet\"\n },\n {\n \"if\": \"changing_table:location=wheelchair_toilet\",\n \"then\": \"The changing table is in the toilet for wheelchair users.\",\n },\n {\n \"if\": \"changing_table:location=dedicated_room\",\n \"then\": \"The changing table is in a dedicated room. \",\n }\n ],\n \"id\": \"toilet-changing_table:location\"\n },\n```", "anyOf": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "$ref": "#/definitions/{or:TagConfigJson[];}" }, { "type": "string" } ] }, "metacondition": { "description": "question: When should this item be shown (including special conditions)?\n\nIf set, this tag will be evaluated agains the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options.\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_", "anyOf": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "$ref": "#/definitions/{or:TagConfigJson[];}" }, { "type": "string" } ] }, "freeform": { "description": "question: Should a freeform text field be shown?\nAllow freeform text input from the user\nifunset: Do not add a freeform text field", "type": "object", "properties": { "key": { "description": "What attribute should be filled out\nIf this key is present in the feature, then 'render' is used to display the value.\nIf this is undefined, the rendering is _always_ shown", "type": "string" } }, "required": [ "key" ] }, "mappings": { "description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes", "type": "array", "items": { "type": "object", "properties": { "if": { "$ref": "#/definitions/TagConfigJson", "description": "question: When should this single mapping match?\n\nIf this condition is met, then the text under `then` will be shown.\nIf no value matches, and the user selects this mapping as an option, then these tags will be uploaded to OSM.\n\nFor example: {'if': 'diet:vegetarion=yes', 'then':'A vegetarian option is offered here'}\n\nThis can be an substituting-tag as well, e.g. {'if': 'addr:street:={_calculated_nearby_streetname}', 'then': '{_calculated_nearby_streetname}'}" }, "then": { "description": "question: What text should be shown?\n\nIf the condition `if` is met, the text `then` will be rendered.\nIf not known yet, the user will be presented with `then` as an option\nType: rendered", "anyOf": [ { "$ref": "#/definitions/Record" }, { "type": "string" } ] }, "icon": { "description": "question: What icon should be added to this mapping?\nAn icon supporting this mapping; typically shown pretty small\ninline: {icon}\nType: icon", "anyOf": [ { "type": "object", "properties": { "path": { "description": "The path to the icon\nType: icon", "type": "string" }, "class": { "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)", "type": "string" } }, "required": [ "path" ] }, { "type": "string" } ] } }, "required": [ "if", "then" ] } }, "description": { "description": "A human-readable text explaining what this tagRendering does.\nMostly used for the shared tagrenderings", "anyOf": [ { "$ref": "#/definitions/Record" }, { "type": "string" } ] }, "classes": { "description": "question: What css-classes should be applied to showing this attribute?\n\nA list of css-classes to apply to the entire tagRendering.\nThese classes are applied in 'answer'-mode, not in question mode\nThis is only for advanced users.\n\nValues are split on ` ` (space)", "type": "string" } }, "additionalProperties": false }, { "type": "string" } ], "description": "The title shown in a popup for elements of this layer." }, { "path": [ "title", "render" ], "required": false, "hints": { "typehint": "rendered", "question": "What text should be rendered?" }, "type": [ { "$ref": "#/definitions/Record" }, { "type": "object", "properties": { "special": { "allOf": [ { "$ref": "#/definitions/Record>" }, { "type": "object", "properties": { "type": { "type": "string" } }, "required": [ "type" ] } ] } }, "required": [ "special" ] }, { "type": "string" } ], "description": "This piece of text will be shown in the infobox.\nNote that \"&LBRACEkey&RBRACE\"-parts are substituted by the corresponding values of the element.\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`" }, { "path": [ "title", "icon" ], "required": false, "hints": { "typehint": "icon", "question": "what icon should be shown next to the 'render' value?" }, "type": [ { "type": "object", "properties": { "path": { "description": "The path to the icon\nType: icon", "type": "string" }, "class": { "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)", "type": "string" } }, "required": [ "path" ] }, { "type": "string" } ], "description": "An icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value" }, { "path": [ "title", "icon", "path" ], "required": true, "hints": { "typehint": "icon" }, "type": "string", "description": "The path to the icon" }, { "path": [ "title", "icon", "class" ], "required": false, "hints": {}, "type": "string", "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)" }, { "path": [ "title", "condition" ], "required": false, "hints": { "question": "When should this item be shown?" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "$ref": "#/definitions/{or:TagConfigJson[];}" }, { "type": "string" } ], "description": "Only show this tagrendering (or ask the question) if the selected object also matches the tags specified as `condition`.\nThis is useful to ask a follow-up question.\nFor example, within toilets, asking _where_ the diaper changing table is is only useful _if_ there is one.\nThis can be done by adding `\"condition\": \"changing_table=yes\"`\nA full example would be:\n```json\n {\n \"question\": \"Where is the changing table located?\",\n \"render\": \"The changing table is located at {changing_table:location}\",\n \"condition\": \"changing_table=yes\",\n \"freeform\": {\n \"key\": \"changing_table:location\",\n \"inline\": true\n },\n \"mappings\": [\n {\n \"then\": \"The changing table is in the toilet for women.\",\n \"if\": \"changing_table:location=female_toilet\"\n },\n {\n \"then\": \"The changing table is in the toilet for men.\",\n \"if\": \"changing_table:location=male_toilet\"\n },\n {\n \"if\": \"changing_table:location=wheelchair_toilet\",\n \"then\": \"The changing table is in the toilet for wheelchair users.\",\n },\n {\n \"if\": \"changing_table:location=dedicated_room\",\n \"then\": \"The changing table is in a dedicated room. \",\n }\n ],\n \"id\": \"toilet-changing_table:location\"\n },\n```" }, { "path": [ "title", "condition", "and" ], "required": false, "hints": { "typehint": "tag" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" }, { "path": [ "title", "condition", "or" ], "required": false, "hints": { "typehint": "tag" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" }, { "path": [ "title", "metacondition" ], "required": false, "hints": { "question": "When should this item be shown (including special conditions)?" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "$ref": "#/definitions/{or:TagConfigJson[];}" }, { "type": "string" } ], "description": "If set, this tag will be evaluated agains the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options.\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_" }, { "path": [ "title", "metacondition", "and" ], "required": false, "hints": { "typehint": "tag" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" }, { "path": [ "title", "metacondition", "or" ], "required": false, "hints": { "typehint": "tag" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" }, { "path": [ "title", "freeform" ], "required": false, "hints": { "question": "Should a freeform text field be shown?", "ifunset": "Do not add a freeform text field" }, "type": "object", "description": "Allow freeform text input from the user" }, { "path": [ "title", "freeform", "key" ], "required": true, "hints": {}, "type": "string", "description": "What attribute should be filled out\nIf this key is present in the feature, then 'render' is used to display the value.\nIf this is undefined, the rendering is _always_ shown" }, { "path": [ "title", "mappings" ], "required": false, "hints": {}, "type": "array", "description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes" }, { "path": [ "title", "mappings", "if" ], "required": true, "hints": { "typehint": "tag", "question": "When should this single mapping match?" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "If this condition is met, then the text under `then` will be shown.\nIf no value matches, and the user selects this mapping as an option, then these tags will be uploaded to OSM.\nFor example: {'if': 'diet:vegetarion=yes', 'then':'A vegetarian option is offered here'}\nThis can be an substituting-tag as well, e.g. {'if': 'addr:street:={_calculated_nearby_streetname}', 'then': '{_calculated_nearby_streetname}'}" }, { "path": [ "title", "mappings", "then" ], "required": true, "hints": { "typehint": "rendered", "question": "What text should be shown?" }, "type": [ { "$ref": "#/definitions/Record" }, { "type": "string" } ], "description": "If the condition `if` is met, the text `then` will be rendered.\nIf not known yet, the user will be presented with `then` as an option" }, { "path": [ "title", "mappings", "icon" ], "required": false, "hints": { "typehint": "icon", "question": "What icon should be added to this mapping?", "inline": " {icon}" }, "type": [ { "type": "object", "properties": { "path": { "description": "The path to the icon\nType: icon", "type": "string" }, "class": { "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)", "type": "string" } }, "required": [ "path" ] }, { "type": "string" } ], "description": "An icon supporting this mapping; typically shown pretty small" }, { "path": [ "title", "mappings", "icon", "path" ], "required": true, "hints": { "typehint": "icon" }, "type": "string", "description": "The path to the icon" }, { "path": [ "title", "mappings", "icon", "class" ], "required": false, "hints": {}, "type": "string", "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)" }, { "path": [ "title", "description" ], "required": false, "hints": {}, "type": [ { "$ref": "#/definitions/Record" }, { "type": "string" } ], "description": "A human-readable text explaining what this tagRendering does.\nMostly used for the shared tagrenderings" }, { "path": [ "title", "classes" ], "required": false, "hints": { "question": "What css-classes should be applied to showing this attribute?" }, "type": "string", "description": "A list of css-classes to apply to the entire tagRendering.\nThese classes are applied in 'answer'-mode, not in question mode\nThis is only for advanced users.\nValues are split on ` ` (space)" }, { "path": [ "popupInFloatover" ], "required": false, "hints": { "group": "advanced", "default": "sidebar", "question": "Should the information for this layer be shown in the sidebar or in a splash screen?", "iftrue": "show the infobox in the splashscreen floating over the entire UI", "iffalse": "show the infobox in a sidebar on the right" }, "type": "boolean", "description": "If set, open the selectedElementView in a floatOver instead of on the right." }, { "path": [ "titleIcons" ], "required": false, "hints": { "typehint": "icon[]", "group": "infobox" }, "type": [ { "type": "array", "items": { "anyOf": [ { "$ref": "#/definitions/TagRenderingConfigJson" }, { "type": "string" } ] } }, { "type": "array", "items": [ { "type": "string", "enum": [ "defaults" ] } ], "minItems": 1, "maxItems": 1 } ], "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)" }, { "path": [ "titleIcons", "render" ], "required": false, "hints": { "typehint": "rendered", "question": "What text should be rendered?" }, "type": [ { "$ref": "#/definitions/Record" }, { "type": "object", "properties": { "special": { "allOf": [ { "$ref": "#/definitions/Record>" }, { "type": "object", "properties": { "type": { "type": "string" } }, "required": [ "type" ] } ] } }, "required": [ "special" ] }, { "type": "string" } ], "description": "This piece of text will be shown in the infobox.\nNote that \"&LBRACEkey&RBRACE\"-parts are substituted by the corresponding values of the element.\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`" }, { "path": [ "titleIcons", "icon" ], "required": false, "hints": { "typehint": "icon", "question": "what icon should be shown next to the 'render' value?" }, "type": [ { "type": "object", "properties": { "path": { "description": "The path to the icon\nType: icon", "type": "string" }, "class": { "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)", "type": "string" } }, "required": [ "path" ] }, { "type": "string" } ], "description": "An icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value" }, { "path": [ "titleIcons", "icon", "path" ], "required": true, "hints": { "typehint": "icon" }, "type": "string", "description": "The path to the icon" }, { "path": [ "titleIcons", "icon", "class" ], "required": false, "hints": {}, "type": "string", "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)" }, { "path": [ "titleIcons", "condition" ], "required": false, "hints": { "question": "When should this item be shown?" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "$ref": "#/definitions/{or:TagConfigJson[];}" }, { "type": "string" } ], "description": "Only show this tagrendering (or ask the question) if the selected object also matches the tags specified as `condition`.\nThis is useful to ask a follow-up question.\nFor example, within toilets, asking _where_ the diaper changing table is is only useful _if_ there is one.\nThis can be done by adding `\"condition\": \"changing_table=yes\"`\nA full example would be:\n```json\n {\n \"question\": \"Where is the changing table located?\",\n \"render\": \"The changing table is located at {changing_table:location}\",\n \"condition\": \"changing_table=yes\",\n \"freeform\": {\n \"key\": \"changing_table:location\",\n \"inline\": true\n },\n \"mappings\": [\n {\n \"then\": \"The changing table is in the toilet for women.\",\n \"if\": \"changing_table:location=female_toilet\"\n },\n {\n \"then\": \"The changing table is in the toilet for men.\",\n \"if\": \"changing_table:location=male_toilet\"\n },\n {\n \"if\": \"changing_table:location=wheelchair_toilet\",\n \"then\": \"The changing table is in the toilet for wheelchair users.\",\n },\n {\n \"if\": \"changing_table:location=dedicated_room\",\n \"then\": \"The changing table is in a dedicated room. \",\n }\n ],\n \"id\": \"toilet-changing_table:location\"\n },\n```" }, { "path": [ "titleIcons", "condition", "and" ], "required": false, "hints": { "typehint": "tag" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" }, { "path": [ "titleIcons", "condition", "or" ], "required": false, "hints": { "typehint": "tag" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" }, { "path": [ "titleIcons", "metacondition" ], "required": false, "hints": { "question": "When should this item be shown (including special conditions)?" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "$ref": "#/definitions/{or:TagConfigJson[];}" }, { "type": "string" } ], "description": "If set, this tag will be evaluated agains the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options.\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_" }, { "path": [ "titleIcons", "metacondition", "and" ], "required": false, "hints": { "typehint": "tag" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" }, { "path": [ "titleIcons", "metacondition", "or" ], "required": false, "hints": { "typehint": "tag" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" }, { "path": [ "titleIcons", "freeform" ], "required": false, "hints": { "question": "Should a freeform text field be shown?", "ifunset": "Do not add a freeform text field" }, "type": "object", "description": "Allow freeform text input from the user" }, { "path": [ "titleIcons", "freeform", "key" ], "required": true, "hints": {}, "type": "string", "description": "What attribute should be filled out\nIf this key is present in the feature, then 'render' is used to display the value.\nIf this is undefined, the rendering is _always_ shown" }, { "path": [ "titleIcons", "mappings" ], "required": false, "hints": {}, "type": "array", "description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes" }, { "path": [ "titleIcons", "mappings", "if" ], "required": true, "hints": { "typehint": "tag", "question": "When should this single mapping match?" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "If this condition is met, then the text under `then` will be shown.\nIf no value matches, and the user selects this mapping as an option, then these tags will be uploaded to OSM.\nFor example: {'if': 'diet:vegetarion=yes', 'then':'A vegetarian option is offered here'}\nThis can be an substituting-tag as well, e.g. {'if': 'addr:street:={_calculated_nearby_streetname}', 'then': '{_calculated_nearby_streetname}'}" }, { "path": [ "titleIcons", "mappings", "then" ], "required": true, "hints": { "typehint": "rendered", "question": "What text should be shown?" }, "type": [ { "$ref": "#/definitions/Record" }, { "type": "string" } ], "description": "If the condition `if` is met, the text `then` will be rendered.\nIf not known yet, the user will be presented with `then` as an option" }, { "path": [ "titleIcons", "mappings", "icon" ], "required": false, "hints": { "typehint": "icon", "question": "What icon should be added to this mapping?", "inline": " {icon}" }, "type": [ { "type": "object", "properties": { "path": { "description": "The path to the icon\nType: icon", "type": "string" }, "class": { "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)", "type": "string" } }, "required": [ "path" ] }, { "type": "string" } ], "description": "An icon supporting this mapping; typically shown pretty small" }, { "path": [ "titleIcons", "mappings", "icon", "path" ], "required": true, "hints": { "typehint": "icon" }, "type": "string", "description": "The path to the icon" }, { "path": [ "titleIcons", "mappings", "icon", "class" ], "required": false, "hints": {}, "type": "string", "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)" }, { "path": [ "titleIcons", "description" ], "required": false, "hints": {}, "type": [ { "$ref": "#/definitions/Record" }, { "type": "string" } ], "description": "A human-readable text explaining what this tagRendering does.\nMostly used for the shared tagrenderings" }, { "path": [ "titleIcons", "classes" ], "required": false, "hints": { "question": "What css-classes should be applied to showing this attribute?" }, "type": "string", "description": "A list of css-classes to apply to the entire tagRendering.\nThese classes are applied in 'answer'-mode, not in question mode\nThis is only for advanced users.\nValues are split on ` ` (space)" }, { "path": [ "pointRendering" ], "required": true, "hints": { "group": "pointrendering" }, "type": "array", "description": "Creates points to render on the map.\nThis can render points for point-objects, lineobjects or areaobjects; use 'location' to indicate where it should be rendered" }, { "path": [ "pointRendering" ], "required": false, "hints": {}, "type": "object", "description": "The PointRenderingConfig gives all details onto how to render a single point of a feature.\nThis can be used if:\n- The feature is a point\n- To render something at the centroid of an area, or at the start, end or projected centroid of a way" }, { "path": [ "pointRendering", "location" ], "required": true, "hints": { "question": "At what location should this icon be shown?", "suggestions": [ { "if": "value=point", "then": "Show an icon for point (node) objects" }, { "if": "value=centroid", "then": "Show an icon for line or polygon (way) objects at their centroid location" }, { "if": "value=start", "then": "Show an icon for line (way) objects at the start" }, { "if": "value=end", "then": "Show an icon for line (way) object at the end" }, { "if": "value=projected_centerpoint", "then": "Show an icon for line (way) object near the centroid location, but moved onto the line" } ], "multianswer": "true" }, "type": "array", "description": "" }, { "path": [ "pointRendering", "marker" ], "required": false, "hints": {}, "type": "array", "description": "The marker for an element.\nNote that this also defines the icon for this layer (rendered with the overpass-tags) and the icon in the presets.\nThe result of the icon is rendered as follows:\n- The first icon is rendered on the map\n- The second entry is overlayed on top of it\n- ...\nAs a result, on could use a generic icon (`pin`, `circle`, `square`) with a color, then overlay it with a specific icon." }, { "path": [ "pointRendering", "marker", "icon" ], "required": true, "hints": { "typehint": "icon", "question": "What icon should be used?", "suggestions": [ { "if": "value=pin", "then": "pin", "icon": "pin" }, { "if": "value=square", "then": "square", "icon": "square" }, { "if": "value=circle", "then": "circle", "icon": "circle" }, { "if": "value=checkmark", "then": "checkmark", "icon": "checkmark" }, { "if": "value=clock", "then": "clock", "icon": "clock" }, { "if": "value=close", "then": "close", "icon": "close" }, { "if": "value=crosshair", "then": "crosshair", "icon": "crosshair" }, { "if": "value=help", "then": "help", "icon": "help" }, { "if": "value=home", "then": "home", "icon": "home" }, { "if": "value=invalid", "then": "invalid", "icon": "invalid" }, { "if": "value=location", "then": "location", "icon": "location" }, { "if": "value=location_empty", "then": "location_empty", "icon": "location_empty" }, { "if": "value=location_locked", "then": "location_locked", "icon": "location_locked" }, { "if": "value=note", "then": "note", "icon": "note" }, { "if": "value=resolved", "then": "resolved", "icon": "resolved" }, { "if": "value=ring", "then": "ring", "icon": "ring" }, { "if": "value=scissors", "then": "scissors", "icon": "scissors" }, { "if": "value=teardrop", "then": "teardrop", "icon": "teardrop" }, { "if": "value=teardrop_with_hole_green", "then": "teardrop_with_hole_green", "icon": "teardrop_with_hole_green" }, { "if": "value=triangle", "then": "triangle", "icon": "triangle" } ] }, "type": [ { "description": "A TagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nFor an _editable_ tagRendering, use 'QuestionableTagRenderingConfigJson' instead, which extends this one", "type": "object", "properties": { "render": { "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nNote that \"&LBRACEkey&RBRACE\"-parts are substituted by the corresponding values of the element.\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered", "anyOf": [ { "$ref": "#/definitions/Record" }, { "type": "object", "properties": { "special": { "allOf": [ { "$ref": "#/definitions/Record>" }, { "type": "object", "properties": { "type": { "type": "string" } }, "required": [ "type" ] } ] } }, "required": [ "special" ] }, { "type": "string" } ] }, "icon": { "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon", "anyOf": [ { "type": "object", "properties": { "path": { "description": "The path to the icon\nType: icon", "type": "string" }, "class": { "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)", "type": "string" } }, "required": [ "path" ] }, { "type": "string" } ] }, "condition": { "description": "question: When should this item be shown?\n\nOnly show this tagrendering (or ask the question) if the selected object also matches the tags specified as `condition`.\n\nThis is useful to ask a follow-up question.\nFor example, within toilets, asking _where_ the diaper changing table is is only useful _if_ there is one.\nThis can be done by adding `\"condition\": \"changing_table=yes\"`\n\nA full example would be:\n```json\n {\n \"question\": \"Where is the changing table located?\",\n \"render\": \"The changing table is located at {changing_table:location}\",\n \"condition\": \"changing_table=yes\",\n \"freeform\": {\n \"key\": \"changing_table:location\",\n \"inline\": true\n },\n \"mappings\": [\n {\n \"then\": \"The changing table is in the toilet for women.\",\n \"if\": \"changing_table:location=female_toilet\"\n },\n {\n \"then\": \"The changing table is in the toilet for men.\",\n \"if\": \"changing_table:location=male_toilet\"\n },\n {\n \"if\": \"changing_table:location=wheelchair_toilet\",\n \"then\": \"The changing table is in the toilet for wheelchair users.\",\n },\n {\n \"if\": \"changing_table:location=dedicated_room\",\n \"then\": \"The changing table is in a dedicated room. \",\n }\n ],\n \"id\": \"toilet-changing_table:location\"\n },\n```", "anyOf": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "$ref": "#/definitions/{or:TagConfigJson[];}" }, { "type": "string" } ] }, "metacondition": { "description": "question: When should this item be shown (including special conditions)?\n\nIf set, this tag will be evaluated agains the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options.\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_", "anyOf": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "$ref": "#/definitions/{or:TagConfigJson[];}" }, { "type": "string" } ] }, "freeform": { "description": "question: Should a freeform text field be shown?\nAllow freeform text input from the user\nifunset: Do not add a freeform text field", "type": "object", "properties": { "key": { "description": "What attribute should be filled out\nIf this key is present in the feature, then 'render' is used to display the value.\nIf this is undefined, the rendering is _always_ shown", "type": "string" } }, "required": [ "key" ] }, "mappings": { "description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes", "type": "array", "items": { "type": "object", "properties": { "if": { "$ref": "#/definitions/TagConfigJson", "description": "question: When should this single mapping match?\n\nIf this condition is met, then the text under `then` will be shown.\nIf no value matches, and the user selects this mapping as an option, then these tags will be uploaded to OSM.\n\nFor example: {'if': 'diet:vegetarion=yes', 'then':'A vegetarian option is offered here'}\n\nThis can be an substituting-tag as well, e.g. {'if': 'addr:street:={_calculated_nearby_streetname}', 'then': '{_calculated_nearby_streetname}'}" }, "then": { "description": "question: What text should be shown?\n\nIf the condition `if` is met, the text `then` will be rendered.\nIf not known yet, the user will be presented with `then` as an option\nType: rendered", "anyOf": [ { "$ref": "#/definitions/Record" }, { "type": "string" } ] }, "icon": { "description": "question: What icon should be added to this mapping?\nAn icon supporting this mapping; typically shown pretty small\ninline: {icon}\nType: icon", "anyOf": [ { "type": "object", "properties": { "path": { "description": "The path to the icon\nType: icon", "type": "string" }, "class": { "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)", "type": "string" } }, "required": [ "path" ] }, { "type": "string" } ] } }, "required": [ "if", "then" ] } }, "description": { "description": "A human-readable text explaining what this tagRendering does.\nMostly used for the shared tagrenderings", "anyOf": [ { "$ref": "#/definitions/Record" }, { "type": "string" } ] }, "classes": { "description": "question: What css-classes should be applied to showing this attribute?\n\nA list of css-classes to apply to the entire tagRendering.\nThese classes are applied in 'answer'-mode, not in question mode\nThis is only for advanced users.\n\nValues are split on ` ` (space)", "type": "string" } }, "additionalProperties": false }, { "type": "object", "properties": { "builtin": { "type": "string" }, "override": {} }, "required": [ "builtin", "override" ] }, { "type": "string" } ], "description": "" }, { "path": [ "pointRendering", "marker", "icon", "render" ], "required": false, "hints": { "typehint": "rendered", "question": "What text should be rendered?" }, "type": [ { "$ref": "#/definitions/Record" }, { "type": "object", "properties": { "special": { "allOf": [ { "$ref": "#/definitions/Record>" }, { "type": "object", "properties": { "type": { "type": "string" } }, "required": [ "type" ] } ] } }, "required": [ "special" ] }, { "type": "string" } ], "description": "This piece of text will be shown in the infobox.\nNote that \"&LBRACEkey&RBRACE\"-parts are substituted by the corresponding values of the element.\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`" }, { "path": [ "pointRendering", "marker", "icon", "icon" ], "required": false, "hints": { "typehint": "icon", "question": "what icon should be shown next to the 'render' value?" }, "type": [ { "type": "object", "properties": { "path": { "description": "The path to the icon\nType: icon", "type": "string" }, "class": { "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)", "type": "string" } }, "required": [ "path" ] }, { "type": "string" } ], "description": "An icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value" }, { "path": [ "pointRendering", "marker", "icon", "icon", "path" ], "required": true, "hints": { "typehint": "icon" }, "type": "string", "description": "The path to the icon" }, { "path": [ "pointRendering", "marker", "icon", "icon", "class" ], "required": false, "hints": {}, "type": "string", "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)" }, { "path": [ "pointRendering", "marker", "icon", "condition" ], "required": false, "hints": { "question": "When should this item be shown?" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "$ref": "#/definitions/{or:TagConfigJson[];}" }, { "type": "string" } ], "description": "Only show this tagrendering (or ask the question) if the selected object also matches the tags specified as `condition`.\nThis is useful to ask a follow-up question.\nFor example, within toilets, asking _where_ the diaper changing table is is only useful _if_ there is one.\nThis can be done by adding `\"condition\": \"changing_table=yes\"`\nA full example would be:\n```json\n {\n \"question\": \"Where is the changing table located?\",\n \"render\": \"The changing table is located at {changing_table:location}\",\n \"condition\": \"changing_table=yes\",\n \"freeform\": {\n \"key\": \"changing_table:location\",\n \"inline\": true\n },\n \"mappings\": [\n {\n \"then\": \"The changing table is in the toilet for women.\",\n \"if\": \"changing_table:location=female_toilet\"\n },\n {\n \"then\": \"The changing table is in the toilet for men.\",\n \"if\": \"changing_table:location=male_toilet\"\n },\n {\n \"if\": \"changing_table:location=wheelchair_toilet\",\n \"then\": \"The changing table is in the toilet for wheelchair users.\",\n },\n {\n \"if\": \"changing_table:location=dedicated_room\",\n \"then\": \"The changing table is in a dedicated room. \",\n }\n ],\n \"id\": \"toilet-changing_table:location\"\n },\n```" }, { "path": [ "pointRendering", "marker", "icon", "condition", "and" ], "required": false, "hints": { "typehint": "tag" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" }, { "path": [ "pointRendering", "marker", "icon", "condition", "or" ], "required": false, "hints": { "typehint": "tag" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" }, { "path": [ "pointRendering", "marker", "icon", "metacondition" ], "required": false, "hints": { "question": "When should this item be shown (including special conditions)?" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "$ref": "#/definitions/{or:TagConfigJson[];}" }, { "type": "string" } ], "description": "If set, this tag will be evaluated agains the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options.\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_" }, { "path": [ "pointRendering", "marker", "icon", "metacondition", "and" ], "required": false, "hints": { "typehint": "tag" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" }, { "path": [ "pointRendering", "marker", "icon", "metacondition", "or" ], "required": false, "hints": { "typehint": "tag" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" }, { "path": [ "pointRendering", "marker", "icon", "freeform" ], "required": false, "hints": { "question": "Should a freeform text field be shown?", "ifunset": "Do not add a freeform text field" }, "type": "object", "description": "Allow freeform text input from the user" }, { "path": [ "pointRendering", "marker", "icon", "freeform", "key" ], "required": true, "hints": {}, "type": "string", "description": "What attribute should be filled out\nIf this key is present in the feature, then 'render' is used to display the value.\nIf this is undefined, the rendering is _always_ shown" }, { "path": [ "pointRendering", "marker", "icon", "mappings" ], "required": false, "hints": {}, "type": "array", "description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes" }, { "path": [ "pointRendering", "marker", "icon", "mappings", "if" ], "required": true, "hints": { "typehint": "tag", "question": "When should this single mapping match?" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "If this condition is met, then the text under `then` will be shown.\nIf no value matches, and the user selects this mapping as an option, then these tags will be uploaded to OSM.\nFor example: {'if': 'diet:vegetarion=yes', 'then':'A vegetarian option is offered here'}\nThis can be an substituting-tag as well, e.g. {'if': 'addr:street:={_calculated_nearby_streetname}', 'then': '{_calculated_nearby_streetname}'}" }, { "path": [ "pointRendering", "marker", "icon", "mappings", "then" ], "required": true, "hints": { "typehint": "rendered", "question": "What text should be shown?" }, "type": [ { "$ref": "#/definitions/Record" }, { "type": "string" } ], "description": "If the condition `if` is met, the text `then` will be rendered.\nIf not known yet, the user will be presented with `then` as an option" }, { "path": [ "pointRendering", "marker", "icon", "mappings", "icon" ], "required": false, "hints": { "typehint": "icon", "question": "What icon should be added to this mapping?", "inline": " {icon}" }, "type": [ { "type": "object", "properties": { "path": { "description": "The path to the icon\nType: icon", "type": "string" }, "class": { "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)", "type": "string" } }, "required": [ "path" ] }, { "type": "string" } ], "description": "An icon supporting this mapping; typically shown pretty small" }, { "path": [ "pointRendering", "marker", "icon", "mappings", "icon", "path" ], "required": true, "hints": { "typehint": "icon" }, "type": "string", "description": "The path to the icon" }, { "path": [ "pointRendering", "marker", "icon", "mappings", "icon", "class" ], "required": false, "hints": {}, "type": "string", "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)" }, { "path": [ "pointRendering", "marker", "icon", "description" ], "required": false, "hints": {}, "type": [ { "$ref": "#/definitions/Record" }, { "type": "string" } ], "description": "A human-readable text explaining what this tagRendering does.\nMostly used for the shared tagrenderings" }, { "path": [ "pointRendering", "marker", "icon", "classes" ], "required": false, "hints": { "question": "What css-classes should be applied to showing this attribute?" }, "type": "string", "description": "A list of css-classes to apply to the entire tagRendering.\nThese classes are applied in 'answer'-mode, not in question mode\nThis is only for advanced users.\nValues are split on ` ` (space)" }, { "path": [ "pointRendering", "marker", "color" ], "required": false, "hints": { "typehint": "color", "question": "What colour should the icon be?" }, "type": [ { "description": "A TagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nFor an _editable_ tagRendering, use 'QuestionableTagRenderingConfigJson' instead, which extends this one", "type": "object", "properties": { "render": { "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nNote that \"&LBRACEkey&RBRACE\"-parts are substituted by the corresponding values of the element.\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered", "anyOf": [ { "$ref": "#/definitions/Record" }, { "type": "object", "properties": { "special": { "allOf": [ { "$ref": "#/definitions/Record>" }, { "type": "object", "properties": { "type": { "type": "string" } }, "required": [ "type" ] } ] } }, "required": [ "special" ] }, { "type": "string" } ] }, "icon": { "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon", "anyOf": [ { "type": "object", "properties": { "path": { "description": "The path to the icon\nType: icon", "type": "string" }, "class": { "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)", "type": "string" } }, "required": [ "path" ] }, { "type": "string" } ] }, "condition": { "description": "question: When should this item be shown?\n\nOnly show this tagrendering (or ask the question) if the selected object also matches the tags specified as `condition`.\n\nThis is useful to ask a follow-up question.\nFor example, within toilets, asking _where_ the diaper changing table is is only useful _if_ there is one.\nThis can be done by adding `\"condition\": \"changing_table=yes\"`\n\nA full example would be:\n```json\n {\n \"question\": \"Where is the changing table located?\",\n \"render\": \"The changing table is located at {changing_table:location}\",\n \"condition\": \"changing_table=yes\",\n \"freeform\": {\n \"key\": \"changing_table:location\",\n \"inline\": true\n },\n \"mappings\": [\n {\n \"then\": \"The changing table is in the toilet for women.\",\n \"if\": \"changing_table:location=female_toilet\"\n },\n {\n \"then\": \"The changing table is in the toilet for men.\",\n \"if\": \"changing_table:location=male_toilet\"\n },\n {\n \"if\": \"changing_table:location=wheelchair_toilet\",\n \"then\": \"The changing table is in the toilet for wheelchair users.\",\n },\n {\n \"if\": \"changing_table:location=dedicated_room\",\n \"then\": \"The changing table is in a dedicated room. \",\n }\n ],\n \"id\": \"toilet-changing_table:location\"\n },\n```", "anyOf": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "$ref": "#/definitions/{or:TagConfigJson[];}" }, { "type": "string" } ] }, "metacondition": { "description": "question: When should this item be shown (including special conditions)?\n\nIf set, this tag will be evaluated agains the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options.\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_", "anyOf": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "$ref": "#/definitions/{or:TagConfigJson[];}" }, { "type": "string" } ] }, "freeform": { "description": "question: Should a freeform text field be shown?\nAllow freeform text input from the user\nifunset: Do not add a freeform text field", "type": "object", "properties": { "key": { "description": "What attribute should be filled out\nIf this key is present in the feature, then 'render' is used to display the value.\nIf this is undefined, the rendering is _always_ shown", "type": "string" } }, "required": [ "key" ] }, "mappings": { "description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes", "type": "array", "items": { "type": "object", "properties": { "if": { "$ref": "#/definitions/TagConfigJson", "description": "question: When should this single mapping match?\n\nIf this condition is met, then the text under `then` will be shown.\nIf no value matches, and the user selects this mapping as an option, then these tags will be uploaded to OSM.\n\nFor example: {'if': 'diet:vegetarion=yes', 'then':'A vegetarian option is offered here'}\n\nThis can be an substituting-tag as well, e.g. {'if': 'addr:street:={_calculated_nearby_streetname}', 'then': '{_calculated_nearby_streetname}'}" }, "then": { "description": "question: What text should be shown?\n\nIf the condition `if` is met, the text `then` will be rendered.\nIf not known yet, the user will be presented with `then` as an option\nType: rendered", "anyOf": [ { "$ref": "#/definitions/Record" }, { "type": "string" } ] }, "icon": { "description": "question: What icon should be added to this mapping?\nAn icon supporting this mapping; typically shown pretty small\ninline: {icon}\nType: icon", "anyOf": [ { "type": "object", "properties": { "path": { "description": "The path to the icon\nType: icon", "type": "string" }, "class": { "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)", "type": "string" } }, "required": [ "path" ] }, { "type": "string" } ] } }, "required": [ "if", "then" ] } }, "description": { "description": "A human-readable text explaining what this tagRendering does.\nMostly used for the shared tagrenderings", "anyOf": [ { "$ref": "#/definitions/Record" }, { "type": "string" } ] }, "classes": { "description": "question: What css-classes should be applied to showing this attribute?\n\nA list of css-classes to apply to the entire tagRendering.\nThese classes are applied in 'answer'-mode, not in question mode\nThis is only for advanced users.\n\nValues are split on ` ` (space)", "type": "string" } }, "additionalProperties": false }, { "type": "object", "properties": { "builtin": { "type": "string" }, "override": {} }, "required": [ "builtin", "override" ] }, { "type": "string" } ], "description": "This will only work for the default icons such as `pin`,`circle`,..." }, { "path": [ "pointRendering", "marker", "color", "render" ], "required": false, "hints": { "typehint": "rendered", "question": "What text should be rendered?" }, "type": [ { "$ref": "#/definitions/Record" }, { "type": "object", "properties": { "special": { "allOf": [ { "$ref": "#/definitions/Record>" }, { "type": "object", "properties": { "type": { "type": "string" } }, "required": [ "type" ] } ] } }, "required": [ "special" ] }, { "type": "string" } ], "description": "This piece of text will be shown in the infobox.\nNote that \"&LBRACEkey&RBRACE\"-parts are substituted by the corresponding values of the element.\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`" }, { "path": [ "pointRendering", "marker", "color", "icon" ], "required": false, "hints": { "typehint": "icon", "question": "what icon should be shown next to the 'render' value?" }, "type": [ { "type": "object", "properties": { "path": { "description": "The path to the icon\nType: icon", "type": "string" }, "class": { "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)", "type": "string" } }, "required": [ "path" ] }, { "type": "string" } ], "description": "An icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value" }, { "path": [ "pointRendering", "marker", "color", "icon", "path" ], "required": true, "hints": { "typehint": "icon" }, "type": "string", "description": "The path to the icon" }, { "path": [ "pointRendering", "marker", "color", "icon", "class" ], "required": false, "hints": {}, "type": "string", "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)" }, { "path": [ "pointRendering", "marker", "color", "condition" ], "required": false, "hints": { "question": "When should this item be shown?" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "$ref": "#/definitions/{or:TagConfigJson[];}" }, { "type": "string" } ], "description": "Only show this tagrendering (or ask the question) if the selected object also matches the tags specified as `condition`.\nThis is useful to ask a follow-up question.\nFor example, within toilets, asking _where_ the diaper changing table is is only useful _if_ there is one.\nThis can be done by adding `\"condition\": \"changing_table=yes\"`\nA full example would be:\n```json\n {\n \"question\": \"Where is the changing table located?\",\n \"render\": \"The changing table is located at {changing_table:location}\",\n \"condition\": \"changing_table=yes\",\n \"freeform\": {\n \"key\": \"changing_table:location\",\n \"inline\": true\n },\n \"mappings\": [\n {\n \"then\": \"The changing table is in the toilet for women.\",\n \"if\": \"changing_table:location=female_toilet\"\n },\n {\n \"then\": \"The changing table is in the toilet for men.\",\n \"if\": \"changing_table:location=male_toilet\"\n },\n {\n \"if\": \"changing_table:location=wheelchair_toilet\",\n \"then\": \"The changing table is in the toilet for wheelchair users.\",\n },\n {\n \"if\": \"changing_table:location=dedicated_room\",\n \"then\": \"The changing table is in a dedicated room. \",\n }\n ],\n \"id\": \"toilet-changing_table:location\"\n },\n```" }, { "path": [ "pointRendering", "marker", "color", "condition", "and" ], "required": false, "hints": { "typehint": "tag" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" }, { "path": [ "pointRendering", "marker", "color", "condition", "or" ], "required": false, "hints": { "typehint": "tag" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" }, { "path": [ "pointRendering", "marker", "color", "metacondition" ], "required": false, "hints": { "question": "When should this item be shown (including special conditions)?" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "$ref": "#/definitions/{or:TagConfigJson[];}" }, { "type": "string" } ], "description": "If set, this tag will be evaluated agains the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options.\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_" }, { "path": [ "pointRendering", "marker", "color", "metacondition", "and" ], "required": false, "hints": { "typehint": "tag" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" }, { "path": [ "pointRendering", "marker", "color", "metacondition", "or" ], "required": false, "hints": { "typehint": "tag" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" }, { "path": [ "pointRendering", "marker", "color", "freeform" ], "required": false, "hints": { "question": "Should a freeform text field be shown?", "ifunset": "Do not add a freeform text field" }, "type": "object", "description": "Allow freeform text input from the user" }, { "path": [ "pointRendering", "marker", "color", "freeform", "key" ], "required": true, "hints": {}, "type": "string", "description": "What attribute should be filled out\nIf this key is present in the feature, then 'render' is used to display the value.\nIf this is undefined, the rendering is _always_ shown" }, { "path": [ "pointRendering", "marker", "color", "mappings" ], "required": false, "hints": {}, "type": "array", "description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes" }, { "path": [ "pointRendering", "marker", "color", "mappings", "if" ], "required": true, "hints": { "typehint": "tag", "question": "When should this single mapping match?" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "If this condition is met, then the text under `then` will be shown.\nIf no value matches, and the user selects this mapping as an option, then these tags will be uploaded to OSM.\nFor example: {'if': 'diet:vegetarion=yes', 'then':'A vegetarian option is offered here'}\nThis can be an substituting-tag as well, e.g. {'if': 'addr:street:={_calculated_nearby_streetname}', 'then': '{_calculated_nearby_streetname}'}" }, { "path": [ "pointRendering", "marker", "color", "mappings", "then" ], "required": true, "hints": { "typehint": "rendered", "question": "What text should be shown?" }, "type": [ { "$ref": "#/definitions/Record" }, { "type": "string" } ], "description": "If the condition `if` is met, the text `then` will be rendered.\nIf not known yet, the user will be presented with `then` as an option" }, { "path": [ "pointRendering", "marker", "color", "mappings", "icon" ], "required": false, "hints": { "typehint": "icon", "question": "What icon should be added to this mapping?", "inline": " {icon}" }, "type": [ { "type": "object", "properties": { "path": { "description": "The path to the icon\nType: icon", "type": "string" }, "class": { "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)", "type": "string" } }, "required": [ "path" ] }, { "type": "string" } ], "description": "An icon supporting this mapping; typically shown pretty small" }, { "path": [ "pointRendering", "marker", "color", "mappings", "icon", "path" ], "required": true, "hints": { "typehint": "icon" }, "type": "string", "description": "The path to the icon" }, { "path": [ "pointRendering", "marker", "color", "mappings", "icon", "class" ], "required": false, "hints": {}, "type": "string", "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)" }, { "path": [ "pointRendering", "marker", "color", "description" ], "required": false, "hints": {}, "type": [ { "$ref": "#/definitions/Record" }, { "type": "string" } ], "description": "A human-readable text explaining what this tagRendering does.\nMostly used for the shared tagrenderings" }, { "path": [ "pointRendering", "marker", "color", "classes" ], "required": false, "hints": { "question": "What css-classes should be applied to showing this attribute?" }, "type": "string", "description": "A list of css-classes to apply to the entire tagRendering.\nThese classes are applied in 'answer'-mode, not in question mode\nThis is only for advanced users.\nValues are split on ` ` (space)" }, { "path": [ "pointRendering", "iconBadges" ], "required": false, "hints": {}, "type": "array", "description": "A list of extra badges to show next to the icon as small badge\nThey will be added as a 25% height icon at the bottom right of the icon, with all the badges in a flex layout.\nNote: strings are interpreted as icons, so layering and substituting is supported. You can use `circle:white;./my_icon.svg` to add a background circle" }, { "path": [ "pointRendering", "iconBadges", "if" ], "required": true, "hints": { "typehint": "tag" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" }, { "path": [ "pointRendering", "iconBadges", "then" ], "required": true, "hints": { "typehint": "icon" }, "type": [ { "description": "A TagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nFor an _editable_ tagRendering, use 'QuestionableTagRenderingConfigJson' instead, which extends this one", "type": "object", "properties": { "render": { "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nNote that \"&LBRACEkey&RBRACE\"-parts are substituted by the corresponding values of the element.\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered", "anyOf": [ { "$ref": "#/definitions/Record" }, { "type": "object", "properties": { "special": { "allOf": [ { "$ref": "#/definitions/Record>" }, { "type": "object", "properties": { "type": { "type": "string" } }, "required": [ "type" ] } ] } }, "required": [ "special" ] }, { "type": "string" } ] }, "icon": { "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon", "anyOf": [ { "type": "object", "properties": { "path": { "description": "The path to the icon\nType: icon", "type": "string" }, "class": { "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)", "type": "string" } }, "required": [ "path" ] }, { "type": "string" } ] }, "condition": { "description": "question: When should this item be shown?\n\nOnly show this tagrendering (or ask the question) if the selected object also matches the tags specified as `condition`.\n\nThis is useful to ask a follow-up question.\nFor example, within toilets, asking _where_ the diaper changing table is is only useful _if_ there is one.\nThis can be done by adding `\"condition\": \"changing_table=yes\"`\n\nA full example would be:\n```json\n {\n \"question\": \"Where is the changing table located?\",\n \"render\": \"The changing table is located at {changing_table:location}\",\n \"condition\": \"changing_table=yes\",\n \"freeform\": {\n \"key\": \"changing_table:location\",\n \"inline\": true\n },\n \"mappings\": [\n {\n \"then\": \"The changing table is in the toilet for women.\",\n \"if\": \"changing_table:location=female_toilet\"\n },\n {\n \"then\": \"The changing table is in the toilet for men.\",\n \"if\": \"changing_table:location=male_toilet\"\n },\n {\n \"if\": \"changing_table:location=wheelchair_toilet\",\n \"then\": \"The changing table is in the toilet for wheelchair users.\",\n },\n {\n \"if\": \"changing_table:location=dedicated_room\",\n \"then\": \"The changing table is in a dedicated room. \",\n }\n ],\n \"id\": \"toilet-changing_table:location\"\n },\n```", "anyOf": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "$ref": "#/definitions/{or:TagConfigJson[];}" }, { "type": "string" } ] }, "metacondition": { "description": "question: When should this item be shown (including special conditions)?\n\nIf set, this tag will be evaluated agains the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options.\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_", "anyOf": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "$ref": "#/definitions/{or:TagConfigJson[];}" }, { "type": "string" } ] }, "freeform": { "description": "question: Should a freeform text field be shown?\nAllow freeform text input from the user\nifunset: Do not add a freeform text field", "type": "object", "properties": { "key": { "description": "What attribute should be filled out\nIf this key is present in the feature, then 'render' is used to display the value.\nIf this is undefined, the rendering is _always_ shown", "type": "string" } }, "required": [ "key" ] }, "mappings": { "description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes", "type": "array", "items": { "type": "object", "properties": { "if": { "$ref": "#/definitions/TagConfigJson", "description": "question: When should this single mapping match?\n\nIf this condition is met, then the text under `then` will be shown.\nIf no value matches, and the user selects this mapping as an option, then these tags will be uploaded to OSM.\n\nFor example: {'if': 'diet:vegetarion=yes', 'then':'A vegetarian option is offered here'}\n\nThis can be an substituting-tag as well, e.g. {'if': 'addr:street:={_calculated_nearby_streetname}', 'then': '{_calculated_nearby_streetname}'}" }, "then": { "description": "question: What text should be shown?\n\nIf the condition `if` is met, the text `then` will be rendered.\nIf not known yet, the user will be presented with `then` as an option\nType: rendered", "anyOf": [ { "$ref": "#/definitions/Record" }, { "type": "string" } ] }, "icon": { "description": "question: What icon should be added to this mapping?\nAn icon supporting this mapping; typically shown pretty small\ninline: {icon}\nType: icon", "anyOf": [ { "type": "object", "properties": { "path": { "description": "The path to the icon\nType: icon", "type": "string" }, "class": { "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)", "type": "string" } }, "required": [ "path" ] }, { "type": "string" } ] } }, "required": [ "if", "then" ] } }, "description": { "description": "A human-readable text explaining what this tagRendering does.\nMostly used for the shared tagrenderings", "anyOf": [ { "$ref": "#/definitions/Record" }, { "type": "string" } ] }, "classes": { "description": "question: What css-classes should be applied to showing this attribute?\n\nA list of css-classes to apply to the entire tagRendering.\nThese classes are applied in 'answer'-mode, not in question mode\nThis is only for advanced users.\n\nValues are split on ` ` (space)", "type": "string" } }, "additionalProperties": false }, { "type": "string" } ], "description": "Badge to show" }, { "path": [ "pointRendering", "iconBadges", "then", "render" ], "required": false, "hints": { "typehint": "rendered", "question": "What text should be rendered?" }, "type": [ { "$ref": "#/definitions/Record" }, { "type": "object", "properties": { "special": { "allOf": [ { "$ref": "#/definitions/Record>" }, { "type": "object", "properties": { "type": { "type": "string" } }, "required": [ "type" ] } ] } }, "required": [ "special" ] }, { "type": "string" } ], "description": "This piece of text will be shown in the infobox.\nNote that \"&LBRACEkey&RBRACE\"-parts are substituted by the corresponding values of the element.\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`" }, { "path": [ "pointRendering", "iconBadges", "then", "icon" ], "required": false, "hints": { "typehint": "icon", "question": "what icon should be shown next to the 'render' value?" }, "type": [ { "type": "object", "properties": { "path": { "description": "The path to the icon\nType: icon", "type": "string" }, "class": { "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)", "type": "string" } }, "required": [ "path" ] }, { "type": "string" } ], "description": "An icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value" }, { "path": [ "pointRendering", "iconBadges", "then", "icon", "path" ], "required": true, "hints": { "typehint": "icon" }, "type": "string", "description": "The path to the icon" }, { "path": [ "pointRendering", "iconBadges", "then", "icon", "class" ], "required": false, "hints": {}, "type": "string", "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)" }, { "path": [ "pointRendering", "iconBadges", "then", "condition" ], "required": false, "hints": { "question": "When should this item be shown?" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "$ref": "#/definitions/{or:TagConfigJson[];}" }, { "type": "string" } ], "description": "Only show this tagrendering (or ask the question) if the selected object also matches the tags specified as `condition`.\nThis is useful to ask a follow-up question.\nFor example, within toilets, asking _where_ the diaper changing table is is only useful _if_ there is one.\nThis can be done by adding `\"condition\": \"changing_table=yes\"`\nA full example would be:\n```json\n {\n \"question\": \"Where is the changing table located?\",\n \"render\": \"The changing table is located at {changing_table:location}\",\n \"condition\": \"changing_table=yes\",\n \"freeform\": {\n \"key\": \"changing_table:location\",\n \"inline\": true\n },\n \"mappings\": [\n {\n \"then\": \"The changing table is in the toilet for women.\",\n \"if\": \"changing_table:location=female_toilet\"\n },\n {\n \"then\": \"The changing table is in the toilet for men.\",\n \"if\": \"changing_table:location=male_toilet\"\n },\n {\n \"if\": \"changing_table:location=wheelchair_toilet\",\n \"then\": \"The changing table is in the toilet for wheelchair users.\",\n },\n {\n \"if\": \"changing_table:location=dedicated_room\",\n \"then\": \"The changing table is in a dedicated room. \",\n }\n ],\n \"id\": \"toilet-changing_table:location\"\n },\n```" }, { "path": [ "pointRendering", "iconBadges", "then", "condition", "and" ], "required": false, "hints": { "typehint": "tag" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" }, { "path": [ "pointRendering", "iconBadges", "then", "condition", "or" ], "required": false, "hints": { "typehint": "tag" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" }, { "path": [ "pointRendering", "iconBadges", "then", "metacondition" ], "required": false, "hints": { "question": "When should this item be shown (including special conditions)?" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "$ref": "#/definitions/{or:TagConfigJson[];}" }, { "type": "string" } ], "description": "If set, this tag will be evaluated agains the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options.\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_" }, { "path": [ "pointRendering", "iconBadges", "then", "metacondition", "and" ], "required": false, "hints": { "typehint": "tag" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" }, { "path": [ "pointRendering", "iconBadges", "then", "metacondition", "or" ], "required": false, "hints": { "typehint": "tag" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" }, { "path": [ "pointRendering", "iconBadges", "then", "freeform" ], "required": false, "hints": { "question": "Should a freeform text field be shown?", "ifunset": "Do not add a freeform text field" }, "type": "object", "description": "Allow freeform text input from the user" }, { "path": [ "pointRendering", "iconBadges", "then", "freeform", "key" ], "required": true, "hints": {}, "type": "string", "description": "What attribute should be filled out\nIf this key is present in the feature, then 'render' is used to display the value.\nIf this is undefined, the rendering is _always_ shown" }, { "path": [ "pointRendering", "iconBadges", "then", "mappings" ], "required": false, "hints": {}, "type": "array", "description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes" }, { "path": [ "pointRendering", "iconBadges", "then", "mappings", "if" ], "required": true, "hints": { "typehint": "tag", "question": "When should this single mapping match?" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "If this condition is met, then the text under `then` will be shown.\nIf no value matches, and the user selects this mapping as an option, then these tags will be uploaded to OSM.\nFor example: {'if': 'diet:vegetarion=yes', 'then':'A vegetarian option is offered here'}\nThis can be an substituting-tag as well, e.g. {'if': 'addr:street:={_calculated_nearby_streetname}', 'then': '{_calculated_nearby_streetname}'}" }, { "path": [ "pointRendering", "iconBadges", "then", "mappings", "then" ], "required": true, "hints": { "typehint": "rendered", "question": "What text should be shown?" }, "type": [ { "$ref": "#/definitions/Record" }, { "type": "string" } ], "description": "If the condition `if` is met, the text `then` will be rendered.\nIf not known yet, the user will be presented with `then` as an option" }, { "path": [ "pointRendering", "iconBadges", "then", "mappings", "icon" ], "required": false, "hints": { "typehint": "icon", "question": "What icon should be added to this mapping?", "inline": " {icon}" }, "type": [ { "type": "object", "properties": { "path": { "description": "The path to the icon\nType: icon", "type": "string" }, "class": { "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)", "type": "string" } }, "required": [ "path" ] }, { "type": "string" } ], "description": "An icon supporting this mapping; typically shown pretty small" }, { "path": [ "pointRendering", "iconBadges", "then", "mappings", "icon", "path" ], "required": true, "hints": { "typehint": "icon" }, "type": "string", "description": "The path to the icon" }, { "path": [ "pointRendering", "iconBadges", "then", "mappings", "icon", "class" ], "required": false, "hints": {}, "type": "string", "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)" }, { "path": [ "pointRendering", "iconBadges", "then", "description" ], "required": false, "hints": {}, "type": [ { "$ref": "#/definitions/Record" }, { "type": "string" } ], "description": "A human-readable text explaining what this tagRendering does.\nMostly used for the shared tagrenderings" }, { "path": [ "pointRendering", "iconBadges", "then", "classes" ], "required": false, "hints": { "question": "What css-classes should be applied to showing this attribute?" }, "type": "string", "description": "A list of css-classes to apply to the entire tagRendering.\nThese classes are applied in 'answer'-mode, not in question mode\nThis is only for advanced users.\nValues are split on ` ` (space)" }, { "path": [ "pointRendering", "iconSize" ], "required": false, "hints": { "question": "What size should the marker be on the map?", "ifunset": "Use the default size (40,40 px)" }, "type": [ { "description": "A TagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nFor an _editable_ tagRendering, use 'QuestionableTagRenderingConfigJson' instead, which extends this one", "type": "object", "properties": { "render": { "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nNote that \"&LBRACEkey&RBRACE\"-parts are substituted by the corresponding values of the element.\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered", "anyOf": [ { "$ref": "#/definitions/Record" }, { "type": "object", "properties": { "special": { "allOf": [ { "$ref": "#/definitions/Record>" }, { "type": "object", "properties": { "type": { "type": "string" } }, "required": [ "type" ] } ] } }, "required": [ "special" ] }, { "type": "string" } ] }, "icon": { "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon", "anyOf": [ { "type": "object", "properties": { "path": { "description": "The path to the icon\nType: icon", "type": "string" }, "class": { "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)", "type": "string" } }, "required": [ "path" ] }, { "type": "string" } ] }, "condition": { "description": "question: When should this item be shown?\n\nOnly show this tagrendering (or ask the question) if the selected object also matches the tags specified as `condition`.\n\nThis is useful to ask a follow-up question.\nFor example, within toilets, asking _where_ the diaper changing table is is only useful _if_ there is one.\nThis can be done by adding `\"condition\": \"changing_table=yes\"`\n\nA full example would be:\n```json\n {\n \"question\": \"Where is the changing table located?\",\n \"render\": \"The changing table is located at {changing_table:location}\",\n \"condition\": \"changing_table=yes\",\n \"freeform\": {\n \"key\": \"changing_table:location\",\n \"inline\": true\n },\n \"mappings\": [\n {\n \"then\": \"The changing table is in the toilet for women.\",\n \"if\": \"changing_table:location=female_toilet\"\n },\n {\n \"then\": \"The changing table is in the toilet for men.\",\n \"if\": \"changing_table:location=male_toilet\"\n },\n {\n \"if\": \"changing_table:location=wheelchair_toilet\",\n \"then\": \"The changing table is in the toilet for wheelchair users.\",\n },\n {\n \"if\": \"changing_table:location=dedicated_room\",\n \"then\": \"The changing table is in a dedicated room. \",\n }\n ],\n \"id\": \"toilet-changing_table:location\"\n },\n```", "anyOf": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "$ref": "#/definitions/{or:TagConfigJson[];}" }, { "type": "string" } ] }, "metacondition": { "description": "question: When should this item be shown (including special conditions)?\n\nIf set, this tag will be evaluated agains the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options.\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_", "anyOf": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "$ref": "#/definitions/{or:TagConfigJson[];}" }, { "type": "string" } ] }, "freeform": { "description": "question: Should a freeform text field be shown?\nAllow freeform text input from the user\nifunset: Do not add a freeform text field", "type": "object", "properties": { "key": { "description": "What attribute should be filled out\nIf this key is present in the feature, then 'render' is used to display the value.\nIf this is undefined, the rendering is _always_ shown", "type": "string" } }, "required": [ "key" ] }, "mappings": { "description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes", "type": "array", "items": { "type": "object", "properties": { "if": { "$ref": "#/definitions/TagConfigJson", "description": "question: When should this single mapping match?\n\nIf this condition is met, then the text under `then` will be shown.\nIf no value matches, and the user selects this mapping as an option, then these tags will be uploaded to OSM.\n\nFor example: {'if': 'diet:vegetarion=yes', 'then':'A vegetarian option is offered here'}\n\nThis can be an substituting-tag as well, e.g. {'if': 'addr:street:={_calculated_nearby_streetname}', 'then': '{_calculated_nearby_streetname}'}" }, "then": { "description": "question: What text should be shown?\n\nIf the condition `if` is met, the text `then` will be rendered.\nIf not known yet, the user will be presented with `then` as an option\nType: rendered", "anyOf": [ { "$ref": "#/definitions/Record" }, { "type": "string" } ] }, "icon": { "description": "question: What icon should be added to this mapping?\nAn icon supporting this mapping; typically shown pretty small\ninline: {icon}\nType: icon", "anyOf": [ { "type": "object", "properties": { "path": { "description": "The path to the icon\nType: icon", "type": "string" }, "class": { "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)", "type": "string" } }, "required": [ "path" ] }, { "type": "string" } ] } }, "required": [ "if", "then" ] } }, "description": { "description": "A human-readable text explaining what this tagRendering does.\nMostly used for the shared tagrenderings", "anyOf": [ { "$ref": "#/definitions/Record" }, { "type": "string" } ] }, "classes": { "description": "question: What css-classes should be applied to showing this attribute?\n\nA list of css-classes to apply to the entire tagRendering.\nThese classes are applied in 'answer'-mode, not in question mode\nThis is only for advanced users.\n\nValues are split on ` ` (space)", "type": "string" } }, "additionalProperties": false }, { "type": "string" } ], "description": "A string containing \",\" in pixels" }, { "path": [ "pointRendering", "iconSize", "render" ], "required": false, "hints": { "typehint": "rendered", "question": "What text should be rendered?" }, "type": [ { "$ref": "#/definitions/Record" }, { "type": "object", "properties": { "special": { "allOf": [ { "$ref": "#/definitions/Record>" }, { "type": "object", "properties": { "type": { "type": "string" } }, "required": [ "type" ] } ] } }, "required": [ "special" ] }, { "type": "string" } ], "description": "This piece of text will be shown in the infobox.\nNote that \"&LBRACEkey&RBRACE\"-parts are substituted by the corresponding values of the element.\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`" }, { "path": [ "pointRendering", "iconSize", "icon" ], "required": false, "hints": { "typehint": "icon", "question": "what icon should be shown next to the 'render' value?" }, "type": [ { "type": "object", "properties": { "path": { "description": "The path to the icon\nType: icon", "type": "string" }, "class": { "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)", "type": "string" } }, "required": [ "path" ] }, { "type": "string" } ], "description": "An icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value" }, { "path": [ "pointRendering", "iconSize", "icon", "path" ], "required": true, "hints": { "typehint": "icon" }, "type": "string", "description": "The path to the icon" }, { "path": [ "pointRendering", "iconSize", "icon", "class" ], "required": false, "hints": {}, "type": "string", "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)" }, { "path": [ "pointRendering", "iconSize", "condition" ], "required": false, "hints": { "question": "When should this item be shown?" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "$ref": "#/definitions/{or:TagConfigJson[];}" }, { "type": "string" } ], "description": "Only show this tagrendering (or ask the question) if the selected object also matches the tags specified as `condition`.\nThis is useful to ask a follow-up question.\nFor example, within toilets, asking _where_ the diaper changing table is is only useful _if_ there is one.\nThis can be done by adding `\"condition\": \"changing_table=yes\"`\nA full example would be:\n```json\n {\n \"question\": \"Where is the changing table located?\",\n \"render\": \"The changing table is located at {changing_table:location}\",\n \"condition\": \"changing_table=yes\",\n \"freeform\": {\n \"key\": \"changing_table:location\",\n \"inline\": true\n },\n \"mappings\": [\n {\n \"then\": \"The changing table is in the toilet for women.\",\n \"if\": \"changing_table:location=female_toilet\"\n },\n {\n \"then\": \"The changing table is in the toilet for men.\",\n \"if\": \"changing_table:location=male_toilet\"\n },\n {\n \"if\": \"changing_table:location=wheelchair_toilet\",\n \"then\": \"The changing table is in the toilet for wheelchair users.\",\n },\n {\n \"if\": \"changing_table:location=dedicated_room\",\n \"then\": \"The changing table is in a dedicated room. \",\n }\n ],\n \"id\": \"toilet-changing_table:location\"\n },\n```" }, { "path": [ "pointRendering", "iconSize", "condition", "and" ], "required": false, "hints": { "typehint": "tag" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" }, { "path": [ "pointRendering", "iconSize", "condition", "or" ], "required": false, "hints": { "typehint": "tag" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" }, { "path": [ "pointRendering", "iconSize", "metacondition" ], "required": false, "hints": { "question": "When should this item be shown (including special conditions)?" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "$ref": "#/definitions/{or:TagConfigJson[];}" }, { "type": "string" } ], "description": "If set, this tag will be evaluated agains the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options.\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_" }, { "path": [ "pointRendering", "iconSize", "metacondition", "and" ], "required": false, "hints": { "typehint": "tag" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" }, { "path": [ "pointRendering", "iconSize", "metacondition", "or" ], "required": false, "hints": { "typehint": "tag" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" }, { "path": [ "pointRendering", "iconSize", "freeform" ], "required": false, "hints": { "question": "Should a freeform text field be shown?", "ifunset": "Do not add a freeform text field" }, "type": "object", "description": "Allow freeform text input from the user" }, { "path": [ "pointRendering", "iconSize", "freeform", "key" ], "required": true, "hints": {}, "type": "string", "description": "What attribute should be filled out\nIf this key is present in the feature, then 'render' is used to display the value.\nIf this is undefined, the rendering is _always_ shown" }, { "path": [ "pointRendering", "iconSize", "mappings" ], "required": false, "hints": {}, "type": "array", "description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes" }, { "path": [ "pointRendering", "iconSize", "mappings", "if" ], "required": true, "hints": { "typehint": "tag", "question": "When should this single mapping match?" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "If this condition is met, then the text under `then` will be shown.\nIf no value matches, and the user selects this mapping as an option, then these tags will be uploaded to OSM.\nFor example: {'if': 'diet:vegetarion=yes', 'then':'A vegetarian option is offered here'}\nThis can be an substituting-tag as well, e.g. {'if': 'addr:street:={_calculated_nearby_streetname}', 'then': '{_calculated_nearby_streetname}'}" }, { "path": [ "pointRendering", "iconSize", "mappings", "then" ], "required": true, "hints": { "typehint": "rendered", "question": "What text should be shown?" }, "type": [ { "$ref": "#/definitions/Record" }, { "type": "string" } ], "description": "If the condition `if` is met, the text `then` will be rendered.\nIf not known yet, the user will be presented with `then` as an option" }, { "path": [ "pointRendering", "iconSize", "mappings", "icon" ], "required": false, "hints": { "typehint": "icon", "question": "What icon should be added to this mapping?", "inline": " {icon}" }, "type": [ { "type": "object", "properties": { "path": { "description": "The path to the icon\nType: icon", "type": "string" }, "class": { "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)", "type": "string" } }, "required": [ "path" ] }, { "type": "string" } ], "description": "An icon supporting this mapping; typically shown pretty small" }, { "path": [ "pointRendering", "iconSize", "mappings", "icon", "path" ], "required": true, "hints": { "typehint": "icon" }, "type": "string", "description": "The path to the icon" }, { "path": [ "pointRendering", "iconSize", "mappings", "icon", "class" ], "required": false, "hints": {}, "type": "string", "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)" }, { "path": [ "pointRendering", "iconSize", "description" ], "required": false, "hints": {}, "type": [ { "$ref": "#/definitions/Record" }, { "type": "string" } ], "description": "A human-readable text explaining what this tagRendering does.\nMostly used for the shared tagrenderings" }, { "path": [ "pointRendering", "iconSize", "classes" ], "required": false, "hints": { "question": "What css-classes should be applied to showing this attribute?" }, "type": "string", "description": "A list of css-classes to apply to the entire tagRendering.\nThese classes are applied in 'answer'-mode, not in question mode\nThis is only for advanced users.\nValues are split on ` ` (space)" }, { "path": [ "pointRendering", "anchor" ], "required": false, "hints": { "question": "What is the anchorpoint of the icon?", "ifunset": "Use MapComplete-default (center)", "suggestions": [ { "if": "value=center", "then": "Place the center of the icon on the geographical location" }, { "if": "value=top", "then": "Place the top of the icon on the geographical location" }, { "if": "value=bottom", "then": "Place the bottom of the icon on the geographical location" }, { "if": "value=left", "then": "Place the left of the icon on the geographical location" }, { "if": "value=right", "then": "Place the right of the icon on the geographical location" } ] }, "type": [ { "description": "A TagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nFor an _editable_ tagRendering, use 'QuestionableTagRenderingConfigJson' instead, which extends this one", "type": "object", "properties": { "render": { "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nNote that \"&LBRACEkey&RBRACE\"-parts are substituted by the corresponding values of the element.\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered", "anyOf": [ { "$ref": "#/definitions/Record" }, { "type": "object", "properties": { "special": { "allOf": [ { "$ref": "#/definitions/Record>" }, { "type": "object", "properties": { "type": { "type": "string" } }, "required": [ "type" ] } ] } }, "required": [ "special" ] }, { "type": "string" } ] }, "icon": { "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon", "anyOf": [ { "type": "object", "properties": { "path": { "description": "The path to the icon\nType: icon", "type": "string" }, "class": { "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)", "type": "string" } }, "required": [ "path" ] }, { "type": "string" } ] }, "condition": { "description": "question: When should this item be shown?\n\nOnly show this tagrendering (or ask the question) if the selected object also matches the tags specified as `condition`.\n\nThis is useful to ask a follow-up question.\nFor example, within toilets, asking _where_ the diaper changing table is is only useful _if_ there is one.\nThis can be done by adding `\"condition\": \"changing_table=yes\"`\n\nA full example would be:\n```json\n {\n \"question\": \"Where is the changing table located?\",\n \"render\": \"The changing table is located at {changing_table:location}\",\n \"condition\": \"changing_table=yes\",\n \"freeform\": {\n \"key\": \"changing_table:location\",\n \"inline\": true\n },\n \"mappings\": [\n {\n \"then\": \"The changing table is in the toilet for women.\",\n \"if\": \"changing_table:location=female_toilet\"\n },\n {\n \"then\": \"The changing table is in the toilet for men.\",\n \"if\": \"changing_table:location=male_toilet\"\n },\n {\n \"if\": \"changing_table:location=wheelchair_toilet\",\n \"then\": \"The changing table is in the toilet for wheelchair users.\",\n },\n {\n \"if\": \"changing_table:location=dedicated_room\",\n \"then\": \"The changing table is in a dedicated room. \",\n }\n ],\n \"id\": \"toilet-changing_table:location\"\n },\n```", "anyOf": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "$ref": "#/definitions/{or:TagConfigJson[];}" }, { "type": "string" } ] }, "metacondition": { "description": "question: When should this item be shown (including special conditions)?\n\nIf set, this tag will be evaluated agains the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options.\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_", "anyOf": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "$ref": "#/definitions/{or:TagConfigJson[];}" }, { "type": "string" } ] }, "freeform": { "description": "question: Should a freeform text field be shown?\nAllow freeform text input from the user\nifunset: Do not add a freeform text field", "type": "object", "properties": { "key": { "description": "What attribute should be filled out\nIf this key is present in the feature, then 'render' is used to display the value.\nIf this is undefined, the rendering is _always_ shown", "type": "string" } }, "required": [ "key" ] }, "mappings": { "description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes", "type": "array", "items": { "type": "object", "properties": { "if": { "$ref": "#/definitions/TagConfigJson", "description": "question: When should this single mapping match?\n\nIf this condition is met, then the text under `then` will be shown.\nIf no value matches, and the user selects this mapping as an option, then these tags will be uploaded to OSM.\n\nFor example: {'if': 'diet:vegetarion=yes', 'then':'A vegetarian option is offered here'}\n\nThis can be an substituting-tag as well, e.g. {'if': 'addr:street:={_calculated_nearby_streetname}', 'then': '{_calculated_nearby_streetname}'}" }, "then": { "description": "question: What text should be shown?\n\nIf the condition `if` is met, the text `then` will be rendered.\nIf not known yet, the user will be presented with `then` as an option\nType: rendered", "anyOf": [ { "$ref": "#/definitions/Record" }, { "type": "string" } ] }, "icon": { "description": "question: What icon should be added to this mapping?\nAn icon supporting this mapping; typically shown pretty small\ninline: {icon}\nType: icon", "anyOf": [ { "type": "object", "properties": { "path": { "description": "The path to the icon\nType: icon", "type": "string" }, "class": { "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)", "type": "string" } }, "required": [ "path" ] }, { "type": "string" } ] } }, "required": [ "if", "then" ] } }, "description": { "description": "A human-readable text explaining what this tagRendering does.\nMostly used for the shared tagrenderings", "anyOf": [ { "$ref": "#/definitions/Record" }, { "type": "string" } ] }, "classes": { "description": "question: What css-classes should be applied to showing this attribute?\n\nA list of css-classes to apply to the entire tagRendering.\nThese classes are applied in 'answer'-mode, not in question mode\nThis is only for advanced users.\n\nValues are split on ` ` (space)", "type": "string" } }, "additionalProperties": false }, { "type": "string" } ], "description": "This matches the geographical point with a location on the icon." }, { "path": [ "pointRendering", "anchor", "render" ], "required": false, "hints": { "typehint": "rendered", "question": "What text should be rendered?" }, "type": [ { "$ref": "#/definitions/Record" }, { "type": "object", "properties": { "special": { "allOf": [ { "$ref": "#/definitions/Record>" }, { "type": "object", "properties": { "type": { "type": "string" } }, "required": [ "type" ] } ] } }, "required": [ "special" ] }, { "type": "string" } ], "description": "This piece of text will be shown in the infobox.\nNote that \"&LBRACEkey&RBRACE\"-parts are substituted by the corresponding values of the element.\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`" }, { "path": [ "pointRendering", "anchor", "icon" ], "required": false, "hints": { "typehint": "icon", "question": "what icon should be shown next to the 'render' value?" }, "type": [ { "type": "object", "properties": { "path": { "description": "The path to the icon\nType: icon", "type": "string" }, "class": { "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)", "type": "string" } }, "required": [ "path" ] }, { "type": "string" } ], "description": "An icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value" }, { "path": [ "pointRendering", "anchor", "icon", "path" ], "required": true, "hints": { "typehint": "icon" }, "type": "string", "description": "The path to the icon" }, { "path": [ "pointRendering", "anchor", "icon", "class" ], "required": false, "hints": {}, "type": "string", "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)" }, { "path": [ "pointRendering", "anchor", "condition" ], "required": false, "hints": { "question": "When should this item be shown?" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "$ref": "#/definitions/{or:TagConfigJson[];}" }, { "type": "string" } ], "description": "Only show this tagrendering (or ask the question) if the selected object also matches the tags specified as `condition`.\nThis is useful to ask a follow-up question.\nFor example, within toilets, asking _where_ the diaper changing table is is only useful _if_ there is one.\nThis can be done by adding `\"condition\": \"changing_table=yes\"`\nA full example would be:\n```json\n {\n \"question\": \"Where is the changing table located?\",\n \"render\": \"The changing table is located at {changing_table:location}\",\n \"condition\": \"changing_table=yes\",\n \"freeform\": {\n \"key\": \"changing_table:location\",\n \"inline\": true\n },\n \"mappings\": [\n {\n \"then\": \"The changing table is in the toilet for women.\",\n \"if\": \"changing_table:location=female_toilet\"\n },\n {\n \"then\": \"The changing table is in the toilet for men.\",\n \"if\": \"changing_table:location=male_toilet\"\n },\n {\n \"if\": \"changing_table:location=wheelchair_toilet\",\n \"then\": \"The changing table is in the toilet for wheelchair users.\",\n },\n {\n \"if\": \"changing_table:location=dedicated_room\",\n \"then\": \"The changing table is in a dedicated room. \",\n }\n ],\n \"id\": \"toilet-changing_table:location\"\n },\n```" }, { "path": [ "pointRendering", "anchor", "condition", "and" ], "required": false, "hints": { "typehint": "tag" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" }, { "path": [ "pointRendering", "anchor", "condition", "or" ], "required": false, "hints": { "typehint": "tag" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" }, { "path": [ "pointRendering", "anchor", "metacondition" ], "required": false, "hints": { "question": "When should this item be shown (including special conditions)?" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "$ref": "#/definitions/{or:TagConfigJson[];}" }, { "type": "string" } ], "description": "If set, this tag will be evaluated agains the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options.\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_" }, { "path": [ "pointRendering", "anchor", "metacondition", "and" ], "required": false, "hints": { "typehint": "tag" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" }, { "path": [ "pointRendering", "anchor", "metacondition", "or" ], "required": false, "hints": { "typehint": "tag" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" }, { "path": [ "pointRendering", "anchor", "freeform" ], "required": false, "hints": { "question": "Should a freeform text field be shown?", "ifunset": "Do not add a freeform text field" }, "type": "object", "description": "Allow freeform text input from the user" }, { "path": [ "pointRendering", "anchor", "freeform", "key" ], "required": true, "hints": {}, "type": "string", "description": "What attribute should be filled out\nIf this key is present in the feature, then 'render' is used to display the value.\nIf this is undefined, the rendering is _always_ shown" }, { "path": [ "pointRendering", "anchor", "mappings" ], "required": false, "hints": {}, "type": "array", "description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes" }, { "path": [ "pointRendering", "anchor", "mappings", "if" ], "required": true, "hints": { "typehint": "tag", "question": "When should this single mapping match?" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "If this condition is met, then the text under `then` will be shown.\nIf no value matches, and the user selects this mapping as an option, then these tags will be uploaded to OSM.\nFor example: {'if': 'diet:vegetarion=yes', 'then':'A vegetarian option is offered here'}\nThis can be an substituting-tag as well, e.g. {'if': 'addr:street:={_calculated_nearby_streetname}', 'then': '{_calculated_nearby_streetname}'}" }, { "path": [ "pointRendering", "anchor", "mappings", "then" ], "required": true, "hints": { "typehint": "rendered", "question": "What text should be shown?" }, "type": [ { "$ref": "#/definitions/Record" }, { "type": "string" } ], "description": "If the condition `if` is met, the text `then` will be rendered.\nIf not known yet, the user will be presented with `then` as an option" }, { "path": [ "pointRendering", "anchor", "mappings", "icon" ], "required": false, "hints": { "typehint": "icon", "question": "What icon should be added to this mapping?", "inline": " {icon}" }, "type": [ { "type": "object", "properties": { "path": { "description": "The path to the icon\nType: icon", "type": "string" }, "class": { "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)", "type": "string" } }, "required": [ "path" ] }, { "type": "string" } ], "description": "An icon supporting this mapping; typically shown pretty small" }, { "path": [ "pointRendering", "anchor", "mappings", "icon", "path" ], "required": true, "hints": { "typehint": "icon" }, "type": "string", "description": "The path to the icon" }, { "path": [ "pointRendering", "anchor", "mappings", "icon", "class" ], "required": false, "hints": {}, "type": "string", "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)" }, { "path": [ "pointRendering", "anchor", "description" ], "required": false, "hints": {}, "type": [ { "$ref": "#/definitions/Record" }, { "type": "string" } ], "description": "A human-readable text explaining what this tagRendering does.\nMostly used for the shared tagrenderings" }, { "path": [ "pointRendering", "anchor", "classes" ], "required": false, "hints": { "question": "What css-classes should be applied to showing this attribute?" }, "type": "string", "description": "A list of css-classes to apply to the entire tagRendering.\nThese classes are applied in 'answer'-mode, not in question mode\nThis is only for advanced users.\nValues are split on ` ` (space)" }, { "path": [ "pointRendering", "rotation" ], "required": false, "hints": { "question": "What rotation should be applied on the icon?", "ifunset": "Do not rotate" }, "type": [ { "description": "A TagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nFor an _editable_ tagRendering, use 'QuestionableTagRenderingConfigJson' instead, which extends this one", "type": "object", "properties": { "render": { "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nNote that \"&LBRACEkey&RBRACE\"-parts are substituted by the corresponding values of the element.\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered", "anyOf": [ { "$ref": "#/definitions/Record" }, { "type": "object", "properties": { "special": { "allOf": [ { "$ref": "#/definitions/Record>" }, { "type": "object", "properties": { "type": { "type": "string" } }, "required": [ "type" ] } ] } }, "required": [ "special" ] }, { "type": "string" } ] }, "icon": { "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon", "anyOf": [ { "type": "object", "properties": { "path": { "description": "The path to the icon\nType: icon", "type": "string" }, "class": { "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)", "type": "string" } }, "required": [ "path" ] }, { "type": "string" } ] }, "condition": { "description": "question: When should this item be shown?\n\nOnly show this tagrendering (or ask the question) if the selected object also matches the tags specified as `condition`.\n\nThis is useful to ask a follow-up question.\nFor example, within toilets, asking _where_ the diaper changing table is is only useful _if_ there is one.\nThis can be done by adding `\"condition\": \"changing_table=yes\"`\n\nA full example would be:\n```json\n {\n \"question\": \"Where is the changing table located?\",\n \"render\": \"The changing table is located at {changing_table:location}\",\n \"condition\": \"changing_table=yes\",\n \"freeform\": {\n \"key\": \"changing_table:location\",\n \"inline\": true\n },\n \"mappings\": [\n {\n \"then\": \"The changing table is in the toilet for women.\",\n \"if\": \"changing_table:location=female_toilet\"\n },\n {\n \"then\": \"The changing table is in the toilet for men.\",\n \"if\": \"changing_table:location=male_toilet\"\n },\n {\n \"if\": \"changing_table:location=wheelchair_toilet\",\n \"then\": \"The changing table is in the toilet for wheelchair users.\",\n },\n {\n \"if\": \"changing_table:location=dedicated_room\",\n \"then\": \"The changing table is in a dedicated room. \",\n }\n ],\n \"id\": \"toilet-changing_table:location\"\n },\n```", "anyOf": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "$ref": "#/definitions/{or:TagConfigJson[];}" }, { "type": "string" } ] }, "metacondition": { "description": "question: When should this item be shown (including special conditions)?\n\nIf set, this tag will be evaluated agains the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options.\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_", "anyOf": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "$ref": "#/definitions/{or:TagConfigJson[];}" }, { "type": "string" } ] }, "freeform": { "description": "question: Should a freeform text field be shown?\nAllow freeform text input from the user\nifunset: Do not add a freeform text field", "type": "object", "properties": { "key": { "description": "What attribute should be filled out\nIf this key is present in the feature, then 'render' is used to display the value.\nIf this is undefined, the rendering is _always_ shown", "type": "string" } }, "required": [ "key" ] }, "mappings": { "description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes", "type": "array", "items": { "type": "object", "properties": { "if": { "$ref": "#/definitions/TagConfigJson", "description": "question: When should this single mapping match?\n\nIf this condition is met, then the text under `then` will be shown.\nIf no value matches, and the user selects this mapping as an option, then these tags will be uploaded to OSM.\n\nFor example: {'if': 'diet:vegetarion=yes', 'then':'A vegetarian option is offered here'}\n\nThis can be an substituting-tag as well, e.g. {'if': 'addr:street:={_calculated_nearby_streetname}', 'then': '{_calculated_nearby_streetname}'}" }, "then": { "description": "question: What text should be shown?\n\nIf the condition `if` is met, the text `then` will be rendered.\nIf not known yet, the user will be presented with `then` as an option\nType: rendered", "anyOf": [ { "$ref": "#/definitions/Record" }, { "type": "string" } ] }, "icon": { "description": "question: What icon should be added to this mapping?\nAn icon supporting this mapping; typically shown pretty small\ninline: {icon}\nType: icon", "anyOf": [ { "type": "object", "properties": { "path": { "description": "The path to the icon\nType: icon", "type": "string" }, "class": { "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)", "type": "string" } }, "required": [ "path" ] }, { "type": "string" } ] } }, "required": [ "if", "then" ] } }, "description": { "description": "A human-readable text explaining what this tagRendering does.\nMostly used for the shared tagrenderings", "anyOf": [ { "$ref": "#/definitions/Record" }, { "type": "string" } ] }, "classes": { "description": "question: What css-classes should be applied to showing this attribute?\n\nA list of css-classes to apply to the entire tagRendering.\nThese classes are applied in 'answer'-mode, not in question mode\nThis is only for advanced users.\n\nValues are split on ` ` (space)", "type": "string" } }, "additionalProperties": false }, { "type": "string" } ], "description": "This is mostly useful for items that face a specific direction, such as surveillance cameras\nThis is interpreted as css property for 'rotate', thus has to end with 'deg', e.g. `90deg`, `{direction}deg`, `calc(90deg - {camera:direction}deg)``" }, { "path": [ "pointRendering", "rotation", "render" ], "required": false, "hints": { "typehint": "rendered", "question": "What text should be rendered?" }, "type": [ { "$ref": "#/definitions/Record" }, { "type": "object", "properties": { "special": { "allOf": [ { "$ref": "#/definitions/Record>" }, { "type": "object", "properties": { "type": { "type": "string" } }, "required": [ "type" ] } ] } }, "required": [ "special" ] }, { "type": "string" } ], "description": "This piece of text will be shown in the infobox.\nNote that \"&LBRACEkey&RBRACE\"-parts are substituted by the corresponding values of the element.\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`" }, { "path": [ "pointRendering", "rotation", "icon" ], "required": false, "hints": { "typehint": "icon", "question": "what icon should be shown next to the 'render' value?" }, "type": [ { "type": "object", "properties": { "path": { "description": "The path to the icon\nType: icon", "type": "string" }, "class": { "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)", "type": "string" } }, "required": [ "path" ] }, { "type": "string" } ], "description": "An icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value" }, { "path": [ "pointRendering", "rotation", "icon", "path" ], "required": true, "hints": { "typehint": "icon" }, "type": "string", "description": "The path to the icon" }, { "path": [ "pointRendering", "rotation", "icon", "class" ], "required": false, "hints": {}, "type": "string", "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)" }, { "path": [ "pointRendering", "rotation", "condition" ], "required": false, "hints": { "question": "When should this item be shown?" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "$ref": "#/definitions/{or:TagConfigJson[];}" }, { "type": "string" } ], "description": "Only show this tagrendering (or ask the question) if the selected object also matches the tags specified as `condition`.\nThis is useful to ask a follow-up question.\nFor example, within toilets, asking _where_ the diaper changing table is is only useful _if_ there is one.\nThis can be done by adding `\"condition\": \"changing_table=yes\"`\nA full example would be:\n```json\n {\n \"question\": \"Where is the changing table located?\",\n \"render\": \"The changing table is located at {changing_table:location}\",\n \"condition\": \"changing_table=yes\",\n \"freeform\": {\n \"key\": \"changing_table:location\",\n \"inline\": true\n },\n \"mappings\": [\n {\n \"then\": \"The changing table is in the toilet for women.\",\n \"if\": \"changing_table:location=female_toilet\"\n },\n {\n \"then\": \"The changing table is in the toilet for men.\",\n \"if\": \"changing_table:location=male_toilet\"\n },\n {\n \"if\": \"changing_table:location=wheelchair_toilet\",\n \"then\": \"The changing table is in the toilet for wheelchair users.\",\n },\n {\n \"if\": \"changing_table:location=dedicated_room\",\n \"then\": \"The changing table is in a dedicated room. \",\n }\n ],\n \"id\": \"toilet-changing_table:location\"\n },\n```" }, { "path": [ "pointRendering", "rotation", "condition", "and" ], "required": false, "hints": { "typehint": "tag" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" }, { "path": [ "pointRendering", "rotation", "condition", "or" ], "required": false, "hints": { "typehint": "tag" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" }, { "path": [ "pointRendering", "rotation", "metacondition" ], "required": false, "hints": { "question": "When should this item be shown (including special conditions)?" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "$ref": "#/definitions/{or:TagConfigJson[];}" }, { "type": "string" } ], "description": "If set, this tag will be evaluated agains the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options.\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_" }, { "path": [ "pointRendering", "rotation", "metacondition", "and" ], "required": false, "hints": { "typehint": "tag" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" }, { "path": [ "pointRendering", "rotation", "metacondition", "or" ], "required": false, "hints": { "typehint": "tag" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" }, { "path": [ "pointRendering", "rotation", "freeform" ], "required": false, "hints": { "question": "Should a freeform text field be shown?", "ifunset": "Do not add a freeform text field" }, "type": "object", "description": "Allow freeform text input from the user" }, { "path": [ "pointRendering", "rotation", "freeform", "key" ], "required": true, "hints": {}, "type": "string", "description": "What attribute should be filled out\nIf this key is present in the feature, then 'render' is used to display the value.\nIf this is undefined, the rendering is _always_ shown" }, { "path": [ "pointRendering", "rotation", "mappings" ], "required": false, "hints": {}, "type": "array", "description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes" }, { "path": [ "pointRendering", "rotation", "mappings", "if" ], "required": true, "hints": { "typehint": "tag", "question": "When should this single mapping match?" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "If this condition is met, then the text under `then` will be shown.\nIf no value matches, and the user selects this mapping as an option, then these tags will be uploaded to OSM.\nFor example: {'if': 'diet:vegetarion=yes', 'then':'A vegetarian option is offered here'}\nThis can be an substituting-tag as well, e.g. {'if': 'addr:street:={_calculated_nearby_streetname}', 'then': '{_calculated_nearby_streetname}'}" }, { "path": [ "pointRendering", "rotation", "mappings", "then" ], "required": true, "hints": { "typehint": "rendered", "question": "What text should be shown?" }, "type": [ { "$ref": "#/definitions/Record" }, { "type": "string" } ], "description": "If the condition `if` is met, the text `then` will be rendered.\nIf not known yet, the user will be presented with `then` as an option" }, { "path": [ "pointRendering", "rotation", "mappings", "icon" ], "required": false, "hints": { "typehint": "icon", "question": "What icon should be added to this mapping?", "inline": " {icon}" }, "type": [ { "type": "object", "properties": { "path": { "description": "The path to the icon\nType: icon", "type": "string" }, "class": { "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)", "type": "string" } }, "required": [ "path" ] }, { "type": "string" } ], "description": "An icon supporting this mapping; typically shown pretty small" }, { "path": [ "pointRendering", "rotation", "mappings", "icon", "path" ], "required": true, "hints": { "typehint": "icon" }, "type": "string", "description": "The path to the icon" }, { "path": [ "pointRendering", "rotation", "mappings", "icon", "class" ], "required": false, "hints": {}, "type": "string", "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)" }, { "path": [ "pointRendering", "rotation", "description" ], "required": false, "hints": {}, "type": [ { "$ref": "#/definitions/Record" }, { "type": "string" } ], "description": "A human-readable text explaining what this tagRendering does.\nMostly used for the shared tagrenderings" }, { "path": [ "pointRendering", "rotation", "classes" ], "required": false, "hints": { "question": "What css-classes should be applied to showing this attribute?" }, "type": "string", "description": "A list of css-classes to apply to the entire tagRendering.\nThese classes are applied in 'answer'-mode, not in question mode\nThis is only for advanced users.\nValues are split on ` ` (space)" }, { "path": [ "pointRendering", "label" ], "required": false, "hints": { "types": "Dynamic value | string", "question": "What label should be shown beneath the marker?", "inline": "Always show label {value} beneath the marker" }, "type": [ { "description": "A TagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nFor an _editable_ tagRendering, use 'QuestionableTagRenderingConfigJson' instead, which extends this one", "type": "object", "properties": { "render": { "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nNote that \"&LBRACEkey&RBRACE\"-parts are substituted by the corresponding values of the element.\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered", "anyOf": [ { "$ref": "#/definitions/Record" }, { "type": "object", "properties": { "special": { "allOf": [ { "$ref": "#/definitions/Record>" }, { "type": "object", "properties": { "type": { "type": "string" } }, "required": [ "type" ] } ] } }, "required": [ "special" ] }, { "type": "string" } ] }, "icon": { "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon", "anyOf": [ { "type": "object", "properties": { "path": { "description": "The path to the icon\nType: icon", "type": "string" }, "class": { "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)", "type": "string" } }, "required": [ "path" ] }, { "type": "string" } ] }, "condition": { "description": "question: When should this item be shown?\n\nOnly show this tagrendering (or ask the question) if the selected object also matches the tags specified as `condition`.\n\nThis is useful to ask a follow-up question.\nFor example, within toilets, asking _where_ the diaper changing table is is only useful _if_ there is one.\nThis can be done by adding `\"condition\": \"changing_table=yes\"`\n\nA full example would be:\n```json\n {\n \"question\": \"Where is the changing table located?\",\n \"render\": \"The changing table is located at {changing_table:location}\",\n \"condition\": \"changing_table=yes\",\n \"freeform\": {\n \"key\": \"changing_table:location\",\n \"inline\": true\n },\n \"mappings\": [\n {\n \"then\": \"The changing table is in the toilet for women.\",\n \"if\": \"changing_table:location=female_toilet\"\n },\n {\n \"then\": \"The changing table is in the toilet for men.\",\n \"if\": \"changing_table:location=male_toilet\"\n },\n {\n \"if\": \"changing_table:location=wheelchair_toilet\",\n \"then\": \"The changing table is in the toilet for wheelchair users.\",\n },\n {\n \"if\": \"changing_table:location=dedicated_room\",\n \"then\": \"The changing table is in a dedicated room. \",\n }\n ],\n \"id\": \"toilet-changing_table:location\"\n },\n```", "anyOf": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "$ref": "#/definitions/{or:TagConfigJson[];}" }, { "type": "string" } ] }, "metacondition": { "description": "question: When should this item be shown (including special conditions)?\n\nIf set, this tag will be evaluated agains the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options.\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_", "anyOf": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "$ref": "#/definitions/{or:TagConfigJson[];}" }, { "type": "string" } ] }, "freeform": { "description": "question: Should a freeform text field be shown?\nAllow freeform text input from the user\nifunset: Do not add a freeform text field", "type": "object", "properties": { "key": { "description": "What attribute should be filled out\nIf this key is present in the feature, then 'render' is used to display the value.\nIf this is undefined, the rendering is _always_ shown", "type": "string" } }, "required": [ "key" ] }, "mappings": { "description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes", "type": "array", "items": { "type": "object", "properties": { "if": { "$ref": "#/definitions/TagConfigJson", "description": "question: When should this single mapping match?\n\nIf this condition is met, then the text under `then` will be shown.\nIf no value matches, and the user selects this mapping as an option, then these tags will be uploaded to OSM.\n\nFor example: {'if': 'diet:vegetarion=yes', 'then':'A vegetarian option is offered here'}\n\nThis can be an substituting-tag as well, e.g. {'if': 'addr:street:={_calculated_nearby_streetname}', 'then': '{_calculated_nearby_streetname}'}" }, "then": { "description": "question: What text should be shown?\n\nIf the condition `if` is met, the text `then` will be rendered.\nIf not known yet, the user will be presented with `then` as an option\nType: rendered", "anyOf": [ { "$ref": "#/definitions/Record" }, { "type": "string" } ] }, "icon": { "description": "question: What icon should be added to this mapping?\nAn icon supporting this mapping; typically shown pretty small\ninline: {icon}\nType: icon", "anyOf": [ { "type": "object", "properties": { "path": { "description": "The path to the icon\nType: icon", "type": "string" }, "class": { "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)", "type": "string" } }, "required": [ "path" ] }, { "type": "string" } ] } }, "required": [ "if", "then" ] } }, "description": { "description": "A human-readable text explaining what this tagRendering does.\nMostly used for the shared tagrenderings", "anyOf": [ { "$ref": "#/definitions/Record" }, { "type": "string" } ] }, "classes": { "description": "question: What css-classes should be applied to showing this attribute?\n\nA list of css-classes to apply to the entire tagRendering.\nThese classes are applied in 'answer'-mode, not in question mode\nThis is only for advanced users.\n\nValues are split on ` ` (space)", "type": "string" } }, "additionalProperties": false }, { "type": "string" } ], "description": "For example: `<div style=\"background: white\">{name}</div>`\nIf the icon is undefined, then the label is shown in the center of the feature." }, { "path": [ "pointRendering", "label", "render" ], "required": false, "hints": { "typehint": "rendered", "question": "What text should be rendered?" }, "type": [ { "$ref": "#/definitions/Record" }, { "type": "object", "properties": { "special": { "allOf": [ { "$ref": "#/definitions/Record>" }, { "type": "object", "properties": { "type": { "type": "string" } }, "required": [ "type" ] } ] } }, "required": [ "special" ] }, { "type": "string" } ], "description": "This piece of text will be shown in the infobox.\nNote that \"&LBRACEkey&RBRACE\"-parts are substituted by the corresponding values of the element.\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`" }, { "path": [ "pointRendering", "label", "icon" ], "required": false, "hints": { "typehint": "icon", "question": "what icon should be shown next to the 'render' value?" }, "type": [ { "type": "object", "properties": { "path": { "description": "The path to the icon\nType: icon", "type": "string" }, "class": { "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)", "type": "string" } }, "required": [ "path" ] }, { "type": "string" } ], "description": "An icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value" }, { "path": [ "pointRendering", "label", "icon", "path" ], "required": true, "hints": { "typehint": "icon" }, "type": "string", "description": "The path to the icon" }, { "path": [ "pointRendering", "label", "icon", "class" ], "required": false, "hints": {}, "type": "string", "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)" }, { "path": [ "pointRendering", "label", "condition" ], "required": false, "hints": { "question": "When should this item be shown?" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "$ref": "#/definitions/{or:TagConfigJson[];}" }, { "type": "string" } ], "description": "Only show this tagrendering (or ask the question) if the selected object also matches the tags specified as `condition`.\nThis is useful to ask a follow-up question.\nFor example, within toilets, asking _where_ the diaper changing table is is only useful _if_ there is one.\nThis can be done by adding `\"condition\": \"changing_table=yes\"`\nA full example would be:\n```json\n {\n \"question\": \"Where is the changing table located?\",\n \"render\": \"The changing table is located at {changing_table:location}\",\n \"condition\": \"changing_table=yes\",\n \"freeform\": {\n \"key\": \"changing_table:location\",\n \"inline\": true\n },\n \"mappings\": [\n {\n \"then\": \"The changing table is in the toilet for women.\",\n \"if\": \"changing_table:location=female_toilet\"\n },\n {\n \"then\": \"The changing table is in the toilet for men.\",\n \"if\": \"changing_table:location=male_toilet\"\n },\n {\n \"if\": \"changing_table:location=wheelchair_toilet\",\n \"then\": \"The changing table is in the toilet for wheelchair users.\",\n },\n {\n \"if\": \"changing_table:location=dedicated_room\",\n \"then\": \"The changing table is in a dedicated room. \",\n }\n ],\n \"id\": \"toilet-changing_table:location\"\n },\n```" }, { "path": [ "pointRendering", "label", "condition", "and" ], "required": false, "hints": { "typehint": "tag" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" }, { "path": [ "pointRendering", "label", "condition", "or" ], "required": false, "hints": { "typehint": "tag" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" }, { "path": [ "pointRendering", "label", "metacondition" ], "required": false, "hints": { "question": "When should this item be shown (including special conditions)?" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "$ref": "#/definitions/{or:TagConfigJson[];}" }, { "type": "string" } ], "description": "If set, this tag will be evaluated agains the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options.\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_" }, { "path": [ "pointRendering", "label", "metacondition", "and" ], "required": false, "hints": { "typehint": "tag" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" }, { "path": [ "pointRendering", "label", "metacondition", "or" ], "required": false, "hints": { "typehint": "tag" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" }, { "path": [ "pointRendering", "label", "freeform" ], "required": false, "hints": { "question": "Should a freeform text field be shown?", "ifunset": "Do not add a freeform text field" }, "type": "object", "description": "Allow freeform text input from the user" }, { "path": [ "pointRendering", "label", "freeform", "key" ], "required": true, "hints": {}, "type": "string", "description": "What attribute should be filled out\nIf this key is present in the feature, then 'render' is used to display the value.\nIf this is undefined, the rendering is _always_ shown" }, { "path": [ "pointRendering", "label", "mappings" ], "required": false, "hints": {}, "type": "array", "description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes" }, { "path": [ "pointRendering", "label", "mappings", "if" ], "required": true, "hints": { "typehint": "tag", "question": "When should this single mapping match?" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "If this condition is met, then the text under `then` will be shown.\nIf no value matches, and the user selects this mapping as an option, then these tags will be uploaded to OSM.\nFor example: {'if': 'diet:vegetarion=yes', 'then':'A vegetarian option is offered here'}\nThis can be an substituting-tag as well, e.g. {'if': 'addr:street:={_calculated_nearby_streetname}', 'then': '{_calculated_nearby_streetname}'}" }, { "path": [ "pointRendering", "label", "mappings", "then" ], "required": true, "hints": { "typehint": "rendered", "question": "What text should be shown?" }, "type": [ { "$ref": "#/definitions/Record" }, { "type": "string" } ], "description": "If the condition `if` is met, the text `then` will be rendered.\nIf not known yet, the user will be presented with `then` as an option" }, { "path": [ "pointRendering", "label", "mappings", "icon" ], "required": false, "hints": { "typehint": "icon", "question": "What icon should be added to this mapping?", "inline": " {icon}" }, "type": [ { "type": "object", "properties": { "path": { "description": "The path to the icon\nType: icon", "type": "string" }, "class": { "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)", "type": "string" } }, "required": [ "path" ] }, { "type": "string" } ], "description": "An icon supporting this mapping; typically shown pretty small" }, { "path": [ "pointRendering", "label", "mappings", "icon", "path" ], "required": true, "hints": { "typehint": "icon" }, "type": "string", "description": "The path to the icon" }, { "path": [ "pointRendering", "label", "mappings", "icon", "class" ], "required": false, "hints": {}, "type": "string", "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)" }, { "path": [ "pointRendering", "label", "description" ], "required": false, "hints": {}, "type": [ { "$ref": "#/definitions/Record" }, { "type": "string" } ], "description": "A human-readable text explaining what this tagRendering does.\nMostly used for the shared tagrenderings" }, { "path": [ "pointRendering", "label", "classes" ], "required": false, "hints": { "question": "What css-classes should be applied to showing this attribute?" }, "type": "string", "description": "A list of css-classes to apply to the entire tagRendering.\nThese classes are applied in 'answer'-mode, not in question mode\nThis is only for advanced users.\nValues are split on ` ` (space)" }, { "path": [ "pointRendering", "css" ], "required": false, "hints": { "types": "Dynamic value ; string", "question": "What CSS should be applied to the entire marker?", "inline": "Apply CSS-style {value} to the _entire marker_" }, "type": [ { "description": "A TagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nFor an _editable_ tagRendering, use 'QuestionableTagRenderingConfigJson' instead, which extends this one", "type": "object", "properties": { "render": { "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nNote that \"&LBRACEkey&RBRACE\"-parts are substituted by the corresponding values of the element.\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered", "anyOf": [ { "$ref": "#/definitions/Record" }, { "type": "object", "properties": { "special": { "allOf": [ { "$ref": "#/definitions/Record>" }, { "type": "object", "properties": { "type": { "type": "string" } }, "required": [ "type" ] } ] } }, "required": [ "special" ] }, { "type": "string" } ] }, "icon": { "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon", "anyOf": [ { "type": "object", "properties": { "path": { "description": "The path to the icon\nType: icon", "type": "string" }, "class": { "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)", "type": "string" } }, "required": [ "path" ] }, { "type": "string" } ] }, "condition": { "description": "question: When should this item be shown?\n\nOnly show this tagrendering (or ask the question) if the selected object also matches the tags specified as `condition`.\n\nThis is useful to ask a follow-up question.\nFor example, within toilets, asking _where_ the diaper changing table is is only useful _if_ there is one.\nThis can be done by adding `\"condition\": \"changing_table=yes\"`\n\nA full example would be:\n```json\n {\n \"question\": \"Where is the changing table located?\",\n \"render\": \"The changing table is located at {changing_table:location}\",\n \"condition\": \"changing_table=yes\",\n \"freeform\": {\n \"key\": \"changing_table:location\",\n \"inline\": true\n },\n \"mappings\": [\n {\n \"then\": \"The changing table is in the toilet for women.\",\n \"if\": \"changing_table:location=female_toilet\"\n },\n {\n \"then\": \"The changing table is in the toilet for men.\",\n \"if\": \"changing_table:location=male_toilet\"\n },\n {\n \"if\": \"changing_table:location=wheelchair_toilet\",\n \"then\": \"The changing table is in the toilet for wheelchair users.\",\n },\n {\n \"if\": \"changing_table:location=dedicated_room\",\n \"then\": \"The changing table is in a dedicated room. \",\n }\n ],\n \"id\": \"toilet-changing_table:location\"\n },\n```", "anyOf": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "$ref": "#/definitions/{or:TagConfigJson[];}" }, { "type": "string" } ] }, "metacondition": { "description": "question: When should this item be shown (including special conditions)?\n\nIf set, this tag will be evaluated agains the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options.\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_", "anyOf": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "$ref": "#/definitions/{or:TagConfigJson[];}" }, { "type": "string" } ] }, "freeform": { "description": "question: Should a freeform text field be shown?\nAllow freeform text input from the user\nifunset: Do not add a freeform text field", "type": "object", "properties": { "key": { "description": "What attribute should be filled out\nIf this key is present in the feature, then 'render' is used to display the value.\nIf this is undefined, the rendering is _always_ shown", "type": "string" } }, "required": [ "key" ] }, "mappings": { "description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes", "type": "array", "items": { "type": "object", "properties": { "if": { "$ref": "#/definitions/TagConfigJson", "description": "question: When should this single mapping match?\n\nIf this condition is met, then the text under `then` will be shown.\nIf no value matches, and the user selects this mapping as an option, then these tags will be uploaded to OSM.\n\nFor example: {'if': 'diet:vegetarion=yes', 'then':'A vegetarian option is offered here'}\n\nThis can be an substituting-tag as well, e.g. {'if': 'addr:street:={_calculated_nearby_streetname}', 'then': '{_calculated_nearby_streetname}'}" }, "then": { "description": "question: What text should be shown?\n\nIf the condition `if` is met, the text `then` will be rendered.\nIf not known yet, the user will be presented with `then` as an option\nType: rendered", "anyOf": [ { "$ref": "#/definitions/Record" }, { "type": "string" } ] }, "icon": { "description": "question: What icon should be added to this mapping?\nAn icon supporting this mapping; typically shown pretty small\ninline: {icon}\nType: icon", "anyOf": [ { "type": "object", "properties": { "path": { "description": "The path to the icon\nType: icon", "type": "string" }, "class": { "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)", "type": "string" } }, "required": [ "path" ] }, { "type": "string" } ] } }, "required": [ "if", "then" ] } }, "description": { "description": "A human-readable text explaining what this tagRendering does.\nMostly used for the shared tagrenderings", "anyOf": [ { "$ref": "#/definitions/Record" }, { "type": "string" } ] }, "classes": { "description": "question: What css-classes should be applied to showing this attribute?\n\nA list of css-classes to apply to the entire tagRendering.\nThese classes are applied in 'answer'-mode, not in question mode\nThis is only for advanced users.\n\nValues are split on ` ` (space)", "type": "string" } }, "additionalProperties": false }, { "type": "string" } ], "description": "You can set the css-properties here, e.g. `background: red; font-size: 12px; `\nThis will be applied to the _container_ containing both the marker and the label" }, { "path": [ "pointRendering", "css", "render" ], "required": false, "hints": { "typehint": "rendered", "question": "What text should be rendered?" }, "type": [ { "$ref": "#/definitions/Record" }, { "type": "object", "properties": { "special": { "allOf": [ { "$ref": "#/definitions/Record>" }, { "type": "object", "properties": { "type": { "type": "string" } }, "required": [ "type" ] } ] } }, "required": [ "special" ] }, { "type": "string" } ], "description": "This piece of text will be shown in the infobox.\nNote that \"&LBRACEkey&RBRACE\"-parts are substituted by the corresponding values of the element.\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`" }, { "path": [ "pointRendering", "css", "icon" ], "required": false, "hints": { "typehint": "icon", "question": "what icon should be shown next to the 'render' value?" }, "type": [ { "type": "object", "properties": { "path": { "description": "The path to the icon\nType: icon", "type": "string" }, "class": { "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)", "type": "string" } }, "required": [ "path" ] }, { "type": "string" } ], "description": "An icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value" }, { "path": [ "pointRendering", "css", "icon", "path" ], "required": true, "hints": { "typehint": "icon" }, "type": "string", "description": "The path to the icon" }, { "path": [ "pointRendering", "css", "icon", "class" ], "required": false, "hints": {}, "type": "string", "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)" }, { "path": [ "pointRendering", "css", "condition" ], "required": false, "hints": { "question": "When should this item be shown?" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "$ref": "#/definitions/{or:TagConfigJson[];}" }, { "type": "string" } ], "description": "Only show this tagrendering (or ask the question) if the selected object also matches the tags specified as `condition`.\nThis is useful to ask a follow-up question.\nFor example, within toilets, asking _where_ the diaper changing table is is only useful _if_ there is one.\nThis can be done by adding `\"condition\": \"changing_table=yes\"`\nA full example would be:\n```json\n {\n \"question\": \"Where is the changing table located?\",\n \"render\": \"The changing table is located at {changing_table:location}\",\n \"condition\": \"changing_table=yes\",\n \"freeform\": {\n \"key\": \"changing_table:location\",\n \"inline\": true\n },\n \"mappings\": [\n {\n \"then\": \"The changing table is in the toilet for women.\",\n \"if\": \"changing_table:location=female_toilet\"\n },\n {\n \"then\": \"The changing table is in the toilet for men.\",\n \"if\": \"changing_table:location=male_toilet\"\n },\n {\n \"if\": \"changing_table:location=wheelchair_toilet\",\n \"then\": \"The changing table is in the toilet for wheelchair users.\",\n },\n {\n \"if\": \"changing_table:location=dedicated_room\",\n \"then\": \"The changing table is in a dedicated room. \",\n }\n ],\n \"id\": \"toilet-changing_table:location\"\n },\n```" }, { "path": [ "pointRendering", "css", "condition", "and" ], "required": false, "hints": { "typehint": "tag" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" }, { "path": [ "pointRendering", "css", "condition", "or" ], "required": false, "hints": { "typehint": "tag" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" }, { "path": [ "pointRendering", "css", "metacondition" ], "required": false, "hints": { "question": "When should this item be shown (including special conditions)?" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "$ref": "#/definitions/{or:TagConfigJson[];}" }, { "type": "string" } ], "description": "If set, this tag will be evaluated agains the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options.\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_" }, { "path": [ "pointRendering", "css", "metacondition", "and" ], "required": false, "hints": { "typehint": "tag" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" }, { "path": [ "pointRendering", "css", "metacondition", "or" ], "required": false, "hints": { "typehint": "tag" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" }, { "path": [ "pointRendering", "css", "freeform" ], "required": false, "hints": { "question": "Should a freeform text field be shown?", "ifunset": "Do not add a freeform text field" }, "type": "object", "description": "Allow freeform text input from the user" }, { "path": [ "pointRendering", "css", "freeform", "key" ], "required": true, "hints": {}, "type": "string", "description": "What attribute should be filled out\nIf this key is present in the feature, then 'render' is used to display the value.\nIf this is undefined, the rendering is _always_ shown" }, { "path": [ "pointRendering", "css", "mappings" ], "required": false, "hints": {}, "type": "array", "description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes" }, { "path": [ "pointRendering", "css", "mappings", "if" ], "required": true, "hints": { "typehint": "tag", "question": "When should this single mapping match?" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "If this condition is met, then the text under `then` will be shown.\nIf no value matches, and the user selects this mapping as an option, then these tags will be uploaded to OSM.\nFor example: {'if': 'diet:vegetarion=yes', 'then':'A vegetarian option is offered here'}\nThis can be an substituting-tag as well, e.g. {'if': 'addr:street:={_calculated_nearby_streetname}', 'then': '{_calculated_nearby_streetname}'}" }, { "path": [ "pointRendering", "css", "mappings", "then" ], "required": true, "hints": { "typehint": "rendered", "question": "What text should be shown?" }, "type": [ { "$ref": "#/definitions/Record" }, { "type": "string" } ], "description": "If the condition `if` is met, the text `then` will be rendered.\nIf not known yet, the user will be presented with `then` as an option" }, { "path": [ "pointRendering", "css", "mappings", "icon" ], "required": false, "hints": { "typehint": "icon", "question": "What icon should be added to this mapping?", "inline": " {icon}" }, "type": [ { "type": "object", "properties": { "path": { "description": "The path to the icon\nType: icon", "type": "string" }, "class": { "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)", "type": "string" } }, "required": [ "path" ] }, { "type": "string" } ], "description": "An icon supporting this mapping; typically shown pretty small" }, { "path": [ "pointRendering", "css", "mappings", "icon", "path" ], "required": true, "hints": { "typehint": "icon" }, "type": "string", "description": "The path to the icon" }, { "path": [ "pointRendering", "css", "mappings", "icon", "class" ], "required": false, "hints": {}, "type": "string", "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)" }, { "path": [ "pointRendering", "css", "description" ], "required": false, "hints": {}, "type": [ { "$ref": "#/definitions/Record" }, { "type": "string" } ], "description": "A human-readable text explaining what this tagRendering does.\nMostly used for the shared tagrenderings" }, { "path": [ "pointRendering", "css", "classes" ], "required": false, "hints": { "question": "What css-classes should be applied to showing this attribute?" }, "type": "string", "description": "A list of css-classes to apply to the entire tagRendering.\nThese classes are applied in 'answer'-mode, not in question mode\nThis is only for advanced users.\nValues are split on ` ` (space)" }, { "path": [ "pointRendering", "cssClasses" ], "required": false, "hints": { "types": "Dynamic value ; string", "question": "Which CSS-classes should be applied to the entire marker?", "inline": "Apply CSS-classes {value} to the entire container" }, "type": [ { "description": "A TagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nFor an _editable_ tagRendering, use 'QuestionableTagRenderingConfigJson' instead, which extends this one", "type": "object", "properties": { "render": { "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nNote that \"&LBRACEkey&RBRACE\"-parts are substituted by the corresponding values of the element.\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered", "anyOf": [ { "$ref": "#/definitions/Record" }, { "type": "object", "properties": { "special": { "allOf": [ { "$ref": "#/definitions/Record>" }, { "type": "object", "properties": { "type": { "type": "string" } }, "required": [ "type" ] } ] } }, "required": [ "special" ] }, { "type": "string" } ] }, "icon": { "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon", "anyOf": [ { "type": "object", "properties": { "path": { "description": "The path to the icon\nType: icon", "type": "string" }, "class": { "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)", "type": "string" } }, "required": [ "path" ] }, { "type": "string" } ] }, "condition": { "description": "question: When should this item be shown?\n\nOnly show this tagrendering (or ask the question) if the selected object also matches the tags specified as `condition`.\n\nThis is useful to ask a follow-up question.\nFor example, within toilets, asking _where_ the diaper changing table is is only useful _if_ there is one.\nThis can be done by adding `\"condition\": \"changing_table=yes\"`\n\nA full example would be:\n```json\n {\n \"question\": \"Where is the changing table located?\",\n \"render\": \"The changing table is located at {changing_table:location}\",\n \"condition\": \"changing_table=yes\",\n \"freeform\": {\n \"key\": \"changing_table:location\",\n \"inline\": true\n },\n \"mappings\": [\n {\n \"then\": \"The changing table is in the toilet for women.\",\n \"if\": \"changing_table:location=female_toilet\"\n },\n {\n \"then\": \"The changing table is in the toilet for men.\",\n \"if\": \"changing_table:location=male_toilet\"\n },\n {\n \"if\": \"changing_table:location=wheelchair_toilet\",\n \"then\": \"The changing table is in the toilet for wheelchair users.\",\n },\n {\n \"if\": \"changing_table:location=dedicated_room\",\n \"then\": \"The changing table is in a dedicated room. \",\n }\n ],\n \"id\": \"toilet-changing_table:location\"\n },\n```", "anyOf": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "$ref": "#/definitions/{or:TagConfigJson[];}" }, { "type": "string" } ] }, "metacondition": { "description": "question: When should this item be shown (including special conditions)?\n\nIf set, this tag will be evaluated agains the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options.\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_", "anyOf": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "$ref": "#/definitions/{or:TagConfigJson[];}" }, { "type": "string" } ] }, "freeform": { "description": "question: Should a freeform text field be shown?\nAllow freeform text input from the user\nifunset: Do not add a freeform text field", "type": "object", "properties": { "key": { "description": "What attribute should be filled out\nIf this key is present in the feature, then 'render' is used to display the value.\nIf this is undefined, the rendering is _always_ shown", "type": "string" } }, "required": [ "key" ] }, "mappings": { "description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes", "type": "array", "items": { "type": "object", "properties": { "if": { "$ref": "#/definitions/TagConfigJson", "description": "question: When should this single mapping match?\n\nIf this condition is met, then the text under `then` will be shown.\nIf no value matches, and the user selects this mapping as an option, then these tags will be uploaded to OSM.\n\nFor example: {'if': 'diet:vegetarion=yes', 'then':'A vegetarian option is offered here'}\n\nThis can be an substituting-tag as well, e.g. {'if': 'addr:street:={_calculated_nearby_streetname}', 'then': '{_calculated_nearby_streetname}'}" }, "then": { "description": "question: What text should be shown?\n\nIf the condition `if` is met, the text `then` will be rendered.\nIf not known yet, the user will be presented with `then` as an option\nType: rendered", "anyOf": [ { "$ref": "#/definitions/Record" }, { "type": "string" } ] }, "icon": { "description": "question: What icon should be added to this mapping?\nAn icon supporting this mapping; typically shown pretty small\ninline: {icon}\nType: icon", "anyOf": [ { "type": "object", "properties": { "path": { "description": "The path to the icon\nType: icon", "type": "string" }, "class": { "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)", "type": "string" } }, "required": [ "path" ] }, { "type": "string" } ] } }, "required": [ "if", "then" ] } }, "description": { "description": "A human-readable text explaining what this tagRendering does.\nMostly used for the shared tagrenderings", "anyOf": [ { "$ref": "#/definitions/Record" }, { "type": "string" } ] }, "classes": { "description": "question: What css-classes should be applied to showing this attribute?\n\nA list of css-classes to apply to the entire tagRendering.\nThese classes are applied in 'answer'-mode, not in question mode\nThis is only for advanced users.\n\nValues are split on ` ` (space)", "type": "string" } }, "additionalProperties": false }, { "type": "string" } ], "description": "This will be applied to the _container_ containing both the marker and the label\nThe classes should be separated by a space (` `)\nYou can use most Tailwind-css classes, see https://tailwindcss.com/ for more information\nFor example: `center bg-gray-500 mx-2 my-1 rounded-full`" }, { "path": [ "pointRendering", "cssClasses", "render" ], "required": false, "hints": { "typehint": "rendered", "question": "What text should be rendered?" }, "type": [ { "$ref": "#/definitions/Record" }, { "type": "object", "properties": { "special": { "allOf": [ { "$ref": "#/definitions/Record>" }, { "type": "object", "properties": { "type": { "type": "string" } }, "required": [ "type" ] } ] } }, "required": [ "special" ] }, { "type": "string" } ], "description": "This piece of text will be shown in the infobox.\nNote that \"&LBRACEkey&RBRACE\"-parts are substituted by the corresponding values of the element.\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`" }, { "path": [ "pointRendering", "cssClasses", "icon" ], "required": false, "hints": { "typehint": "icon", "question": "what icon should be shown next to the 'render' value?" }, "type": [ { "type": "object", "properties": { "path": { "description": "The path to the icon\nType: icon", "type": "string" }, "class": { "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)", "type": "string" } }, "required": [ "path" ] }, { "type": "string" } ], "description": "An icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value" }, { "path": [ "pointRendering", "cssClasses", "icon", "path" ], "required": true, "hints": { "typehint": "icon" }, "type": "string", "description": "The path to the icon" }, { "path": [ "pointRendering", "cssClasses", "icon", "class" ], "required": false, "hints": {}, "type": "string", "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)" }, { "path": [ "pointRendering", "cssClasses", "condition" ], "required": false, "hints": { "question": "When should this item be shown?" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "$ref": "#/definitions/{or:TagConfigJson[];}" }, { "type": "string" } ], "description": "Only show this tagrendering (or ask the question) if the selected object also matches the tags specified as `condition`.\nThis is useful to ask a follow-up question.\nFor example, within toilets, asking _where_ the diaper changing table is is only useful _if_ there is one.\nThis can be done by adding `\"condition\": \"changing_table=yes\"`\nA full example would be:\n```json\n {\n \"question\": \"Where is the changing table located?\",\n \"render\": \"The changing table is located at {changing_table:location}\",\n \"condition\": \"changing_table=yes\",\n \"freeform\": {\n \"key\": \"changing_table:location\",\n \"inline\": true\n },\n \"mappings\": [\n {\n \"then\": \"The changing table is in the toilet for women.\",\n \"if\": \"changing_table:location=female_toilet\"\n },\n {\n \"then\": \"The changing table is in the toilet for men.\",\n \"if\": \"changing_table:location=male_toilet\"\n },\n {\n \"if\": \"changing_table:location=wheelchair_toilet\",\n \"then\": \"The changing table is in the toilet for wheelchair users.\",\n },\n {\n \"if\": \"changing_table:location=dedicated_room\",\n \"then\": \"The changing table is in a dedicated room. \",\n }\n ],\n \"id\": \"toilet-changing_table:location\"\n },\n```" }, { "path": [ "pointRendering", "cssClasses", "condition", "and" ], "required": false, "hints": { "typehint": "tag" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" }, { "path": [ "pointRendering", "cssClasses", "condition", "or" ], "required": false, "hints": { "typehint": "tag" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" }, { "path": [ "pointRendering", "cssClasses", "metacondition" ], "required": false, "hints": { "question": "When should this item be shown (including special conditions)?" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "$ref": "#/definitions/{or:TagConfigJson[];}" }, { "type": "string" } ], "description": "If set, this tag will be evaluated agains the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options.\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_" }, { "path": [ "pointRendering", "cssClasses", "metacondition", "and" ], "required": false, "hints": { "typehint": "tag" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" }, { "path": [ "pointRendering", "cssClasses", "metacondition", "or" ], "required": false, "hints": { "typehint": "tag" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" }, { "path": [ "pointRendering", "cssClasses", "freeform" ], "required": false, "hints": { "question": "Should a freeform text field be shown?", "ifunset": "Do not add a freeform text field" }, "type": "object", "description": "Allow freeform text input from the user" }, { "path": [ "pointRendering", "cssClasses", "freeform", "key" ], "required": true, "hints": {}, "type": "string", "description": "What attribute should be filled out\nIf this key is present in the feature, then 'render' is used to display the value.\nIf this is undefined, the rendering is _always_ shown" }, { "path": [ "pointRendering", "cssClasses", "mappings" ], "required": false, "hints": {}, "type": "array", "description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes" }, { "path": [ "pointRendering", "cssClasses", "mappings", "if" ], "required": true, "hints": { "typehint": "tag", "question": "When should this single mapping match?" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "If this condition is met, then the text under `then` will be shown.\nIf no value matches, and the user selects this mapping as an option, then these tags will be uploaded to OSM.\nFor example: {'if': 'diet:vegetarion=yes', 'then':'A vegetarian option is offered here'}\nThis can be an substituting-tag as well, e.g. {'if': 'addr:street:={_calculated_nearby_streetname}', 'then': '{_calculated_nearby_streetname}'}" }, { "path": [ "pointRendering", "cssClasses", "mappings", "then" ], "required": true, "hints": { "typehint": "rendered", "question": "What text should be shown?" }, "type": [ { "$ref": "#/definitions/Record" }, { "type": "string" } ], "description": "If the condition `if` is met, the text `then` will be rendered.\nIf not known yet, the user will be presented with `then` as an option" }, { "path": [ "pointRendering", "cssClasses", "mappings", "icon" ], "required": false, "hints": { "typehint": "icon", "question": "What icon should be added to this mapping?", "inline": " {icon}" }, "type": [ { "type": "object", "properties": { "path": { "description": "The path to the icon\nType: icon", "type": "string" }, "class": { "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)", "type": "string" } }, "required": [ "path" ] }, { "type": "string" } ], "description": "An icon supporting this mapping; typically shown pretty small" }, { "path": [ "pointRendering", "cssClasses", "mappings", "icon", "path" ], "required": true, "hints": { "typehint": "icon" }, "type": "string", "description": "The path to the icon" }, { "path": [ "pointRendering", "cssClasses", "mappings", "icon", "class" ], "required": false, "hints": {}, "type": "string", "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)" }, { "path": [ "pointRendering", "cssClasses", "description" ], "required": false, "hints": {}, "type": [ { "$ref": "#/definitions/Record" }, { "type": "string" } ], "description": "A human-readable text explaining what this tagRendering does.\nMostly used for the shared tagrenderings" }, { "path": [ "pointRendering", "cssClasses", "classes" ], "required": false, "hints": { "question": "What css-classes should be applied to showing this attribute?" }, "type": "string", "description": "A list of css-classes to apply to the entire tagRendering.\nThese classes are applied in 'answer'-mode, not in question mode\nThis is only for advanced users.\nValues are split on ` ` (space)" }, { "path": [ "pointRendering", "labelCss" ], "required": false, "hints": { "types": "Dynamic value ; string", "question": "What CSS should be applied to the label?", "inline": "Apply CSS-style {value} to the label" }, "type": [ { "description": "A TagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nFor an _editable_ tagRendering, use 'QuestionableTagRenderingConfigJson' instead, which extends this one", "type": "object", "properties": { "render": { "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nNote that \"&LBRACEkey&RBRACE\"-parts are substituted by the corresponding values of the element.\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered", "anyOf": [ { "$ref": "#/definitions/Record" }, { "type": "object", "properties": { "special": { "allOf": [ { "$ref": "#/definitions/Record>" }, { "type": "object", "properties": { "type": { "type": "string" } }, "required": [ "type" ] } ] } }, "required": [ "special" ] }, { "type": "string" } ] }, "icon": { "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon", "anyOf": [ { "type": "object", "properties": { "path": { "description": "The path to the icon\nType: icon", "type": "string" }, "class": { "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)", "type": "string" } }, "required": [ "path" ] }, { "type": "string" } ] }, "condition": { "description": "question: When should this item be shown?\n\nOnly show this tagrendering (or ask the question) if the selected object also matches the tags specified as `condition`.\n\nThis is useful to ask a follow-up question.\nFor example, within toilets, asking _where_ the diaper changing table is is only useful _if_ there is one.\nThis can be done by adding `\"condition\": \"changing_table=yes\"`\n\nA full example would be:\n```json\n {\n \"question\": \"Where is the changing table located?\",\n \"render\": \"The changing table is located at {changing_table:location}\",\n \"condition\": \"changing_table=yes\",\n \"freeform\": {\n \"key\": \"changing_table:location\",\n \"inline\": true\n },\n \"mappings\": [\n {\n \"then\": \"The changing table is in the toilet for women.\",\n \"if\": \"changing_table:location=female_toilet\"\n },\n {\n \"then\": \"The changing table is in the toilet for men.\",\n \"if\": \"changing_table:location=male_toilet\"\n },\n {\n \"if\": \"changing_table:location=wheelchair_toilet\",\n \"then\": \"The changing table is in the toilet for wheelchair users.\",\n },\n {\n \"if\": \"changing_table:location=dedicated_room\",\n \"then\": \"The changing table is in a dedicated room. \",\n }\n ],\n \"id\": \"toilet-changing_table:location\"\n },\n```", "anyOf": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "$ref": "#/definitions/{or:TagConfigJson[];}" }, { "type": "string" } ] }, "metacondition": { "description": "question: When should this item be shown (including special conditions)?\n\nIf set, this tag will be evaluated agains the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options.\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_", "anyOf": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "$ref": "#/definitions/{or:TagConfigJson[];}" }, { "type": "string" } ] }, "freeform": { "description": "question: Should a freeform text field be shown?\nAllow freeform text input from the user\nifunset: Do not add a freeform text field", "type": "object", "properties": { "key": { "description": "What attribute should be filled out\nIf this key is present in the feature, then 'render' is used to display the value.\nIf this is undefined, the rendering is _always_ shown", "type": "string" } }, "required": [ "key" ] }, "mappings": { "description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes", "type": "array", "items": { "type": "object", "properties": { "if": { "$ref": "#/definitions/TagConfigJson", "description": "question: When should this single mapping match?\n\nIf this condition is met, then the text under `then` will be shown.\nIf no value matches, and the user selects this mapping as an option, then these tags will be uploaded to OSM.\n\nFor example: {'if': 'diet:vegetarion=yes', 'then':'A vegetarian option is offered here'}\n\nThis can be an substituting-tag as well, e.g. {'if': 'addr:street:={_calculated_nearby_streetname}', 'then': '{_calculated_nearby_streetname}'}" }, "then": { "description": "question: What text should be shown?\n\nIf the condition `if` is met, the text `then` will be rendered.\nIf not known yet, the user will be presented with `then` as an option\nType: rendered", "anyOf": [ { "$ref": "#/definitions/Record" }, { "type": "string" } ] }, "icon": { "description": "question: What icon should be added to this mapping?\nAn icon supporting this mapping; typically shown pretty small\ninline: {icon}\nType: icon", "anyOf": [ { "type": "object", "properties": { "path": { "description": "The path to the icon\nType: icon", "type": "string" }, "class": { "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)", "type": "string" } }, "required": [ "path" ] }, { "type": "string" } ] } }, "required": [ "if", "then" ] } }, "description": { "description": "A human-readable text explaining what this tagRendering does.\nMostly used for the shared tagrenderings", "anyOf": [ { "$ref": "#/definitions/Record" }, { "type": "string" } ] }, "classes": { "description": "question: What css-classes should be applied to showing this attribute?\n\nA list of css-classes to apply to the entire tagRendering.\nThese classes are applied in 'answer'-mode, not in question mode\nThis is only for advanced users.\n\nValues are split on ` ` (space)", "type": "string" } }, "additionalProperties": false }, { "type": "string" } ], "description": "You can set the css-properties here, e.g. `background: red; font-size: 12px; `" }, { "path": [ "pointRendering", "labelCss", "render" ], "required": false, "hints": { "typehint": "rendered", "question": "What text should be rendered?" }, "type": [ { "$ref": "#/definitions/Record" }, { "type": "object", "properties": { "special": { "allOf": [ { "$ref": "#/definitions/Record>" }, { "type": "object", "properties": { "type": { "type": "string" } }, "required": [ "type" ] } ] } }, "required": [ "special" ] }, { "type": "string" } ], "description": "This piece of text will be shown in the infobox.\nNote that \"&LBRACEkey&RBRACE\"-parts are substituted by the corresponding values of the element.\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`" }, { "path": [ "pointRendering", "labelCss", "icon" ], "required": false, "hints": { "typehint": "icon", "question": "what icon should be shown next to the 'render' value?" }, "type": [ { "type": "object", "properties": { "path": { "description": "The path to the icon\nType: icon", "type": "string" }, "class": { "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)", "type": "string" } }, "required": [ "path" ] }, { "type": "string" } ], "description": "An icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value" }, { "path": [ "pointRendering", "labelCss", "icon", "path" ], "required": true, "hints": { "typehint": "icon" }, "type": "string", "description": "The path to the icon" }, { "path": [ "pointRendering", "labelCss", "icon", "class" ], "required": false, "hints": {}, "type": "string", "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)" }, { "path": [ "pointRendering", "labelCss", "condition" ], "required": false, "hints": { "question": "When should this item be shown?" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "$ref": "#/definitions/{or:TagConfigJson[];}" }, { "type": "string" } ], "description": "Only show this tagrendering (or ask the question) if the selected object also matches the tags specified as `condition`.\nThis is useful to ask a follow-up question.\nFor example, within toilets, asking _where_ the diaper changing table is is only useful _if_ there is one.\nThis can be done by adding `\"condition\": \"changing_table=yes\"`\nA full example would be:\n```json\n {\n \"question\": \"Where is the changing table located?\",\n \"render\": \"The changing table is located at {changing_table:location}\",\n \"condition\": \"changing_table=yes\",\n \"freeform\": {\n \"key\": \"changing_table:location\",\n \"inline\": true\n },\n \"mappings\": [\n {\n \"then\": \"The changing table is in the toilet for women.\",\n \"if\": \"changing_table:location=female_toilet\"\n },\n {\n \"then\": \"The changing table is in the toilet for men.\",\n \"if\": \"changing_table:location=male_toilet\"\n },\n {\n \"if\": \"changing_table:location=wheelchair_toilet\",\n \"then\": \"The changing table is in the toilet for wheelchair users.\",\n },\n {\n \"if\": \"changing_table:location=dedicated_room\",\n \"then\": \"The changing table is in a dedicated room. \",\n }\n ],\n \"id\": \"toilet-changing_table:location\"\n },\n```" }, { "path": [ "pointRendering", "labelCss", "condition", "and" ], "required": false, "hints": { "typehint": "tag" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" }, { "path": [ "pointRendering", "labelCss", "condition", "or" ], "required": false, "hints": { "typehint": "tag" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" }, { "path": [ "pointRendering", "labelCss", "metacondition" ], "required": false, "hints": { "question": "When should this item be shown (including special conditions)?" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "$ref": "#/definitions/{or:TagConfigJson[];}" }, { "type": "string" } ], "description": "If set, this tag will be evaluated agains the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options.\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_" }, { "path": [ "pointRendering", "labelCss", "metacondition", "and" ], "required": false, "hints": { "typehint": "tag" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" }, { "path": [ "pointRendering", "labelCss", "metacondition", "or" ], "required": false, "hints": { "typehint": "tag" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" }, { "path": [ "pointRendering", "labelCss", "freeform" ], "required": false, "hints": { "question": "Should a freeform text field be shown?", "ifunset": "Do not add a freeform text field" }, "type": "object", "description": "Allow freeform text input from the user" }, { "path": [ "pointRendering", "labelCss", "freeform", "key" ], "required": true, "hints": {}, "type": "string", "description": "What attribute should be filled out\nIf this key is present in the feature, then 'render' is used to display the value.\nIf this is undefined, the rendering is _always_ shown" }, { "path": [ "pointRendering", "labelCss", "mappings" ], "required": false, "hints": {}, "type": "array", "description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes" }, { "path": [ "pointRendering", "labelCss", "mappings", "if" ], "required": true, "hints": { "typehint": "tag", "question": "When should this single mapping match?" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "If this condition is met, then the text under `then` will be shown.\nIf no value matches, and the user selects this mapping as an option, then these tags will be uploaded to OSM.\nFor example: {'if': 'diet:vegetarion=yes', 'then':'A vegetarian option is offered here'}\nThis can be an substituting-tag as well, e.g. {'if': 'addr:street:={_calculated_nearby_streetname}', 'then': '{_calculated_nearby_streetname}'}" }, { "path": [ "pointRendering", "labelCss", "mappings", "then" ], "required": true, "hints": { "typehint": "rendered", "question": "What text should be shown?" }, "type": [ { "$ref": "#/definitions/Record" }, { "type": "string" } ], "description": "If the condition `if` is met, the text `then` will be rendered.\nIf not known yet, the user will be presented with `then` as an option" }, { "path": [ "pointRendering", "labelCss", "mappings", "icon" ], "required": false, "hints": { "typehint": "icon", "question": "What icon should be added to this mapping?", "inline": " {icon}" }, "type": [ { "type": "object", "properties": { "path": { "description": "The path to the icon\nType: icon", "type": "string" }, "class": { "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)", "type": "string" } }, "required": [ "path" ] }, { "type": "string" } ], "description": "An icon supporting this mapping; typically shown pretty small" }, { "path": [ "pointRendering", "labelCss", "mappings", "icon", "path" ], "required": true, "hints": { "typehint": "icon" }, "type": "string", "description": "The path to the icon" }, { "path": [ "pointRendering", "labelCss", "mappings", "icon", "class" ], "required": false, "hints": {}, "type": "string", "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)" }, { "path": [ "pointRendering", "labelCss", "description" ], "required": false, "hints": {}, "type": [ { "$ref": "#/definitions/Record" }, { "type": "string" } ], "description": "A human-readable text explaining what this tagRendering does.\nMostly used for the shared tagrenderings" }, { "path": [ "pointRendering", "labelCss", "classes" ], "required": false, "hints": { "question": "What css-classes should be applied to showing this attribute?" }, "type": "string", "description": "A list of css-classes to apply to the entire tagRendering.\nThese classes are applied in 'answer'-mode, not in question mode\nThis is only for advanced users.\nValues are split on ` ` (space)" }, { "path": [ "pointRendering", "labelCssClasses" ], "required": false, "hints": { "types": "Dynamic value ; string", "question": "Which CSS-classes should be applied to the label?", "inline": "Apply CSS-classes {value} to the label" }, "type": [ { "description": "A TagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nFor an _editable_ tagRendering, use 'QuestionableTagRenderingConfigJson' instead, which extends this one", "type": "object", "properties": { "render": { "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nNote that \"&LBRACEkey&RBRACE\"-parts are substituted by the corresponding values of the element.\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered", "anyOf": [ { "$ref": "#/definitions/Record" }, { "type": "object", "properties": { "special": { "allOf": [ { "$ref": "#/definitions/Record>" }, { "type": "object", "properties": { "type": { "type": "string" } }, "required": [ "type" ] } ] } }, "required": [ "special" ] }, { "type": "string" } ] }, "icon": { "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon", "anyOf": [ { "type": "object", "properties": { "path": { "description": "The path to the icon\nType: icon", "type": "string" }, "class": { "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)", "type": "string" } }, "required": [ "path" ] }, { "type": "string" } ] }, "condition": { "description": "question: When should this item be shown?\n\nOnly show this tagrendering (or ask the question) if the selected object also matches the tags specified as `condition`.\n\nThis is useful to ask a follow-up question.\nFor example, within toilets, asking _where_ the diaper changing table is is only useful _if_ there is one.\nThis can be done by adding `\"condition\": \"changing_table=yes\"`\n\nA full example would be:\n```json\n {\n \"question\": \"Where is the changing table located?\",\n \"render\": \"The changing table is located at {changing_table:location}\",\n \"condition\": \"changing_table=yes\",\n \"freeform\": {\n \"key\": \"changing_table:location\",\n \"inline\": true\n },\n \"mappings\": [\n {\n \"then\": \"The changing table is in the toilet for women.\",\n \"if\": \"changing_table:location=female_toilet\"\n },\n {\n \"then\": \"The changing table is in the toilet for men.\",\n \"if\": \"changing_table:location=male_toilet\"\n },\n {\n \"if\": \"changing_table:location=wheelchair_toilet\",\n \"then\": \"The changing table is in the toilet for wheelchair users.\",\n },\n {\n \"if\": \"changing_table:location=dedicated_room\",\n \"then\": \"The changing table is in a dedicated room. \",\n }\n ],\n \"id\": \"toilet-changing_table:location\"\n },\n```", "anyOf": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "$ref": "#/definitions/{or:TagConfigJson[];}" }, { "type": "string" } ] }, "metacondition": { "description": "question: When should this item be shown (including special conditions)?\n\nIf set, this tag will be evaluated agains the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options.\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_", "anyOf": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "$ref": "#/definitions/{or:TagConfigJson[];}" }, { "type": "string" } ] }, "freeform": { "description": "question: Should a freeform text field be shown?\nAllow freeform text input from the user\nifunset: Do not add a freeform text field", "type": "object", "properties": { "key": { "description": "What attribute should be filled out\nIf this key is present in the feature, then 'render' is used to display the value.\nIf this is undefined, the rendering is _always_ shown", "type": "string" } }, "required": [ "key" ] }, "mappings": { "description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes", "type": "array", "items": { "type": "object", "properties": { "if": { "$ref": "#/definitions/TagConfigJson", "description": "question: When should this single mapping match?\n\nIf this condition is met, then the text under `then` will be shown.\nIf no value matches, and the user selects this mapping as an option, then these tags will be uploaded to OSM.\n\nFor example: {'if': 'diet:vegetarion=yes', 'then':'A vegetarian option is offered here'}\n\nThis can be an substituting-tag as well, e.g. {'if': 'addr:street:={_calculated_nearby_streetname}', 'then': '{_calculated_nearby_streetname}'}" }, "then": { "description": "question: What text should be shown?\n\nIf the condition `if` is met, the text `then` will be rendered.\nIf not known yet, the user will be presented with `then` as an option\nType: rendered", "anyOf": [ { "$ref": "#/definitions/Record" }, { "type": "string" } ] }, "icon": { "description": "question: What icon should be added to this mapping?\nAn icon supporting this mapping; typically shown pretty small\ninline: {icon}\nType: icon", "anyOf": [ { "type": "object", "properties": { "path": { "description": "The path to the icon\nType: icon", "type": "string" }, "class": { "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)", "type": "string" } }, "required": [ "path" ] }, { "type": "string" } ] } }, "required": [ "if", "then" ] } }, "description": { "description": "A human-readable text explaining what this tagRendering does.\nMostly used for the shared tagrenderings", "anyOf": [ { "$ref": "#/definitions/Record" }, { "type": "string" } ] }, "classes": { "description": "question: What css-classes should be applied to showing this attribute?\n\nA list of css-classes to apply to the entire tagRendering.\nThese classes are applied in 'answer'-mode, not in question mode\nThis is only for advanced users.\n\nValues are split on ` ` (space)", "type": "string" } }, "additionalProperties": false }, { "type": "string" } ], "description": "The classes should be separated by a space (` `)\nYou can use most Tailwind-css classes, see https://tailwindcss.com/ for more information\nFor example: `center bg-gray-500 mx-2 my-1 rounded-full`" }, { "path": [ "pointRendering", "labelCssClasses", "render" ], "required": false, "hints": { "typehint": "rendered", "question": "What text should be rendered?" }, "type": [ { "$ref": "#/definitions/Record" }, { "type": "object", "properties": { "special": { "allOf": [ { "$ref": "#/definitions/Record>" }, { "type": "object", "properties": { "type": { "type": "string" } }, "required": [ "type" ] } ] } }, "required": [ "special" ] }, { "type": "string" } ], "description": "This piece of text will be shown in the infobox.\nNote that \"&LBRACEkey&RBRACE\"-parts are substituted by the corresponding values of the element.\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`" }, { "path": [ "pointRendering", "labelCssClasses", "icon" ], "required": false, "hints": { "typehint": "icon", "question": "what icon should be shown next to the 'render' value?" }, "type": [ { "type": "object", "properties": { "path": { "description": "The path to the icon\nType: icon", "type": "string" }, "class": { "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)", "type": "string" } }, "required": [ "path" ] }, { "type": "string" } ], "description": "An icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value" }, { "path": [ "pointRendering", "labelCssClasses", "icon", "path" ], "required": true, "hints": { "typehint": "icon" }, "type": "string", "description": "The path to the icon" }, { "path": [ "pointRendering", "labelCssClasses", "icon", "class" ], "required": false, "hints": {}, "type": "string", "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)" }, { "path": [ "pointRendering", "labelCssClasses", "condition" ], "required": false, "hints": { "question": "When should this item be shown?" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "$ref": "#/definitions/{or:TagConfigJson[];}" }, { "type": "string" } ], "description": "Only show this tagrendering (or ask the question) if the selected object also matches the tags specified as `condition`.\nThis is useful to ask a follow-up question.\nFor example, within toilets, asking _where_ the diaper changing table is is only useful _if_ there is one.\nThis can be done by adding `\"condition\": \"changing_table=yes\"`\nA full example would be:\n```json\n {\n \"question\": \"Where is the changing table located?\",\n \"render\": \"The changing table is located at {changing_table:location}\",\n \"condition\": \"changing_table=yes\",\n \"freeform\": {\n \"key\": \"changing_table:location\",\n \"inline\": true\n },\n \"mappings\": [\n {\n \"then\": \"The changing table is in the toilet for women.\",\n \"if\": \"changing_table:location=female_toilet\"\n },\n {\n \"then\": \"The changing table is in the toilet for men.\",\n \"if\": \"changing_table:location=male_toilet\"\n },\n {\n \"if\": \"changing_table:location=wheelchair_toilet\",\n \"then\": \"The changing table is in the toilet for wheelchair users.\",\n },\n {\n \"if\": \"changing_table:location=dedicated_room\",\n \"then\": \"The changing table is in a dedicated room. \",\n }\n ],\n \"id\": \"toilet-changing_table:location\"\n },\n```" }, { "path": [ "pointRendering", "labelCssClasses", "condition", "and" ], "required": false, "hints": { "typehint": "tag" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" }, { "path": [ "pointRendering", "labelCssClasses", "condition", "or" ], "required": false, "hints": { "typehint": "tag" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" }, { "path": [ "pointRendering", "labelCssClasses", "metacondition" ], "required": false, "hints": { "question": "When should this item be shown (including special conditions)?" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "$ref": "#/definitions/{or:TagConfigJson[];}" }, { "type": "string" } ], "description": "If set, this tag will be evaluated agains the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options.\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_" }, { "path": [ "pointRendering", "labelCssClasses", "metacondition", "and" ], "required": false, "hints": { "typehint": "tag" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" }, { "path": [ "pointRendering", "labelCssClasses", "metacondition", "or" ], "required": false, "hints": { "typehint": "tag" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" }, { "path": [ "pointRendering", "labelCssClasses", "freeform" ], "required": false, "hints": { "question": "Should a freeform text field be shown?", "ifunset": "Do not add a freeform text field" }, "type": "object", "description": "Allow freeform text input from the user" }, { "path": [ "pointRendering", "labelCssClasses", "freeform", "key" ], "required": true, "hints": {}, "type": "string", "description": "What attribute should be filled out\nIf this key is present in the feature, then 'render' is used to display the value.\nIf this is undefined, the rendering is _always_ shown" }, { "path": [ "pointRendering", "labelCssClasses", "mappings" ], "required": false, "hints": {}, "type": "array", "description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes" }, { "path": [ "pointRendering", "labelCssClasses", "mappings", "if" ], "required": true, "hints": { "typehint": "tag", "question": "When should this single mapping match?" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "If this condition is met, then the text under `then` will be shown.\nIf no value matches, and the user selects this mapping as an option, then these tags will be uploaded to OSM.\nFor example: {'if': 'diet:vegetarion=yes', 'then':'A vegetarian option is offered here'}\nThis can be an substituting-tag as well, e.g. {'if': 'addr:street:={_calculated_nearby_streetname}', 'then': '{_calculated_nearby_streetname}'}" }, { "path": [ "pointRendering", "labelCssClasses", "mappings", "then" ], "required": true, "hints": { "typehint": "rendered", "question": "What text should be shown?" }, "type": [ { "$ref": "#/definitions/Record" }, { "type": "string" } ], "description": "If the condition `if` is met, the text `then` will be rendered.\nIf not known yet, the user will be presented with `then` as an option" }, { "path": [ "pointRendering", "labelCssClasses", "mappings", "icon" ], "required": false, "hints": { "typehint": "icon", "question": "What icon should be added to this mapping?", "inline": " {icon}" }, "type": [ { "type": "object", "properties": { "path": { "description": "The path to the icon\nType: icon", "type": "string" }, "class": { "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)", "type": "string" } }, "required": [ "path" ] }, { "type": "string" } ], "description": "An icon supporting this mapping; typically shown pretty small" }, { "path": [ "pointRendering", "labelCssClasses", "mappings", "icon", "path" ], "required": true, "hints": { "typehint": "icon" }, "type": "string", "description": "The path to the icon" }, { "path": [ "pointRendering", "labelCssClasses", "mappings", "icon", "class" ], "required": false, "hints": {}, "type": "string", "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)" }, { "path": [ "pointRendering", "labelCssClasses", "description" ], "required": false, "hints": {}, "type": [ { "$ref": "#/definitions/Record" }, { "type": "string" } ], "description": "A human-readable text explaining what this tagRendering does.\nMostly used for the shared tagrenderings" }, { "path": [ "pointRendering", "labelCssClasses", "classes" ], "required": false, "hints": { "question": "What css-classes should be applied to showing this attribute?" }, "type": "string", "description": "A list of css-classes to apply to the entire tagRendering.\nThese classes are applied in 'answer'-mode, not in question mode\nThis is only for advanced users.\nValues are split on ` ` (space)" }, { "path": [ "pointRendering", "pitchAlignment" ], "required": false, "hints": { "question": "If the map is pitched, should the icon stay parallel to the screen or to the groundplane?", "suggestions": [ { "if": "value=canvas", "then": "The icon will stay upward and not be transformed as if it sticks to the screen" }, { "if": "value=map", "then": "The icon will be transformed as if it were painted onto the ground. (Automatically sets rotationAlignment)" } ] }, "type": [ { "description": "A TagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nFor an _editable_ tagRendering, use 'QuestionableTagRenderingConfigJson' instead, which extends this one", "type": "object", "properties": { "render": { "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nNote that \"&LBRACEkey&RBRACE\"-parts are substituted by the corresponding values of the element.\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered", "anyOf": [ { "$ref": "#/definitions/Record" }, { "type": "object", "properties": { "special": { "allOf": [ { "$ref": "#/definitions/Record>" }, { "type": "object", "properties": { "type": { "type": "string" } }, "required": [ "type" ] } ] } }, "required": [ "special" ] }, { "type": "string" } ] }, "icon": { "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon", "anyOf": [ { "type": "object", "properties": { "path": { "description": "The path to the icon\nType: icon", "type": "string" }, "class": { "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)", "type": "string" } }, "required": [ "path" ] }, { "type": "string" } ] }, "condition": { "description": "question: When should this item be shown?\n\nOnly show this tagrendering (or ask the question) if the selected object also matches the tags specified as `condition`.\n\nThis is useful to ask a follow-up question.\nFor example, within toilets, asking _where_ the diaper changing table is is only useful _if_ there is one.\nThis can be done by adding `\"condition\": \"changing_table=yes\"`\n\nA full example would be:\n```json\n {\n \"question\": \"Where is the changing table located?\",\n \"render\": \"The changing table is located at {changing_table:location}\",\n \"condition\": \"changing_table=yes\",\n \"freeform\": {\n \"key\": \"changing_table:location\",\n \"inline\": true\n },\n \"mappings\": [\n {\n \"then\": \"The changing table is in the toilet for women.\",\n \"if\": \"changing_table:location=female_toilet\"\n },\n {\n \"then\": \"The changing table is in the toilet for men.\",\n \"if\": \"changing_table:location=male_toilet\"\n },\n {\n \"if\": \"changing_table:location=wheelchair_toilet\",\n \"then\": \"The changing table is in the toilet for wheelchair users.\",\n },\n {\n \"if\": \"changing_table:location=dedicated_room\",\n \"then\": \"The changing table is in a dedicated room. \",\n }\n ],\n \"id\": \"toilet-changing_table:location\"\n },\n```", "anyOf": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "$ref": "#/definitions/{or:TagConfigJson[];}" }, { "type": "string" } ] }, "metacondition": { "description": "question: When should this item be shown (including special conditions)?\n\nIf set, this tag will be evaluated agains the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options.\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_", "anyOf": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "$ref": "#/definitions/{or:TagConfigJson[];}" }, { "type": "string" } ] }, "freeform": { "description": "question: Should a freeform text field be shown?\nAllow freeform text input from the user\nifunset: Do not add a freeform text field", "type": "object", "properties": { "key": { "description": "What attribute should be filled out\nIf this key is present in the feature, then 'render' is used to display the value.\nIf this is undefined, the rendering is _always_ shown", "type": "string" } }, "required": [ "key" ] }, "mappings": { "description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes", "type": "array", "items": { "type": "object", "properties": { "if": { "$ref": "#/definitions/TagConfigJson", "description": "question: When should this single mapping match?\n\nIf this condition is met, then the text under `then` will be shown.\nIf no value matches, and the user selects this mapping as an option, then these tags will be uploaded to OSM.\n\nFor example: {'if': 'diet:vegetarion=yes', 'then':'A vegetarian option is offered here'}\n\nThis can be an substituting-tag as well, e.g. {'if': 'addr:street:={_calculated_nearby_streetname}', 'then': '{_calculated_nearby_streetname}'}" }, "then": { "description": "question: What text should be shown?\n\nIf the condition `if` is met, the text `then` will be rendered.\nIf not known yet, the user will be presented with `then` as an option\nType: rendered", "anyOf": [ { "$ref": "#/definitions/Record" }, { "type": "string" } ] }, "icon": { "description": "question: What icon should be added to this mapping?\nAn icon supporting this mapping; typically shown pretty small\ninline: {icon}\nType: icon", "anyOf": [ { "type": "object", "properties": { "path": { "description": "The path to the icon\nType: icon", "type": "string" }, "class": { "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)", "type": "string" } }, "required": [ "path" ] }, { "type": "string" } ] } }, "required": [ "if", "then" ] } }, "description": { "description": "A human-readable text explaining what this tagRendering does.\nMostly used for the shared tagrenderings", "anyOf": [ { "$ref": "#/definitions/Record" }, { "type": "string" } ] }, "classes": { "description": "question: What css-classes should be applied to showing this attribute?\n\nA list of css-classes to apply to the entire tagRendering.\nThese classes are applied in 'answer'-mode, not in question mode\nThis is only for advanced users.\n\nValues are split on ` ` (space)", "type": "string" } }, "additionalProperties": false }, { "enum": [ "canvas", "map" ], "type": "string" } ], "description": "" }, { "path": [ "pointRendering", "pitchAlignment", "render" ], "required": false, "hints": { "typehint": "rendered", "question": "What text should be rendered?" }, "type": [ { "$ref": "#/definitions/Record" }, { "type": "object", "properties": { "special": { "allOf": [ { "$ref": "#/definitions/Record>" }, { "type": "object", "properties": { "type": { "type": "string" } }, "required": [ "type" ] } ] } }, "required": [ "special" ] }, { "type": "string" } ], "description": "This piece of text will be shown in the infobox.\nNote that \"&LBRACEkey&RBRACE\"-parts are substituted by the corresponding values of the element.\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`" }, { "path": [ "pointRendering", "pitchAlignment", "icon" ], "required": false, "hints": { "typehint": "icon", "question": "what icon should be shown next to the 'render' value?" }, "type": [ { "type": "object", "properties": { "path": { "description": "The path to the icon\nType: icon", "type": "string" }, "class": { "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)", "type": "string" } }, "required": [ "path" ] }, { "type": "string" } ], "description": "An icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value" }, { "path": [ "pointRendering", "pitchAlignment", "icon", "path" ], "required": true, "hints": { "typehint": "icon" }, "type": "string", "description": "The path to the icon" }, { "path": [ "pointRendering", "pitchAlignment", "icon", "class" ], "required": false, "hints": {}, "type": "string", "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)" }, { "path": [ "pointRendering", "pitchAlignment", "condition" ], "required": false, "hints": { "question": "When should this item be shown?" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "$ref": "#/definitions/{or:TagConfigJson[];}" }, { "type": "string" } ], "description": "Only show this tagrendering (or ask the question) if the selected object also matches the tags specified as `condition`.\nThis is useful to ask a follow-up question.\nFor example, within toilets, asking _where_ the diaper changing table is is only useful _if_ there is one.\nThis can be done by adding `\"condition\": \"changing_table=yes\"`\nA full example would be:\n```json\n {\n \"question\": \"Where is the changing table located?\",\n \"render\": \"The changing table is located at {changing_table:location}\",\n \"condition\": \"changing_table=yes\",\n \"freeform\": {\n \"key\": \"changing_table:location\",\n \"inline\": true\n },\n \"mappings\": [\n {\n \"then\": \"The changing table is in the toilet for women.\",\n \"if\": \"changing_table:location=female_toilet\"\n },\n {\n \"then\": \"The changing table is in the toilet for men.\",\n \"if\": \"changing_table:location=male_toilet\"\n },\n {\n \"if\": \"changing_table:location=wheelchair_toilet\",\n \"then\": \"The changing table is in the toilet for wheelchair users.\",\n },\n {\n \"if\": \"changing_table:location=dedicated_room\",\n \"then\": \"The changing table is in a dedicated room. \",\n }\n ],\n \"id\": \"toilet-changing_table:location\"\n },\n```" }, { "path": [ "pointRendering", "pitchAlignment", "condition", "and" ], "required": false, "hints": { "typehint": "tag" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" }, { "path": [ "pointRendering", "pitchAlignment", "condition", "or" ], "required": false, "hints": { "typehint": "tag" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" }, { "path": [ "pointRendering", "pitchAlignment", "metacondition" ], "required": false, "hints": { "question": "When should this item be shown (including special conditions)?" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "$ref": "#/definitions/{or:TagConfigJson[];}" }, { "type": "string" } ], "description": "If set, this tag will be evaluated agains the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options.\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_" }, { "path": [ "pointRendering", "pitchAlignment", "metacondition", "and" ], "required": false, "hints": { "typehint": "tag" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" }, { "path": [ "pointRendering", "pitchAlignment", "metacondition", "or" ], "required": false, "hints": { "typehint": "tag" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" }, { "path": [ "pointRendering", "pitchAlignment", "freeform" ], "required": false, "hints": { "question": "Should a freeform text field be shown?", "ifunset": "Do not add a freeform text field" }, "type": "object", "description": "Allow freeform text input from the user" }, { "path": [ "pointRendering", "pitchAlignment", "freeform", "key" ], "required": true, "hints": {}, "type": "string", "description": "What attribute should be filled out\nIf this key is present in the feature, then 'render' is used to display the value.\nIf this is undefined, the rendering is _always_ shown" }, { "path": [ "pointRendering", "pitchAlignment", "mappings" ], "required": false, "hints": {}, "type": "array", "description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes" }, { "path": [ "pointRendering", "pitchAlignment", "mappings", "if" ], "required": true, "hints": { "typehint": "tag", "question": "When should this single mapping match?" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "If this condition is met, then the text under `then` will be shown.\nIf no value matches, and the user selects this mapping as an option, then these tags will be uploaded to OSM.\nFor example: {'if': 'diet:vegetarion=yes', 'then':'A vegetarian option is offered here'}\nThis can be an substituting-tag as well, e.g. {'if': 'addr:street:={_calculated_nearby_streetname}', 'then': '{_calculated_nearby_streetname}'}" }, { "path": [ "pointRendering", "pitchAlignment", "mappings", "then" ], "required": true, "hints": { "typehint": "rendered", "question": "What text should be shown?" }, "type": [ { "$ref": "#/definitions/Record" }, { "type": "string" } ], "description": "If the condition `if` is met, the text `then` will be rendered.\nIf not known yet, the user will be presented with `then` as an option" }, { "path": [ "pointRendering", "pitchAlignment", "mappings", "icon" ], "required": false, "hints": { "typehint": "icon", "question": "What icon should be added to this mapping?", "inline": " {icon}" }, "type": [ { "type": "object", "properties": { "path": { "description": "The path to the icon\nType: icon", "type": "string" }, "class": { "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)", "type": "string" } }, "required": [ "path" ] }, { "type": "string" } ], "description": "An icon supporting this mapping; typically shown pretty small" }, { "path": [ "pointRendering", "pitchAlignment", "mappings", "icon", "path" ], "required": true, "hints": { "typehint": "icon" }, "type": "string", "description": "The path to the icon" }, { "path": [ "pointRendering", "pitchAlignment", "mappings", "icon", "class" ], "required": false, "hints": {}, "type": "string", "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)" }, { "path": [ "pointRendering", "pitchAlignment", "description" ], "required": false, "hints": {}, "type": [ { "$ref": "#/definitions/Record" }, { "type": "string" } ], "description": "A human-readable text explaining what this tagRendering does.\nMostly used for the shared tagrenderings" }, { "path": [ "pointRendering", "pitchAlignment", "classes" ], "required": false, "hints": { "question": "What css-classes should be applied to showing this attribute?" }, "type": "string", "description": "A list of css-classes to apply to the entire tagRendering.\nThese classes are applied in 'answer'-mode, not in question mode\nThis is only for advanced users.\nValues are split on ` ` (space)" }, { "path": [ "pointRendering", "rotationAlignment" ], "required": false, "hints": { "question": "Should the icon be rotated if the map is rotated?", "ifunset": "Do not rotate or tilt icons. Always keep the icons straight", "suggestions": [ { "if": "value=canvas", "then": "Never rotate the icon" }, { "if": "value=map", "then": "If the map is rotated, rotate the icon as well. This gives the impression of an icon that floats perpendicular above the ground." } ] }, "type": [ { "description": "A TagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nFor an _editable_ tagRendering, use 'QuestionableTagRenderingConfigJson' instead, which extends this one", "type": "object", "properties": { "render": { "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nNote that \"&LBRACEkey&RBRACE\"-parts are substituted by the corresponding values of the element.\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered", "anyOf": [ { "$ref": "#/definitions/Record" }, { "type": "object", "properties": { "special": { "allOf": [ { "$ref": "#/definitions/Record>" }, { "type": "object", "properties": { "type": { "type": "string" } }, "required": [ "type" ] } ] } }, "required": [ "special" ] }, { "type": "string" } ] }, "icon": { "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon", "anyOf": [ { "type": "object", "properties": { "path": { "description": "The path to the icon\nType: icon", "type": "string" }, "class": { "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)", "type": "string" } }, "required": [ "path" ] }, { "type": "string" } ] }, "condition": { "description": "question: When should this item be shown?\n\nOnly show this tagrendering (or ask the question) if the selected object also matches the tags specified as `condition`.\n\nThis is useful to ask a follow-up question.\nFor example, within toilets, asking _where_ the diaper changing table is is only useful _if_ there is one.\nThis can be done by adding `\"condition\": \"changing_table=yes\"`\n\nA full example would be:\n```json\n {\n \"question\": \"Where is the changing table located?\",\n \"render\": \"The changing table is located at {changing_table:location}\",\n \"condition\": \"changing_table=yes\",\n \"freeform\": {\n \"key\": \"changing_table:location\",\n \"inline\": true\n },\n \"mappings\": [\n {\n \"then\": \"The changing table is in the toilet for women.\",\n \"if\": \"changing_table:location=female_toilet\"\n },\n {\n \"then\": \"The changing table is in the toilet for men.\",\n \"if\": \"changing_table:location=male_toilet\"\n },\n {\n \"if\": \"changing_table:location=wheelchair_toilet\",\n \"then\": \"The changing table is in the toilet for wheelchair users.\",\n },\n {\n \"if\": \"changing_table:location=dedicated_room\",\n \"then\": \"The changing table is in a dedicated room. \",\n }\n ],\n \"id\": \"toilet-changing_table:location\"\n },\n```", "anyOf": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "$ref": "#/definitions/{or:TagConfigJson[];}" }, { "type": "string" } ] }, "metacondition": { "description": "question: When should this item be shown (including special conditions)?\n\nIf set, this tag will be evaluated agains the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options.\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_", "anyOf": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "$ref": "#/definitions/{or:TagConfigJson[];}" }, { "type": "string" } ] }, "freeform": { "description": "question: Should a freeform text field be shown?\nAllow freeform text input from the user\nifunset: Do not add a freeform text field", "type": "object", "properties": { "key": { "description": "What attribute should be filled out\nIf this key is present in the feature, then 'render' is used to display the value.\nIf this is undefined, the rendering is _always_ shown", "type": "string" } }, "required": [ "key" ] }, "mappings": { "description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes", "type": "array", "items": { "type": "object", "properties": { "if": { "$ref": "#/definitions/TagConfigJson", "description": "question: When should this single mapping match?\n\nIf this condition is met, then the text under `then` will be shown.\nIf no value matches, and the user selects this mapping as an option, then these tags will be uploaded to OSM.\n\nFor example: {'if': 'diet:vegetarion=yes', 'then':'A vegetarian option is offered here'}\n\nThis can be an substituting-tag as well, e.g. {'if': 'addr:street:={_calculated_nearby_streetname}', 'then': '{_calculated_nearby_streetname}'}" }, "then": { "description": "question: What text should be shown?\n\nIf the condition `if` is met, the text `then` will be rendered.\nIf not known yet, the user will be presented with `then` as an option\nType: rendered", "anyOf": [ { "$ref": "#/definitions/Record" }, { "type": "string" } ] }, "icon": { "description": "question: What icon should be added to this mapping?\nAn icon supporting this mapping; typically shown pretty small\ninline: {icon}\nType: icon", "anyOf": [ { "type": "object", "properties": { "path": { "description": "The path to the icon\nType: icon", "type": "string" }, "class": { "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)", "type": "string" } }, "required": [ "path" ] }, { "type": "string" } ] } }, "required": [ "if", "then" ] } }, "description": { "description": "A human-readable text explaining what this tagRendering does.\nMostly used for the shared tagrenderings", "anyOf": [ { "$ref": "#/definitions/Record" }, { "type": "string" } ] }, "classes": { "description": "question: What css-classes should be applied to showing this attribute?\n\nA list of css-classes to apply to the entire tagRendering.\nThese classes are applied in 'answer'-mode, not in question mode\nThis is only for advanced users.\n\nValues are split on ` ` (space)", "type": "string" } }, "additionalProperties": false }, { "enum": [ "canvas", "map" ], "type": "string" } ], "description": "" }, { "path": [ "pointRendering", "rotationAlignment", "render" ], "required": false, "hints": { "typehint": "rendered", "question": "What text should be rendered?" }, "type": [ { "$ref": "#/definitions/Record" }, { "type": "object", "properties": { "special": { "allOf": [ { "$ref": "#/definitions/Record>" }, { "type": "object", "properties": { "type": { "type": "string" } }, "required": [ "type" ] } ] } }, "required": [ "special" ] }, { "type": "string" } ], "description": "This piece of text will be shown in the infobox.\nNote that \"&LBRACEkey&RBRACE\"-parts are substituted by the corresponding values of the element.\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`" }, { "path": [ "pointRendering", "rotationAlignment", "icon" ], "required": false, "hints": { "typehint": "icon", "question": "what icon should be shown next to the 'render' value?" }, "type": [ { "type": "object", "properties": { "path": { "description": "The path to the icon\nType: icon", "type": "string" }, "class": { "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)", "type": "string" } }, "required": [ "path" ] }, { "type": "string" } ], "description": "An icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value" }, { "path": [ "pointRendering", "rotationAlignment", "icon", "path" ], "required": true, "hints": { "typehint": "icon" }, "type": "string", "description": "The path to the icon" }, { "path": [ "pointRendering", "rotationAlignment", "icon", "class" ], "required": false, "hints": {}, "type": "string", "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)" }, { "path": [ "pointRendering", "rotationAlignment", "condition" ], "required": false, "hints": { "question": "When should this item be shown?" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "$ref": "#/definitions/{or:TagConfigJson[];}" }, { "type": "string" } ], "description": "Only show this tagrendering (or ask the question) if the selected object also matches the tags specified as `condition`.\nThis is useful to ask a follow-up question.\nFor example, within toilets, asking _where_ the diaper changing table is is only useful _if_ there is one.\nThis can be done by adding `\"condition\": \"changing_table=yes\"`\nA full example would be:\n```json\n {\n \"question\": \"Where is the changing table located?\",\n \"render\": \"The changing table is located at {changing_table:location}\",\n \"condition\": \"changing_table=yes\",\n \"freeform\": {\n \"key\": \"changing_table:location\",\n \"inline\": true\n },\n \"mappings\": [\n {\n \"then\": \"The changing table is in the toilet for women.\",\n \"if\": \"changing_table:location=female_toilet\"\n },\n {\n \"then\": \"The changing table is in the toilet for men.\",\n \"if\": \"changing_table:location=male_toilet\"\n },\n {\n \"if\": \"changing_table:location=wheelchair_toilet\",\n \"then\": \"The changing table is in the toilet for wheelchair users.\",\n },\n {\n \"if\": \"changing_table:location=dedicated_room\",\n \"then\": \"The changing table is in a dedicated room. \",\n }\n ],\n \"id\": \"toilet-changing_table:location\"\n },\n```" }, { "path": [ "pointRendering", "rotationAlignment", "condition", "and" ], "required": false, "hints": { "typehint": "tag" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" }, { "path": [ "pointRendering", "rotationAlignment", "condition", "or" ], "required": false, "hints": { "typehint": "tag" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" }, { "path": [ "pointRendering", "rotationAlignment", "metacondition" ], "required": false, "hints": { "question": "When should this item be shown (including special conditions)?" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "$ref": "#/definitions/{or:TagConfigJson[];}" }, { "type": "string" } ], "description": "If set, this tag will be evaluated agains the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options.\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_" }, { "path": [ "pointRendering", "rotationAlignment", "metacondition", "and" ], "required": false, "hints": { "typehint": "tag" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" }, { "path": [ "pointRendering", "rotationAlignment", "metacondition", "or" ], "required": false, "hints": { "typehint": "tag" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" }, { "path": [ "pointRendering", "rotationAlignment", "freeform" ], "required": false, "hints": { "question": "Should a freeform text field be shown?", "ifunset": "Do not add a freeform text field" }, "type": "object", "description": "Allow freeform text input from the user" }, { "path": [ "pointRendering", "rotationAlignment", "freeform", "key" ], "required": true, "hints": {}, "type": "string", "description": "What attribute should be filled out\nIf this key is present in the feature, then 'render' is used to display the value.\nIf this is undefined, the rendering is _always_ shown" }, { "path": [ "pointRendering", "rotationAlignment", "mappings" ], "required": false, "hints": {}, "type": "array", "description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes" }, { "path": [ "pointRendering", "rotationAlignment", "mappings", "if" ], "required": true, "hints": { "typehint": "tag", "question": "When should this single mapping match?" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "If this condition is met, then the text under `then` will be shown.\nIf no value matches, and the user selects this mapping as an option, then these tags will be uploaded to OSM.\nFor example: {'if': 'diet:vegetarion=yes', 'then':'A vegetarian option is offered here'}\nThis can be an substituting-tag as well, e.g. {'if': 'addr:street:={_calculated_nearby_streetname}', 'then': '{_calculated_nearby_streetname}'}" }, { "path": [ "pointRendering", "rotationAlignment", "mappings", "then" ], "required": true, "hints": { "typehint": "rendered", "question": "What text should be shown?" }, "type": [ { "$ref": "#/definitions/Record" }, { "type": "string" } ], "description": "If the condition `if` is met, the text `then` will be rendered.\nIf not known yet, the user will be presented with `then` as an option" }, { "path": [ "pointRendering", "rotationAlignment", "mappings", "icon" ], "required": false, "hints": { "typehint": "icon", "question": "What icon should be added to this mapping?", "inline": " {icon}" }, "type": [ { "type": "object", "properties": { "path": { "description": "The path to the icon\nType: icon", "type": "string" }, "class": { "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)", "type": "string" } }, "required": [ "path" ] }, { "type": "string" } ], "description": "An icon supporting this mapping; typically shown pretty small" }, { "path": [ "pointRendering", "rotationAlignment", "mappings", "icon", "path" ], "required": true, "hints": { "typehint": "icon" }, "type": "string", "description": "The path to the icon" }, { "path": [ "pointRendering", "rotationAlignment", "mappings", "icon", "class" ], "required": false, "hints": {}, "type": "string", "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)" }, { "path": [ "pointRendering", "rotationAlignment", "description" ], "required": false, "hints": {}, "type": [ { "$ref": "#/definitions/Record" }, { "type": "string" } ], "description": "A human-readable text explaining what this tagRendering does.\nMostly used for the shared tagrenderings" }, { "path": [ "pointRendering", "rotationAlignment", "classes" ], "required": false, "hints": { "question": "What css-classes should be applied to showing this attribute?" }, "type": "string", "description": "A list of css-classes to apply to the entire tagRendering.\nThese classes are applied in 'answer'-mode, not in question mode\nThis is only for advanced users.\nValues are split on ` ` (space)" }, { "path": [ "lineRendering" ], "required": false, "hints": { "group": "linerendering" }, "type": "array", "description": "Creates lines and areas to render on the map" }, { "path": [ "lineRendering" ], "required": false, "hints": {}, "type": "object", "description": "The LineRenderingConfig gives all details onto how to render a single line of a feature.\nThis can be used if:\n- The feature is a line\n- The feature is an area" }, { "path": [ "lineRendering", "color" ], "required": false, "hints": { "typehint": "color", "types": "dynamic value ; string", "question": "What color should lines be drawn in?", "ifunset": "Round ending", "inline": "The line colour always is {value}", "title": "Line Colour" }, "type": [ { "description": "Mostly used for lineRendering and pointRendering", "type": "object", "properties": { "render": { "description": "question: What value should be rendered?\n\nThis piece of text will be shown in the infobox.\nNote that \"&LBRACEkey&RBRACE\"-parts are substituted by the corresponding values of the element.\n\nThis value will be used if there is no mapping which matches (or there are no matches)\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`", "type": "string" }, "mappings": { "description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes", "type": "array", "items": { "type": "object", "properties": { "if": { "$ref": "#/definitions/TagConfigJson", "description": "question: When should this single mapping match?\n\nIf this condition is met, then the text under `then` will be shown.\nIf no value matches, and the user selects this mapping as an option, then these tags will be uploaded to OSM.\n\nFor example: {'if': 'diet:vegetarion=yes', 'then':'A vegetarian option is offered here'}\n\nThis can be an substituting-tag as well, e.g. {'if': 'addr:street:={_calculated_nearby_streetname}', 'then': '{_calculated_nearby_streetname}'}" }, "then": { "description": "question: What text should be shown?\n\nIf the condition `if` is met, the text `then` will be rendered.\nIf not known yet, the user will be presented with `then` as an option", "type": "string" } }, "required": [ "if", "then" ] } } }, "additionalProperties": false }, { "type": "string" } ], "description": "For an area, this will be the colour of the outside line.\nIf the value starts with \"--\", the style of the body element will be queried for the corresponding variable instead" }, { "path": [ "lineRendering", "color", "render" ], "required": false, "hints": { "question": "What value should be rendered?" }, "type": "string", "description": "This piece of text will be shown in the infobox.\nNote that \"&LBRACEkey&RBRACE\"-parts are substituted by the corresponding values of the element.\nThis value will be used if there is no mapping which matches (or there are no matches)\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`" }, { "path": [ "lineRendering", "color", "mappings" ], "required": false, "hints": {}, "type": "array", "description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes" }, { "path": [ "lineRendering", "color", "mappings", "if" ], "required": true, "hints": { "typehint": "tag", "question": "When should this single mapping match?" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "If this condition is met, then the text under `then` will be shown.\nIf no value matches, and the user selects this mapping as an option, then these tags will be uploaded to OSM.\nFor example: {'if': 'diet:vegetarion=yes', 'then':'A vegetarian option is offered here'}\nThis can be an substituting-tag as well, e.g. {'if': 'addr:street:={_calculated_nearby_streetname}', 'then': '{_calculated_nearby_streetname}'}" }, { "path": [ "lineRendering", "color", "mappings", "then" ], "required": true, "hints": { "question": "What text should be shown?" }, "type": "string", "description": "If the condition `if` is met, the text `then` will be rendered.\nIf not known yet, the user will be presented with `then` as an option" }, { "path": [ "lineRendering", "width" ], "required": false, "hints": { "typehint": "pnat", "types": "dynamic value ; string", "question": "How wide should the line be?", "ifunset": "Use the default-linewidth of 7 pixels", "inline": "The line width is {value} pixels", "title": "Line width" }, "type": [ { "description": "Mostly used for lineRendering and pointRendering", "type": "object", "properties": { "render": { "description": "question: What value should be rendered?\n\nThis piece of text will be shown in the infobox.\nNote that \"&LBRACEkey&RBRACE\"-parts are substituted by the corresponding values of the element.\n\nThis value will be used if there is no mapping which matches (or there are no matches)\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`", "type": "string" }, "mappings": { "description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes", "type": "array", "items": { "type": "object", "properties": { "if": { "$ref": "#/definitions/TagConfigJson", "description": "question: When should this single mapping match?\n\nIf this condition is met, then the text under `then` will be shown.\nIf no value matches, and the user selects this mapping as an option, then these tags will be uploaded to OSM.\n\nFor example: {'if': 'diet:vegetarion=yes', 'then':'A vegetarian option is offered here'}\n\nThis can be an substituting-tag as well, e.g. {'if': 'addr:street:={_calculated_nearby_streetname}', 'then': '{_calculated_nearby_streetname}'}" }, "then": { "description": "question: What text should be shown?\n\nIf the condition `if` is met, the text `then` will be rendered.\nIf not known yet, the user will be presented with `then` as an option", "type": "string" } }, "required": [ "if", "then" ] } } }, "additionalProperties": false }, { "type": [ "string", "number" ] } ], "description": "The stroke-width for way-elements" }, { "path": [ "lineRendering", "width", "render" ], "required": false, "hints": { "question": "What value should be rendered?" }, "type": "string", "description": "This piece of text will be shown in the infobox.\nNote that \"&LBRACEkey&RBRACE\"-parts are substituted by the corresponding values of the element.\nThis value will be used if there is no mapping which matches (or there are no matches)\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`" }, { "path": [ "lineRendering", "width", "mappings" ], "required": false, "hints": {}, "type": "array", "description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes" }, { "path": [ "lineRendering", "width", "mappings", "if" ], "required": true, "hints": { "typehint": "tag", "question": "When should this single mapping match?" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "If this condition is met, then the text under `then` will be shown.\nIf no value matches, and the user selects this mapping as an option, then these tags will be uploaded to OSM.\nFor example: {'if': 'diet:vegetarion=yes', 'then':'A vegetarian option is offered here'}\nThis can be an substituting-tag as well, e.g. {'if': 'addr:street:={_calculated_nearby_streetname}', 'then': '{_calculated_nearby_streetname}'}" }, { "path": [ "lineRendering", "width", "mappings", "then" ], "required": true, "hints": { "question": "What text should be shown?" }, "type": "string", "description": "If the condition `if` is met, the text `then` will be rendered.\nIf not known yet, the user will be presented with `then` as an option" }, { "path": [ "lineRendering", "dashArray" ], "required": false, "hints": { "question": "Should a dasharray be used to render the lines?", "ifunset": "Ways are rendered with a full line" }, "type": "string", "description": "The dasharray defines 'pixels of line, pixels of gap, pixels of line, pixels of gap, ...'. For example, `5 6` will be 5 pixels of line followed by a 6 pixel gap.\nCannot be a dynamic property due to a mapbox limitation" }, { "path": [ "lineRendering", "lineCap" ], "required": false, "hints": { "types": "dynamic value ; string", "question": "What form should the line-ending have?", "ifunset": "Use the default value (round ending)", "suggestions": [ { "if": "value=round", "then": "Round endings" }, { "if": "value=square", "then": "square endings" }, { "if": "value=butt", "then": "no ending (square ending at the end, without padding)" } ], "title": "Line Cap" }, "type": [ { "description": "Mostly used for lineRendering and pointRendering", "type": "object", "properties": { "render": { "description": "question: What value should be rendered?\n\nThis piece of text will be shown in the infobox.\nNote that \"&LBRACEkey&RBRACE\"-parts are substituted by the corresponding values of the element.\n\nThis value will be used if there is no mapping which matches (or there are no matches)\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`", "type": "string" }, "mappings": { "description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes", "type": "array", "items": { "type": "object", "properties": { "if": { "$ref": "#/definitions/TagConfigJson", "description": "question: When should this single mapping match?\n\nIf this condition is met, then the text under `then` will be shown.\nIf no value matches, and the user selects this mapping as an option, then these tags will be uploaded to OSM.\n\nFor example: {'if': 'diet:vegetarion=yes', 'then':'A vegetarian option is offered here'}\n\nThis can be an substituting-tag as well, e.g. {'if': 'addr:street:={_calculated_nearby_streetname}', 'then': '{_calculated_nearby_streetname}'}" }, "then": { "description": "question: What text should be shown?\n\nIf the condition `if` is met, the text `then` will be rendered.\nIf not known yet, the user will be presented with `then` as an option", "type": "string" } }, "required": [ "if", "then" ] } } }, "additionalProperties": false }, { "type": "string" } ], "description": "" }, { "path": [ "lineRendering", "lineCap", "render" ], "required": false, "hints": { "question": "What value should be rendered?" }, "type": "string", "description": "This piece of text will be shown in the infobox.\nNote that \"&LBRACEkey&RBRACE\"-parts are substituted by the corresponding values of the element.\nThis value will be used if there is no mapping which matches (or there are no matches)\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`" }, { "path": [ "lineRendering", "lineCap", "mappings" ], "required": false, "hints": {}, "type": "array", "description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes" }, { "path": [ "lineRendering", "lineCap", "mappings", "if" ], "required": true, "hints": { "typehint": "tag", "question": "When should this single mapping match?" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "If this condition is met, then the text under `then` will be shown.\nIf no value matches, and the user selects this mapping as an option, then these tags will be uploaded to OSM.\nFor example: {'if': 'diet:vegetarion=yes', 'then':'A vegetarian option is offered here'}\nThis can be an substituting-tag as well, e.g. {'if': 'addr:street:={_calculated_nearby_streetname}', 'then': '{_calculated_nearby_streetname}'}" }, { "path": [ "lineRendering", "lineCap", "mappings", "then" ], "required": true, "hints": { "question": "What text should be shown?" }, "type": "string", "description": "If the condition `if` is met, the text `then` will be rendered.\nIf not known yet, the user will be presented with `then` as an option" }, { "path": [ "lineRendering", "fillColor" ], "required": false, "hints": { "typehint": "color", "types": "dynamic value ; string", "question": "What colour should be used as fill colour for polygons?", "ifunset": "The polygon fill colour will be a more transparent version of the stroke colour", "inline": "The fill colour is {value}", "suggestions": [ { "if": "value=#00000000", "then": "Use a transparent fill (only render the outline)" } ] }, "type": [ { "description": "Mostly used for lineRendering and pointRendering", "type": "object", "properties": { "render": { "description": "question: What value should be rendered?\n\nThis piece of text will be shown in the infobox.\nNote that \"&LBRACEkey&RBRACE\"-parts are substituted by the corresponding values of the element.\n\nThis value will be used if there is no mapping which matches (or there are no matches)\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`", "type": "string" }, "mappings": { "description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes", "type": "array", "items": { "type": "object", "properties": { "if": { "$ref": "#/definitions/TagConfigJson", "description": "question: When should this single mapping match?\n\nIf this condition is met, then the text under `then` will be shown.\nIf no value matches, and the user selects this mapping as an option, then these tags will be uploaded to OSM.\n\nFor example: {'if': 'diet:vegetarion=yes', 'then':'A vegetarian option is offered here'}\n\nThis can be an substituting-tag as well, e.g. {'if': 'addr:street:={_calculated_nearby_streetname}', 'then': '{_calculated_nearby_streetname}'}" }, "then": { "description": "question: What text should be shown?\n\nIf the condition `if` is met, the text `then` will be rendered.\nIf not known yet, the user will be presented with `then` as an option", "type": "string" } }, "required": [ "if", "then" ] } } }, "additionalProperties": false }, { "type": "string" } ], "description": "" }, { "path": [ "lineRendering", "fillColor", "render" ], "required": false, "hints": { "question": "What value should be rendered?" }, "type": "string", "description": "This piece of text will be shown in the infobox.\nNote that \"&LBRACEkey&RBRACE\"-parts are substituted by the corresponding values of the element.\nThis value will be used if there is no mapping which matches (or there are no matches)\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`" }, { "path": [ "lineRendering", "fillColor", "mappings" ], "required": false, "hints": {}, "type": "array", "description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes" }, { "path": [ "lineRendering", "fillColor", "mappings", "if" ], "required": true, "hints": { "typehint": "tag", "question": "When should this single mapping match?" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "If this condition is met, then the text under `then` will be shown.\nIf no value matches, and the user selects this mapping as an option, then these tags will be uploaded to OSM.\nFor example: {'if': 'diet:vegetarion=yes', 'then':'A vegetarian option is offered here'}\nThis can be an substituting-tag as well, e.g. {'if': 'addr:street:={_calculated_nearby_streetname}', 'then': '{_calculated_nearby_streetname}'}" }, { "path": [ "lineRendering", "fillColor", "mappings", "then" ], "required": true, "hints": { "question": "What text should be shown?" }, "type": "string", "description": "If the condition `if` is met, the text `then` will be rendered.\nIf not known yet, the user will be presented with `then` as an option" }, { "path": [ "lineRendering", "offset" ], "required": false, "hints": { "typehint": "int", "types": "dynamic value ; number", "question": "Should the lines be moved (offsetted) with a number of pixels against the geographical lines?", "ifunset": "don't offset lines on the map", "inline": "Pixel offset by {value} pixels" }, "type": [ { "description": "Mostly used for lineRendering and pointRendering", "type": "object", "properties": { "render": { "description": "question: What value should be rendered?\n\nThis piece of text will be shown in the infobox.\nNote that \"&LBRACEkey&RBRACE\"-parts are substituted by the corresponding values of the element.\n\nThis value will be used if there is no mapping which matches (or there are no matches)\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`", "type": "string" }, "mappings": { "description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes", "type": "array", "items": { "type": "object", "properties": { "if": { "$ref": "#/definitions/TagConfigJson", "description": "question: When should this single mapping match?\n\nIf this condition is met, then the text under `then` will be shown.\nIf no value matches, and the user selects this mapping as an option, then these tags will be uploaded to OSM.\n\nFor example: {'if': 'diet:vegetarion=yes', 'then':'A vegetarian option is offered here'}\n\nThis can be an substituting-tag as well, e.g. {'if': 'addr:street:={_calculated_nearby_streetname}', 'then': '{_calculated_nearby_streetname}'}" }, "then": { "description": "question: What text should be shown?\n\nIf the condition `if` is met, the text `then` will be rendered.\nIf not known yet, the user will be presented with `then` as an option", "type": "string" } }, "required": [ "if", "then" ] } } }, "additionalProperties": false }, { "type": "number" } ], "description": "The number of pixels this line should be moved.\nUse a positive number to move to the right in the drawing direction or a negative to move to the left (left/right as defined by the drawing direction of the line).\nIMPORTANT: MapComplete will already normalize 'key:both:property' and 'key:both' into the corresponding 'key:left' and 'key:right' tagging (same for 'sidewalk=left/right/both' which is rewritten to 'sidewalk:left' and 'sidewalk:right')\nThis simplifies programming. Refer to the CalculatedTags.md-documentation for more details" }, { "path": [ "lineRendering", "offset", "render" ], "required": false, "hints": { "question": "What value should be rendered?" }, "type": "string", "description": "This piece of text will be shown in the infobox.\nNote that \"&LBRACEkey&RBRACE\"-parts are substituted by the corresponding values of the element.\nThis value will be used if there is no mapping which matches (or there are no matches)\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`" }, { "path": [ "lineRendering", "offset", "mappings" ], "required": false, "hints": {}, "type": "array", "description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes" }, { "path": [ "lineRendering", "offset", "mappings", "if" ], "required": true, "hints": { "typehint": "tag", "question": "When should this single mapping match?" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "If this condition is met, then the text under `then` will be shown.\nIf no value matches, and the user selects this mapping as an option, then these tags will be uploaded to OSM.\nFor example: {'if': 'diet:vegetarion=yes', 'then':'A vegetarian option is offered here'}\nThis can be an substituting-tag as well, e.g. {'if': 'addr:street:={_calculated_nearby_streetname}', 'then': '{_calculated_nearby_streetname}'}" }, { "path": [ "lineRendering", "offset", "mappings", "then" ], "required": true, "hints": { "question": "What text should be shown?" }, "type": "string", "description": "If the condition `if` is met, the text `then` will be rendered.\nIf not known yet, the user will be presented with `then` as an option" }, { "path": [ "passAllFeatures" ], "required": false, "hints": { "group": "expert", "question": "should this layer pass features to the next layers?", "iftrue": "Make the features from this layer also available to the other layer; might result in this object being rendered by multiple layers", "iffalse": "normal behaviour: don't pass features allong" }, "type": "boolean", "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" }, { "path": [ "doNotDownload" ], "required": false, "hints": { "group": "expert", "default": "false", "question": "Should this layer be downloaded or is the data provided by a different layer (which has 'passAllFeatures'-set)?", "iftrue": "Do not attempt to query the data for this layer from overpass/the OSM API", "iffalse": "download the data as usual" }, "type": "boolean", "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\nThe opposite of `forceLoad`" }, { "path": [ "forceLoad" ], "required": false, "hints": { "group": "expert", "default": "false", "question": "Should this layer be forcibly loaded?", "iffalse": "only download data for this layer when needed (default)" }, "type": "boolean", "description": "Advanced option - might be set by the theme compiler\nIf true, this data will _always_ be loaded, even if the theme is disabled by a filter or hidden.\nThe opposite of `doNotDownload`\nifftrue: always download this layer, even if it is disabled" }, { "path": [ "presets" ], "required": false, "hints": { "group": "presets" }, "type": "array", "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.\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.\nUpon confirmation, the full description is shown beneath the buttons - perfect to add pictures and examples.\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" }, { "path": [ "presets", "title" ], "required": true, "hints": { "question": "What is the word to describe this object?", "inline": "Add {value} here" }, "type": [ { "$ref": "#/definitions/Record" }, { "type": "string" } ], "description": "The title - shown on the 'add-new'-button.\nThis should include the article of the noun, e.g. 'a hydrant', 'a bicycle pump'.\nThis text will be inserted into `Add {category} here`, becoming `Add a hydrant here`.\nDo _not_ indicate 'new': 'add a new shop here' is incorrect, as the shop might have existed forever, it could just be unmapped!" }, { "path": [ "presets", "tags" ], "required": true, "hints": { "typehint": "simple_tag", "question": "What tag should be added to the new object?" }, "type": "array", "description": "A single tag (encoded as key=value) out of all the tags to add onto the newly created point.\nNote that the icon in the UI will be chosen automatically based on the tags provided here." }, { "path": [ "presets", "description" ], "required": false, "hints": { "question": "How would you describe this feature?" }, "type": [ { "$ref": "#/definitions/Record" }, { "type": "string" } ], "description": "An extra explanation of what the feature is, if it is not immediately clear from the title alone.\nThe _first sentence_ of the description is shown on the button of the `add` menu.\nThe full description is shown in the confirmation dialog.\n(The first sentence is until the first '.'-character in the description)" }, { "path": [ "presets", "exampleImages" ], "required": false, "hints": { "typehint": "image", "question": "What is the URL of an image showing such a feature?" }, "type": "array", "description": "The URL of an example image which shows a real-life example of what such a feature might look like." }, { "path": [ "presets", "snapToLayer" ], "required": false, "hints": { "question": "Should the created point be snapped to a line layer?", "suggestions": [ { "if": "value=address", "then": "address - Addresses" }, { "if": "value=advertising", "then": "advertising - We will complete data from advertising features with reference, operator and lit" }, { "if": "value=ambulancestation", "then": "ambulancestation - An ambulance station is an area for storage of ambulance vehicles, medical equipment, personal protective equipment, and other medical supplies." }, { "if": "value=artwork", "then": "artwork - An open map of statues, busts, graffitis and other artwork all over the world" }, { "if": "value=atm", "then": "atm - ATMs to withdraw money" }, { "if": "value=bank", "then": "bank - A financial institution to deposit money" }, { "if": "value=barrier", "then": "barrier - Obstacles while cycling, such as bollards and cycle barriers" }, { "if": "value=bench", "then": "bench - A bench is a wooden, metal, stone, … surface where a human can sit. This layers visualises them and asks a few questions about them." }, { "if": "value=bench_at_pt", "then": "bench_at_pt - A layer showing all public-transport-stops which do have a bench" }, { "if": "value=bicycle_library", "then": "bicycle_library - A facility where bicycles can be lent for longer period of times" }, { "if": "value=bicycle_rental", "then": "bicycle_rental - Bicycle rental stations" }, { "if": "value=bicycle_tube_vending_machine", "then": "bicycle_tube_vending_machine - A layer showing vending machines for bicycle tubes (either purpose-built bicycle tube vending machines or classical vending machines with bicycle tubes and optionally additional bicycle related objects such as lights, gloves, locks, …)" }, { "if": "value=bike_cafe", "then": "bike_cafe - A bike café is a café geared towards cyclists, for example with services such as a pump, with lots of bicycle-related decoration, …" }, { "if": "value=bike_cleaning", "then": "bike_cleaning - A layer showing facilities where one can clean their bike" }, { "if": "value=bike_parking", "then": "bike_parking - A layer showing where you can park your bike" }, { "if": "value=bike_repair_station", "then": "bike_repair_station - A layer showing bicycle pumps and bicycle repair tool stands" }, { "if": "value=bike_shop", "then": "bike_shop - A shop specifically selling bicycles or related items" }, { "if": "value=bike_themed_object", "then": "bike_themed_object - A layer with bike-themed objects but who don't match any other layer" }, { "if": "value=binocular", "then": "binocular - Binoculars" }, { "if": "value=birdhide", "then": "birdhide - A birdhide" }, { "if": "value=cafe_pub", "then": "cafe_pub - A layer showing cafés and pubs where one can gather around a drink. The layer asks for some relevant questions" }, { "if": "value=car_rental", "then": "car_rental - Places where you can rent a car" }, { "if": "value=charging_station", "then": "charging_station - A charging station" }, { "if": "value=climbing", "then": "climbing - A dummy layer which contains tagrenderings, shared among the climbing layers" }, { "if": "value=climbing_area", "then": "climbing_area - An area where climbing is possible, e.g. a crag, site, boulder, … Contains aggregation of routes" }, { "if": "value=climbing_club", "then": "climbing_club - A climbing club or organisation" }, { "if": "value=climbing_gym", "then": "climbing_gym - A climbing gym" }, { "if": "value=climbing_opportunity", "then": "climbing_opportunity - Fallback layer with items on which climbing _might_ be possible. It is loaded when zoomed in a lot, to prevent duplicate items to be added" }, { "if": "value=climbing_route", "then": "climbing_route - A single climbing route and its properties. Some properties are derived from the containing features" }, { "if": "value=clock", "then": "clock - Layer with public clocks" }, { "if": "value=conflation", "then": "conflation - If the import-button moves OSM points, the imported way points or conflates, a preview is shown. This layer defines how this preview is rendered. This layer cannot be included in a theme." }, { "if": "value=crab_address", "then": "crab_address - Address data for Flanders by the governement, suited for import into OpenStreetMap. Datadump from 2021-10-26. This layer contains only visualisation logic. Import buttons should be added via an override. Note that HNRLABEL contains the original value, whereas _HNRLABEL contains a slightly cleaned version" }, { "if": "value=crossings", "then": "crossings - Crossings for pedestrians and cyclists" }, { "if": "value=current_view", "then": "current_view - A meta-layer which contains one single feature, namely the bounding box of the current map view. This can be used to trigger special actions. If a popup is defined for this layer, this popup will be accessible via an extra button on screen.\n\nThe icon on the button is the default icon of the layer, but can be customized by detecting 'button=yes'." }, { "if": "value=cycleways_and_roads", "then": "cycleways_and_roads - All infrastructure that someone can cycle over, accompanied with questions about this infrastructure" }, { "if": "value=defibrillator", "then": "defibrillator - A layer showing defibrillators which can be used in case of emergency. This contains public defibrillators, but also defibrillators which might need staff to fetch the actual device" }, { "if": "value=dentist", "then": "dentist - This layer shows dentist offices" }, { "if": "value=direction", "then": "direction - This layer visualizes directions" }, { "if": "value=doctors", "then": "doctors - This layer shows doctor offices" }, { "if": "value=dogpark", "then": "dogpark - A layer showing dogparks, which are areas where dog are allowed to run without a leash" }, { "if": "value=drinking_water", "then": "drinking_water - A layer showing drinking water fountains" }, { "if": "value=elevator", "then": "elevator - This layer show elevators and asks for operational status and elevator dimensions. Useful for wheelchair accessibility information" }, { "if": "value=elongated_coin", "then": "elongated_coin - Layer showing penny presses." }, { "if": "value=entrance", "then": "entrance - A layer showing entrances and offering capabilities to survey some advanced data which is important for e.g. wheelchair users (but also bicycle users, people who want to deliver, …)" }, { "if": "value=etymology", "then": "etymology - All objects which have an etymology known" }, { "if": "value=extinguisher", "then": "extinguisher - Map layer to show fire extinguishers." }, { "if": "value=filters", "then": "filters - This layer acts as library for common filters" }, { "if": "value=fire_station", "then": "fire_station - Map layer to show fire stations." }, { "if": "value=fitness_centre", "then": "fitness_centre - Layer showing fitness centres" }, { "if": "value=fitness_station", "then": "fitness_station - Find a fitness station near you, and add missing ones." }, { "if": "value=fixme", "then": "fixme - OSM objects that likely need to be fixed, based on a FIXME tag." }, { "if": "value=food", "then": "food - A layer showing restaurants and fast-food amenities (with a special rendering for friteries)" }, { "if": "value=ghost_bike", "then": "ghost_bike - A layer showing memorials for cyclists, killed in road accidents" }, { "if": "value=governments", "then": "governments - This layer show governmental buildings. It was setup as commissioned layer for the client of OSOC '22" }, { "if": "value=gps_location", "then": "gps_location - Meta layer showing the current location of the user. Add this to your theme and override the icon to change the appearance of the current location. The object will always have `id=gps` and will have _all_ the properties included in the [`Coordinates`-object](https://developer.mozilla.org/en-US/docs/Web/API/GeolocationCoordinates) (except latitude and longitude) returned by the browser, such as `speed`, `altitude`, `heading`, ...." }, { "if": "value=gps_location_history", "then": "gps_location_history - Meta layer which contains the previous locations of the user as single points. This is mainly for technical reasons, e.g. to keep match the distance to the modified object" }, { "if": "value=gps_track", "then": "gps_track - Meta layer showing the previous locations of the user as single line with controls, e.g. to erase, upload or download this track. Add this to your theme and override the maprendering to change the appearance of the travelled track." }, { "if": "value=hackerspace", "then": "hackerspace - Hackerspace" }, { "if": "value=home_location", "then": "home_location - Meta layer showing the home location of the user. The home location can be set in the [profile settings](https://www.openstreetmap.org/profile/edit) of OpenStreetMap." }, { "if": "value=hospital", "then": "hospital - A layer showing hospital grounds" }, { "if": "value=hotel", "then": "hotel - Layer showing all hotels" }, { "if": "value=hydrant", "then": "hydrant - Map layer to show fire hydrants." }, { "if": "value=icons", "then": "icons - A layer acting as library for icon-tagrenderings, especially to show as badge next to a POI" }, { "if": "value=id_presets", "then": "id_presets - Layer containing various presets and questions generated by ID. These are meant to be reused in other layers by importing the tagRenderings with `id_preset." }, { "if": "value=import_candidate", "then": "import_candidate - Layer used as template in the importHelper" }, { "if": "value=indoors", "then": "indoors - Basic indoor mapping: shows room outlines" }, { "if": "value=information_board", "then": "information_board - A layer showing touristical, road side information boards (e.g. giving information about the landscape, a building, a feature, a map, …)" }, { "if": "value=kerbs", "then": "kerbs - A layer showing kerbs." }, { "if": "value=kindergarten_childcare", "then": "kindergarten_childcare - Shows kindergartens and preschools. Both are grouped in one layer, as they are regularly confused with each other" }, { "if": "value=last_click", "then": "last_click - This layer defines how to render the 'last click'-location. By default, it will show a marker with the possibility to add a new point (if there are some presets) and/or to add a new note (if the 'note' layer attribute is set). If none are possible, this layer won't show up" }, { "if": "value=map", "then": "map - A map, meant for tourists which is permanently installed in the public space" }, { "if": "value=maproulette", "then": "maproulette - Layer showing all tasks in MapRoulette" }, { "if": "value=maproulette_challenge", "then": "maproulette_challenge - Layer showing tasks of a single MapRoulette challenge. This layer is intended to be reused and extended in themes; refer to [the documentation](https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Integrating_Maproulette.md) on how to do this." }, { "if": "value=maxspeed", "then": "maxspeed - Shows the allowed speed for every road" }, { "if": "value=memorial", "then": "memorial - Layer showing memorial plaques, based upon a unofficial theme. Can be expanded to have multiple types of memorials later on" }, { "if": "value=named_streets", "then": "named_streets - Hidden layer with all streets which have a name. Useful to detect addresses" }, { "if": "value=nature_reserve", "then": "nature_reserve - A nature reserve is an area where nature can take its course" }, { "if": "value=note", "then": "note - This layer shows notes on OpenStreetMap. Having this layer in your theme will trigger the 'add new note' functionality in the 'addNewPoint'-popup (or if your theme has no presets, it'll enable adding notes)" }, { "if": "value=observation_tower", "then": "observation_tower - Towers with a panoramic view" }, { "if": "value=osm_community_index", "then": "osm_community_index - A layer showing the OpenStreetMap Communities" }, { "if": "value=parcel_lockers", "then": "parcel_lockers - Layer showing parcel lockers for collecting and sending parcels." }, { "if": "value=parking", "then": "parking - A layer showing car parkings" }, { "if": "value=parking_spaces", "then": "parking_spaces - Layer showing individual parking spaces." }, { "if": "value=parking_ticket_machine", "then": "parking_ticket_machine - Layer with parking ticket machines to pay for parking." }, { "if": "value=pedestrian_path", "then": "pedestrian_path - Pedestrian footpaths, especially used for indoor navigation and snapping entrances to this layer" }, { "if": "value=pharmacy", "then": "pharmacy - A layer showing pharmacies, which (probably) dispense prescription drugs" }, { "if": "value=physiotherapist", "then": "physiotherapist - This layer shows physiotherapists" }, { "if": "value=picnic_table", "then": "picnic_table - The layer showing picnic tables" }, { "if": "value=play_forest", "then": "play_forest - Een speelbos is een vrij toegankelijke zone in een bos" }, { "if": "value=playground", "then": "playground - Playgrounds" }, { "if": "value=postboxes", "then": "postboxes - The layer showing postboxes." }, { "if": "value=postoffices", "then": "postoffices - A layer showing post offices." }, { "if": "value=public_bookcase", "then": "public_bookcase - A streetside cabinet with books, accessible to anyone" }, { "if": "value=questions", "then": "questions - Special library layer which does not need a '.questions'-prefix before being imported" }, { "if": "value=railway_platforms", "then": "railway_platforms - Find every platform in the station, and the train routes that use them." }, { "if": "value=rainbow_crossings", "then": "rainbow_crossings - A layer showing pedestrian crossings with rainbow paintings" }, { "if": "value=range", "then": "range - Meta-layer, simply showing a bbox in red" }, { "if": "value=reception_desk", "then": "reception_desk - A layer showing where the reception desks are and which asks some accessibility information" }, { "if": "value=recycling", "then": "recycling - A layer with recycling containers and centres" }, { "if": "value=school", "then": "school - Schools giving primary and secondary education and post-secondary, non-tertiary education. Note that this level of education does not imply an age of the pupiles" }, { "if": "value=selected_element", "then": "selected_element - Highlights the currently selected element. Override this layer to have different colors" }, { "if": "value=shelter", "then": "shelter - Layer showing shelter structures" }, { "if": "value=shops", "then": "shops - A shop" }, { "if": "value=shower", "then": "shower - A layer showing (public) showers" }, { "if": "value=slow_roads", "then": "slow_roads - All carfree roads" }, { "if": "value=speed_camera", "then": "speed_camera - Layer showing speed cameras" }, { "if": "value=speed_display", "then": "speed_display - Layer showing speed displays that alert drivers of their speed." }, { "if": "value=split_point", "then": "split_point - Layer rendering the little scissors for the minimap in the 'splitRoadWizard'" }, { "if": "value=split_road", "then": "split_road - Layer rendering the way to split in the 'splitRoadWizard'. This one is used instead of the variable rendering by the themes themselves, as they might not always be very visible" }, { "if": "value=sport_pitch", "then": "sport_pitch - A sport pitch" }, { "if": "value=sports_centre", "then": "sports_centre - Indoor and outdoor sports centres can be found on this layer" }, { "if": "value=stairs", "then": "stairs - Layer showing stairs and escalators" }, { "if": "value=street_lamps", "then": "street_lamps - A layer showing street lights" }, { "if": "value=surveillance_camera", "then": "surveillance_camera - This layer shows surveillance cameras and allows a contributor to update information and add new cameras" }, { "if": "value=tertiary_education", "then": "tertiary_education - Layer with all tertiary education institutes (ISCED:2011 levels 6,7 and 8)" }, { "if": "value=ticket_machine", "then": "ticket_machine - Find ticket machines for public transport tickets" }, { "if": "value=ticket_validator", "then": "ticket_validator - Find ticket validators to validate public transport tickets" }, { "if": "value=toilet", "then": "toilet - A layer showing (public) toilets" }, { "if": "value=toilet_at_amenity", "then": "toilet_at_amenity - A layer showing (public) toilets located at different places." }, { "if": "value=trail", "then": "trail - Aangeduide wandeltochten" }, { "if": "value=transit_routes", "then": "transit_routes - Layer showing bus lines" }, { "if": "value=transit_stops", "then": "transit_stops - Layer showing different types of transit stops." }, { "if": "value=tree_node", "then": "tree_node - A layer showing trees" }, { "if": "value=usersettings", "then": "usersettings - A special layer which is not meant to be shown on a map, but which is used to set user settings" }, { "if": "value=vending_machine", "then": "vending_machine - Layer showing vending machines" }, { "if": "value=veterinary", "then": "veterinary - A layer showing veterinarians" }, { "if": "value=viewpoint", "then": "viewpoint - A nice viewpoint or nice view. Ideal to add an image if no other category fits" }, { "if": "value=village_green", "then": "village_green - A layer showing village-green (which are communal green areas, but not quite parks)" }, { "if": "value=visitor_information_centre", "then": "visitor_information_centre - A visitor center offers information about a specific attraction or place of interest where it is located." }, { "if": "value=walls_and_buildings", "then": "walls_and_buildings - Special builtin layer providing all walls and buildings. This layer is useful in presets for objects which can be placed against walls (e.g. AEDs, postboxes, entrances, addresses, surveillance cameras, …). This layer is invisible by default and not toggleable by the user." }, { "if": "value=waste_basket", "then": "waste_basket - This is a public waste basket, thrash can, where you can throw away your thrash." }, { "if": "value=waste_disposal", "then": "waste_disposal - Waste Disposal Bin, medium to large bin for disposal of (household) waste" }, { "if": "value=windturbine", "then": "windturbine - Modern windmills generating electricity" } ] }, "type": "array", "description": "If specified, these layers will be shown in the precise location picker and the new point will be snapped towards it.\nFor example, this can be used to snap against `walls_and_buildings` (e.g. to attach a defibrillator, an entrance, an artwork, ... to the wall)\nor to snap an obstacle (such as a bollard) to the `cycleways_and_roads`." }, { "path": [ "presets", "maxSnapDistance" ], "required": false, "hints": { "default": "10", "question": "What is the maximum distance in the location-input that a point can be moved to be snapped to a way?", "inline": "a point is snapped if the location input is at most {value}m away from an object" }, "type": "number", "description": "If specified, a new point will only be snapped if it is within this range.\nIf further away, it'll be placed in the center of the location input\nDistance in meter" }, { "path": [ "tagRenderings" ], "required": false, "hints": { "typehint": "tagrendering[]", "group": "tagrenderings", "question": "Which tagRenderings should be shown in the infobox?" }, "type": [ { "description": "A QuestionableTagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nIf the desired tags are missing and a question is defined, a question will be shown instead.", "type": "object", "properties": { "id": { "type": "string" }, "mappings": { "description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes\n\nquestion: What are common options?", "type": "array", "items": { "$ref": "#/definitions/MappingConfigJson" } }, "multiAnswer": { "description": "If true, use checkboxes instead of radio buttons when asking the question\n\nquestion: Should a contributor be allowed to select multiple mappings?\n\niftrue: allow to select multiple mappigns\niffalse: only allow to select a single mapping\nifunset: only allow to select a single mapping", "type": "boolean" }, "freeform": { "description": "Allow freeform text input from the user", "type": "object", "properties": { "key": { "description": "question What is the name of the attribute that should be written to?\nifunset: do not offer a freeform textfield as answer option", "type": "string" }, "type": { "description": "question: What is the input type?\nThe type of the text-field, e.g. 'string', 'nat', 'float', 'date',...\nSee Docs/SpecialInputElements.md and UI/Input/ValidatedTextField.ts for supported values\nsuggestions: return validators.AllValidators.filter(type => !type.isMeta).map((type) => ({if: \"value=\"+type.name, then: \"\"+type.name+\" \"+type.explanation.split(\"\\n\")[0]}))", "type": "string" }, "placeholder": { "description": "A (translated) text that is shown (as gray text) within the textfield" }, "helperArgs": { "description": "Extra parameters to initialize the input helper arguments.\nFor semantics, see the 'SpecialInputElements.md'", "type": "array", "items": {} }, "addExtraTags": { "description": "If a value is added with the textfield, these extra tag is addded.\nUseful to add a 'fixme=freeform textfield used - to be checked'", "type": "array", "items": { "type": "string" } }, "inline": { "description": "question: Show the freeform as box within the question?\nInstead of showing a full-width text field, the text field will be shown within the rendering of the question.\n\nThis combines badly with special input elements, as it'll distort the layout.\nifunset: show the freeform input field full-width\niftrue: show the freeform input field as a small field within the question", "type": "boolean" }, "default": { "description": "default value to enter if no previous tagging is present.\nNormally undefined (aka do not enter anything)", "type": "string" } }, "required": [ "key" ] }, "question": { "description": "question: What question should be shown to the contributor?\n\nA question is presented ot the user if no mapping matches and the 'freeform' key is not set as well.\n\nifunset: This tagrendering will be shown if it is known, but cannot be edited by the contributor, effectively resutling in a read-only rendering", "anyOf": [ { "$ref": "#/definitions/Record" }, { "type": "string" } ] }, "questionHint": { "description": "question: Should some extra information be shown to the contributor, alongside the question?\nThis hint is shown in subtle text under the question.\nThis can give some extra information on what the answer should ook like\nifunset: No extra hint is given", "anyOf": [ { "$ref": "#/definitions/Record" }, { "type": "string" } ] }, "labels": { "description": "A list of labels. These are strings that are used for various purposes, e.g. to only include a subset of the tagRenderings when reusing a layer", "type": "array", "items": { "type": "string" } }, "render": { "description": "question: What text should be rendered?\n\nThis piece of text will be shown in the infobox.\nNote that \"&LBRACEkey&RBRACE\"-parts are substituted by the corresponding values of the element.\n\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\n\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`\ntype: rendered", "anyOf": [ { "$ref": "#/definitions/Record" }, { "type": "object", "properties": { "special": { "allOf": [ { "$ref": "#/definitions/Record>" }, { "type": "object", "properties": { "type": { "type": "string" } }, "required": [ "type" ] } ] } }, "required": [ "special" ] }, { "type": "string" } ] }, "icon": { "description": "question: what icon should be shown next to the 'render' value?\nAn icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value\nType: icon", "anyOf": [ { "type": "object", "properties": { "path": { "description": "The path to the icon\nType: icon", "type": "string" }, "class": { "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)", "type": "string" } }, "required": [ "path" ] }, { "type": "string" } ] }, "condition": { "description": "question: When should this item be shown?\n\nOnly show this tagrendering (or ask the question) if the selected object also matches the tags specified as `condition`.\n\nThis is useful to ask a follow-up question.\nFor example, within toilets, asking _where_ the diaper changing table is is only useful _if_ there is one.\nThis can be done by adding `\"condition\": \"changing_table=yes\"`\n\nA full example would be:\n```json\n {\n \"question\": \"Where is the changing table located?\",\n \"render\": \"The changing table is located at {changing_table:location}\",\n \"condition\": \"changing_table=yes\",\n \"freeform\": {\n \"key\": \"changing_table:location\",\n \"inline\": true\n },\n \"mappings\": [\n {\n \"then\": \"The changing table is in the toilet for women.\",\n \"if\": \"changing_table:location=female_toilet\"\n },\n {\n \"then\": \"The changing table is in the toilet for men.\",\n \"if\": \"changing_table:location=male_toilet\"\n },\n {\n \"if\": \"changing_table:location=wheelchair_toilet\",\n \"then\": \"The changing table is in the toilet for wheelchair users.\",\n },\n {\n \"if\": \"changing_table:location=dedicated_room\",\n \"then\": \"The changing table is in a dedicated room. \",\n }\n ],\n \"id\": \"toilet-changing_table:location\"\n },\n```", "anyOf": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "$ref": "#/definitions/{or:TagConfigJson[];}" }, { "type": "string" } ] }, "metacondition": { "description": "question: When should this item be shown (including special conditions)?\n\nIf set, this tag will be evaluated agains the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options.\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_", "anyOf": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "$ref": "#/definitions/{or:TagConfigJson[];}" }, { "type": "string" } ] }, "description": { "description": "A human-readable text explaining what this tagRendering does.\nMostly used for the shared tagrenderings", "anyOf": [ { "$ref": "#/definitions/Record" }, { "type": "string" } ] }, "classes": { "description": "question: What css-classes should be applied to showing this attribute?\n\nA list of css-classes to apply to the entire tagRendering.\nThese classes are applied in 'answer'-mode, not in question mode\nThis is only for advanced users.\n\nValues are split on ` ` (space)", "type": "string" } }, "required": [ "id" ], "additionalProperties": false }, { "type": "object", "properties": { "id": { "type": "string" }, "builtin": { "anyOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "string" } ] }, "override": { "$ref": "#/definitions/Partial" } }, "required": [ "builtin", "override" ] }, { "allOf": [ { "$ref": "#/definitions/default<(string|QuestionableTagRenderingConfigJson|{builtin:string;override:Partial;})[]>" }, { "type": "object", "properties": { "id": { "type": "string" } }, "required": [ "id" ] } ] }, { "type": "string" } ], "description": "A tag rendering is a block that either shows the known value or asks a question.\nRefer to the class `TagRenderingConfigJson` to see the possibilities.\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\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.\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" }, { "path": [ "tagRenderings", "mappings" ], "required": false, "hints": { "question": "What are common options?" }, "type": "array", "description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes" }, { "path": [ "tagRenderings", "mappings", "if" ], "required": true, "hints": { "typehint": "tag", "question": "What tags should be matched to show this option?" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "If in 'question'-mode and the contributor selects this option, these tags will be applied to the object" }, { "path": [ "tagRenderings", "mappings", "then" ], "required": true, "hints": { "typehint": "rendered", "question": "What corresponding text should be shown?" }, "type": [ { "$ref": "#/definitions/Record" }, { "type": "string" } ], "description": "Shown if the `if` is fulfilled" }, { "path": [ "tagRenderings", "mappings", "icon" ], "required": false, "hints": { "typehint": "icon", "question": "What icon should be shown next to this mapping?", "ifunset": "Show no icon" }, "type": [ { "type": "object", "properties": { "path": { "description": "The path to the icon\nType: icon", "type": "string" }, "class": { "description": "Size of the image", "type": "string" } }, "required": [ "path" ] }, { "type": "string" } ], "description": "This icon will only be shown if the value is known, it is not displayed in the options (but might be in the future)" }, { "path": [ "tagRenderings", "mappings", "icon", "path" ], "required": true, "hints": { "typehint": "icon" }, "type": "string", "description": "The path to the icon" }, { "path": [ "tagRenderings", "mappings", "icon", "class" ], "required": false, "hints": {}, "type": "string", "description": "Size of the image" }, { "path": [ "tagRenderings", "mappings", "hideInAnswer" ], "required": false, "hints": { "typehint": "tag", "question": "Under what circumstances should this mapping be hidden from the possibilities a contributor can pick?", "iftrue": "Never show this mapping as option to pick", "ifunset": "Always show this mapping as option to pick" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "$ref": "#/definitions/{or:TagConfigJson[];}" }, { "type": [ "string", "boolean" ] } ], "description": "In some cases, multiple taggings exist (e.g. a default assumption, or a commonly mapped abbreviation and a fully written variation).\nIn the latter case, a correct text should be shown, but only a single, canonical tagging should be selectable by the user.\nIn this case, one of the mappings can be hiden by setting this flag.\nTo demonstrate an example making a default assumption:\nmappings: [\n {\n if: \"access=\", -- no access tag present, we assume accessible\n then: \"Accessible to the general public\",\n hideInAnswer: true\n },\n {\n if: \"access=yes\",\n then: \"Accessible to the general public\", -- the user selected this, we add that to OSM\n },\n {\n if: \"access=no\",\n then: \"Not accessible to the public\"\n }\n]\nFor example, for an operator, we have `operator=Agentschap Natuur en Bos`, which is often abbreviated to `operator=ANB`.\nThen, we would add two mappings:\n{\n if: \"operator=Agentschap Natuur en Bos\" -- the non-abbreviated version which should be uploaded\n then: \"Maintained by Agentschap Natuur en Bos\"\n},\n{\n if: \"operator=ANB\", -- we don't want to upload abbreviations\n then: \"Maintained by Agentschap Natuur en Bos\"\n hideInAnswer: true\n}\nHide in answer can also be a tagsfilter, e.g. to make sure an option is only shown when appropriate.\nKeep in mind that this is reverse logic: it will be hidden in the answer if the condition is true, it will thus only show in the case of a mismatch\ne.g., for toilets: if \"wheelchair=no\", we know there is no wheelchair dedicated room.\nFor the location of the changing table, the option \"in the wheelchair accessible toilet is weird\", so we write:\n{\n \"question\": \"Where is the changing table located?\"\n \"mappings\": [\n {\"if\":\"changing_table:location=female\",\"then\":\"In the female restroom\"},\n {\"if\":\"changing_table:location=male\",\"then\":\"In the male restroom\"},\n {\"if\":\"changing_table:location=wheelchair\",\"then\":\"In the wheelchair accessible restroom\", \"hideInAnswer\": \"wheelchair=no\"},\n ]\n}\nAlso have a look for the meta-tags\n{\n if: \"operator=Agentschap Natuur en Bos\",\n then: \"Maintained by Agentschap Natuur en Bos\",\n hideInAnswer: \"_country!=be\"\n}" }, { "path": [ "tagRenderings", "mappings", "hideInAnswer", "and" ], "required": false, "hints": { "typehint": "tag" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" }, { "path": [ "tagRenderings", "mappings", "hideInAnswer", "or" ], "required": false, "hints": { "typehint": "tag" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" }, { "path": [ "tagRenderings", "mappings", "ifnot" ], "required": false, "hints": { "question": "What tags should be applied if this mapping is _not_ chosen?" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "$ref": "#/definitions/{or:TagConfigJson[];}" }, { "type": "string" } ], "description": "Only applicable if 'multiAnswer' is set.\nThis is for situations such as:\n`accepts:coins=no` where one can select all the possible payment methods. However, we want to make explicit that some options _were not_ selected.\nThis can be done with `ifnot`\nNote that we can not explicitly render this negative case to the user, we cannot show `does _not_ accept coins`.\nIf this is important to your usecase, consider using multiple radiobutton-fields without `multiAnswer`" }, { "path": [ "tagRenderings", "mappings", "ifnot", "and" ], "required": false, "hints": { "typehint": "tag" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" }, { "path": [ "tagRenderings", "mappings", "ifnot", "or" ], "required": false, "hints": { "typehint": "tag" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" }, { "path": [ "tagRenderings", "mappings", "addExtraTags" ], "required": false, "hints": { "typehint": "simple_tag[]", "question": "What extra tags should be added to the object if this object is chosen?" }, "type": "array", "description": "If chosen as answer, these tags will be applied onto the object, together with the tags from the `if`\nNot compatible with multiAnswer.\nThis can be used e.g. to erase other keys which indicate the 'not' value:\n```json\n{\n \"if\": \"crossing:marking=rainbow\",\n \"then\": \"This is a rainbow crossing\",\n \"addExtraTags\": [\"not:crossing:marking=\"]\n}\n```" }, { "path": [ "tagRenderings", "mappings", "searchTerms" ], "required": false, "hints": { "group": "hidden", "question": "If there are many options, what search terms match too?" }, "type": "object", "description": "If there are many options, the mappings-radiobuttons will be replaced by an element with a searchfunction\nSearchterms (per language) allow to easily find an option if there are many options" }, { "path": [ "tagRenderings", "mappings", "priorityIf" ], "required": false, "hints": { "group": "hidden" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "$ref": "#/definitions/{or:TagConfigJson[];}" }, { "type": "string" } ], "description": "If the searchable selector is picked, mappings with this item will have priority and show up even if the others are hidden\nUse this sparingly" }, { "path": [ "tagRenderings", "mappings", "priorityIf", "and" ], "required": false, "hints": { "typehint": "tag" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" }, { "path": [ "tagRenderings", "mappings", "priorityIf", "or" ], "required": false, "hints": { "typehint": "tag" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" }, { "path": [ "tagRenderings", "mappings", "#" ], "required": false, "hints": { "group": "hidden" }, "type": "string", "description": "Used for comments or to disable a validation\nignore-image-in-then: normally, a `then`-clause is not allowed to have an `img`-html-element as icons are preferred. In some cases (most notably title-icons), this is allowed" }, { "path": [ "tagRenderings", "multiAnswer" ], "required": false, "hints": { "question": "Should a contributor be allowed to select multiple mappings?", "iftrue": "allow to select multiple mappigns", "iffalse": "only allow to select a single mapping", "ifunset": "only allow to select a single mapping" }, "type": "boolean", "description": "If true, use checkboxes instead of radio buttons when asking the question" }, { "path": [ "tagRenderings", "freeform" ], "required": false, "hints": {}, "type": "object", "description": "Allow freeform text input from the user" }, { "path": [ "tagRenderings", "freeform", "key" ], "required": true, "hints": { "ifunset": "do not offer a freeform textfield as answer option" }, "type": "string", "description": "question What is the name of the attribute that should be written to?" }, { "path": [ "tagRenderings", "freeform", "type" ], "required": false, "hints": { "question": "What is the input type?", "suggestions": [ { "if": "value=string", "then": "string A simple piece of text" }, { "if": "value=text", "then": "text A longer piece of text. Uses an textArea instead of a textField" }, { "if": "value=date", "then": "date A date with date picker" }, { "if": "value=nat", "then": "nat A whole, positive number or zero" }, { "if": "value=int", "then": "int A whole number, either positive, negative or zero" }, { "if": "value=distance", "then": "distance A geographical distance in meters (rounded at two points). Will give an extra minimap with a measurement tool. Arguments: [ zoomlevel, preferredBackgroundMapType (comma separated) ], e.g. `[\"21\", \"map,photo\"]" }, { "if": "value=direction", "then": "direction A geographical direction, in degrees. 0° is north, 90° is east, ... Will return a value between 0 (incl) and 360 (excl)." }, { "if": "value=wikidata", "then": "wikidata A wikidata identifier, e.g. Q42. " }, { "if": "value=pnat", "then": "pnat A strict positive number" }, { "if": "value=float", "then": "float A decimal number" }, { "if": "value=pfloat", "then": "pfloat A positive decimal number or zero" }, { "if": "value=email", "then": "email An email adress" }, { "if": "value=url", "then": "url The validatedTextField will format URLs to always be valid and have a https://-header (even though the 'https'-part will be hidden from the user. Furthermore, some tracking parameters will be removed" }, { "if": "value=phone", "then": "phone A phone number" }, { "if": "value=opening_hours", "then": "opening_hours Has extra elements to easily input when a POI is opened. " }, { "if": "value=color", "then": "color Shows a color picker" }, { "if": "value=icon", "then": "icon Makes sure that a valid .svg-path is added" }, { "if": "value=fediverse", "then": "fediverse Validates fediverse addresses and normalizes them into `@username@server`-format" } ] }, "type": "string", "description": "The type of the text-field, e.g. 'string', 'nat', 'float', 'date',...\nSee Docs/SpecialInputElements.md and UI/Input/ValidatedTextField.ts for supported values" }, { "path": [ "tagRenderings", "freeform", "placeholder" ], "required": false, "hints": {}, "description": "A (translated) text that is shown (as gray text) within the textfield" }, { "path": [ "tagRenderings", "freeform", "helperArgs" ], "required": false, "hints": {}, "type": "array", "description": "Extra parameters to initialize the input helper arguments.\nFor semantics, see the 'SpecialInputElements.md'" }, { "path": [ "tagRenderings", "freeform", "addExtraTags" ], "required": false, "hints": {}, "type": "array", "description": "If a value is added with the textfield, these extra tag is addded.\nUseful to add a 'fixme=freeform textfield used - to be checked'" }, { "path": [ "tagRenderings", "freeform", "inline" ], "required": false, "hints": { "question": "Show the freeform as box within the question?", "iftrue": "show the freeform input field as a small field within the question", "ifunset": "show the freeform input field full-width" }, "type": "boolean", "description": "Instead of showing a full-width text field, the text field will be shown within the rendering of the question.\nThis combines badly with special input elements, as it'll distort the layout." }, { "path": [ "tagRenderings", "freeform", "default" ], "required": false, "hints": {}, "type": "string", "description": "default value to enter if no previous tagging is present.\nNormally undefined (aka do not enter anything)" }, { "path": [ "tagRenderings", "question" ], "required": false, "hints": { "question": "What question should be shown to the contributor?", "ifunset": "This tagrendering will be shown if it is known, but cannot be edited by the contributor, effectively resutling in a read-only rendering" }, "type": [ { "$ref": "#/definitions/Record" }, { "type": "string" } ], "description": "A question is presented ot the user if no mapping matches and the 'freeform' key is not set as well." }, { "path": [ "tagRenderings", "questionHint" ], "required": false, "hints": { "question": "Should some extra information be shown to the contributor, alongside the question?", "ifunset": "No extra hint is given" }, "type": [ { "$ref": "#/definitions/Record" }, { "type": "string" } ], "description": "This hint is shown in subtle text under the question.\nThis can give some extra information on what the answer should ook like" }, { "path": [ "tagRenderings", "labels" ], "required": false, "hints": {}, "type": "array", "description": "A list of labels. These are strings that are used for various purposes, e.g. to only include a subset of the tagRenderings when reusing a layer" }, { "path": [ "tagRenderings", "render" ], "required": false, "hints": { "typehint": "rendered", "question": "What text should be rendered?" }, "type": [ { "$ref": "#/definitions/Record" }, { "type": "object", "properties": { "special": { "allOf": [ { "$ref": "#/definitions/Record>" }, { "type": "object", "properties": { "type": { "type": "string" } }, "required": [ "type" ] } ] } }, "required": [ "special" ] }, { "type": "string" } ], "description": "This piece of text will be shown in the infobox.\nNote that \"&LBRACEkey&RBRACE\"-parts are substituted by the corresponding values of the element.\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`" }, { "path": [ "tagRenderings", "icon" ], "required": false, "hints": { "typehint": "icon", "question": "what icon should be shown next to the 'render' value?" }, "type": [ { "type": "object", "properties": { "path": { "description": "The path to the icon\nType: icon", "type": "string" }, "class": { "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)", "type": "string" } }, "required": [ "path" ] }, { "type": "string" } ], "description": "An icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value" }, { "path": [ "tagRenderings", "icon", "path" ], "required": true, "hints": { "typehint": "icon" }, "type": "string", "description": "The path to the icon" }, { "path": [ "tagRenderings", "icon", "class" ], "required": false, "hints": {}, "type": "string", "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)" }, { "path": [ "tagRenderings", "condition" ], "required": false, "hints": { "question": "When should this item be shown?" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "$ref": "#/definitions/{or:TagConfigJson[];}" }, { "type": "string" } ], "description": "Only show this tagrendering (or ask the question) if the selected object also matches the tags specified as `condition`.\nThis is useful to ask a follow-up question.\nFor example, within toilets, asking _where_ the diaper changing table is is only useful _if_ there is one.\nThis can be done by adding `\"condition\": \"changing_table=yes\"`\nA full example would be:\n```json\n {\n \"question\": \"Where is the changing table located?\",\n \"render\": \"The changing table is located at {changing_table:location}\",\n \"condition\": \"changing_table=yes\",\n \"freeform\": {\n \"key\": \"changing_table:location\",\n \"inline\": true\n },\n \"mappings\": [\n {\n \"then\": \"The changing table is in the toilet for women.\",\n \"if\": \"changing_table:location=female_toilet\"\n },\n {\n \"then\": \"The changing table is in the toilet for men.\",\n \"if\": \"changing_table:location=male_toilet\"\n },\n {\n \"if\": \"changing_table:location=wheelchair_toilet\",\n \"then\": \"The changing table is in the toilet for wheelchair users.\",\n },\n {\n \"if\": \"changing_table:location=dedicated_room\",\n \"then\": \"The changing table is in a dedicated room. \",\n }\n ],\n \"id\": \"toilet-changing_table:location\"\n },\n```" }, { "path": [ "tagRenderings", "condition", "and" ], "required": false, "hints": { "typehint": "tag" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" }, { "path": [ "tagRenderings", "condition", "or" ], "required": false, "hints": { "typehint": "tag" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" }, { "path": [ "tagRenderings", "metacondition" ], "required": false, "hints": { "question": "When should this item be shown (including special conditions)?" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "$ref": "#/definitions/{or:TagConfigJson[];}" }, { "type": "string" } ], "description": "If set, this tag will be evaluated agains the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options.\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_" }, { "path": [ "tagRenderings", "metacondition", "and" ], "required": false, "hints": { "typehint": "tag" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" }, { "path": [ "tagRenderings", "metacondition", "or" ], "required": false, "hints": { "typehint": "tag" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" }, { "path": [ "tagRenderings", "description" ], "required": false, "hints": {}, "type": [ { "$ref": "#/definitions/Record" }, { "type": "string" } ], "description": "A human-readable text explaining what this tagRendering does.\nMostly used for the shared tagrenderings" }, { "path": [ "tagRenderings", "classes" ], "required": false, "hints": { "question": "What css-classes should be applied to showing this attribute?" }, "type": "string", "description": "A list of css-classes to apply to the entire tagRendering.\nThese classes are applied in 'answer'-mode, not in question mode\nThis is only for advanced users.\nValues are split on ` ` (space)" }, { "path": [ "tagRenderings", "override", "mappings" ], "required": false, "hints": { "question": "What are common options?" }, "type": "array", "description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes" }, { "path": [ "tagRenderings", "override", "mappings", "if" ], "required": true, "hints": { "typehint": "tag", "question": "What tags should be matched to show this option?" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "If in 'question'-mode and the contributor selects this option, these tags will be applied to the object" }, { "path": [ "tagRenderings", "override", "mappings", "then" ], "required": true, "hints": { "typehint": "rendered", "question": "What corresponding text should be shown?" }, "type": [ { "$ref": "#/definitions/Record" }, { "type": "string" } ], "description": "Shown if the `if` is fulfilled" }, { "path": [ "tagRenderings", "override", "mappings", "icon" ], "required": false, "hints": { "typehint": "icon", "question": "What icon should be shown next to this mapping?", "ifunset": "Show no icon" }, "type": [ { "type": "object", "properties": { "path": { "description": "The path to the icon\nType: icon", "type": "string" }, "class": { "description": "Size of the image", "type": "string" } }, "required": [ "path" ] }, { "type": "string" } ], "description": "This icon will only be shown if the value is known, it is not displayed in the options (but might be in the future)" }, { "path": [ "tagRenderings", "override", "mappings", "icon", "path" ], "required": true, "hints": { "typehint": "icon" }, "type": "string", "description": "The path to the icon" }, { "path": [ "tagRenderings", "override", "mappings", "icon", "class" ], "required": false, "hints": {}, "type": "string", "description": "Size of the image" }, { "path": [ "tagRenderings", "override", "mappings", "hideInAnswer" ], "required": false, "hints": { "typehint": "tag", "question": "Under what circumstances should this mapping be hidden from the possibilities a contributor can pick?", "iftrue": "Never show this mapping as option to pick", "ifunset": "Always show this mapping as option to pick" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "$ref": "#/definitions/{or:TagConfigJson[];}" }, { "type": [ "string", "boolean" ] } ], "description": "In some cases, multiple taggings exist (e.g. a default assumption, or a commonly mapped abbreviation and a fully written variation).\nIn the latter case, a correct text should be shown, but only a single, canonical tagging should be selectable by the user.\nIn this case, one of the mappings can be hiden by setting this flag.\nTo demonstrate an example making a default assumption:\nmappings: [\n {\n if: \"access=\", -- no access tag present, we assume accessible\n then: \"Accessible to the general public\",\n hideInAnswer: true\n },\n {\n if: \"access=yes\",\n then: \"Accessible to the general public\", -- the user selected this, we add that to OSM\n },\n {\n if: \"access=no\",\n then: \"Not accessible to the public\"\n }\n]\nFor example, for an operator, we have `operator=Agentschap Natuur en Bos`, which is often abbreviated to `operator=ANB`.\nThen, we would add two mappings:\n{\n if: \"operator=Agentschap Natuur en Bos\" -- the non-abbreviated version which should be uploaded\n then: \"Maintained by Agentschap Natuur en Bos\"\n},\n{\n if: \"operator=ANB\", -- we don't want to upload abbreviations\n then: \"Maintained by Agentschap Natuur en Bos\"\n hideInAnswer: true\n}\nHide in answer can also be a tagsfilter, e.g. to make sure an option is only shown when appropriate.\nKeep in mind that this is reverse logic: it will be hidden in the answer if the condition is true, it will thus only show in the case of a mismatch\ne.g., for toilets: if \"wheelchair=no\", we know there is no wheelchair dedicated room.\nFor the location of the changing table, the option \"in the wheelchair accessible toilet is weird\", so we write:\n{\n \"question\": \"Where is the changing table located?\"\n \"mappings\": [\n {\"if\":\"changing_table:location=female\",\"then\":\"In the female restroom\"},\n {\"if\":\"changing_table:location=male\",\"then\":\"In the male restroom\"},\n {\"if\":\"changing_table:location=wheelchair\",\"then\":\"In the wheelchair accessible restroom\", \"hideInAnswer\": \"wheelchair=no\"},\n ]\n}\nAlso have a look for the meta-tags\n{\n if: \"operator=Agentschap Natuur en Bos\",\n then: \"Maintained by Agentschap Natuur en Bos\",\n hideInAnswer: \"_country!=be\"\n}" }, { "path": [ "tagRenderings", "override", "mappings", "hideInAnswer", "and" ], "required": false, "hints": { "typehint": "tag" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" }, { "path": [ "tagRenderings", "override", "mappings", "hideInAnswer", "or" ], "required": false, "hints": { "typehint": "tag" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" }, { "path": [ "tagRenderings", "override", "mappings", "ifnot" ], "required": false, "hints": { "question": "What tags should be applied if this mapping is _not_ chosen?" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "$ref": "#/definitions/{or:TagConfigJson[];}" }, { "type": "string" } ], "description": "Only applicable if 'multiAnswer' is set.\nThis is for situations such as:\n`accepts:coins=no` where one can select all the possible payment methods. However, we want to make explicit that some options _were not_ selected.\nThis can be done with `ifnot`\nNote that we can not explicitly render this negative case to the user, we cannot show `does _not_ accept coins`.\nIf this is important to your usecase, consider using multiple radiobutton-fields without `multiAnswer`" }, { "path": [ "tagRenderings", "override", "mappings", "ifnot", "and" ], "required": false, "hints": { "typehint": "tag" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" }, { "path": [ "tagRenderings", "override", "mappings", "ifnot", "or" ], "required": false, "hints": { "typehint": "tag" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" }, { "path": [ "tagRenderings", "override", "mappings", "addExtraTags" ], "required": false, "hints": { "typehint": "simple_tag[]", "question": "What extra tags should be added to the object if this object is chosen?" }, "type": "array", "description": "If chosen as answer, these tags will be applied onto the object, together with the tags from the `if`\nNot compatible with multiAnswer.\nThis can be used e.g. to erase other keys which indicate the 'not' value:\n```json\n{\n \"if\": \"crossing:marking=rainbow\",\n \"then\": \"This is a rainbow crossing\",\n \"addExtraTags\": [\"not:crossing:marking=\"]\n}\n```" }, { "path": [ "tagRenderings", "override", "mappings", "searchTerms" ], "required": false, "hints": { "group": "hidden", "question": "If there are many options, what search terms match too?" }, "type": "object", "description": "If there are many options, the mappings-radiobuttons will be replaced by an element with a searchfunction\nSearchterms (per language) allow to easily find an option if there are many options" }, { "path": [ "tagRenderings", "override", "mappings", "priorityIf" ], "required": false, "hints": { "group": "hidden" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "$ref": "#/definitions/{or:TagConfigJson[];}" }, { "type": "string" } ], "description": "If the searchable selector is picked, mappings with this item will have priority and show up even if the others are hidden\nUse this sparingly" }, { "path": [ "tagRenderings", "override", "mappings", "priorityIf", "and" ], "required": false, "hints": { "typehint": "tag" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" }, { "path": [ "tagRenderings", "override", "mappings", "priorityIf", "or" ], "required": false, "hints": { "typehint": "tag" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" }, { "path": [ "tagRenderings", "override", "mappings", "#" ], "required": false, "hints": { "group": "hidden" }, "type": "string", "description": "Used for comments or to disable a validation\nignore-image-in-then: normally, a `then`-clause is not allowed to have an `img`-html-element as icons are preferred. In some cases (most notably title-icons), this is allowed" }, { "path": [ "tagRenderings", "override", "multiAnswer" ], "required": false, "hints": { "question": "Should a contributor be allowed to select multiple mappings?", "iftrue": "allow to select multiple mappigns", "iffalse": "only allow to select a single mapping", "ifunset": "only allow to select a single mapping" }, "type": "boolean", "description": "If true, use checkboxes instead of radio buttons when asking the question" }, { "path": [ "tagRenderings", "override", "freeform" ], "required": false, "hints": {}, "type": "object", "description": "Allow freeform text input from the user" }, { "path": [ "tagRenderings", "override", "freeform", "key" ], "required": true, "hints": { "ifunset": "do not offer a freeform textfield as answer option" }, "type": "string", "description": "question What is the name of the attribute that should be written to?" }, { "path": [ "tagRenderings", "override", "freeform", "type" ], "required": false, "hints": { "question": "What is the input type?", "suggestions": [ { "if": "value=string", "then": "string A simple piece of text" }, { "if": "value=text", "then": "text A longer piece of text. Uses an textArea instead of a textField" }, { "if": "value=date", "then": "date A date with date picker" }, { "if": "value=nat", "then": "nat A whole, positive number or zero" }, { "if": "value=int", "then": "int A whole number, either positive, negative or zero" }, { "if": "value=distance", "then": "distance A geographical distance in meters (rounded at two points). Will give an extra minimap with a measurement tool. Arguments: [ zoomlevel, preferredBackgroundMapType (comma separated) ], e.g. `[\"21\", \"map,photo\"]" }, { "if": "value=direction", "then": "direction A geographical direction, in degrees. 0° is north, 90° is east, ... Will return a value between 0 (incl) and 360 (excl)." }, { "if": "value=wikidata", "then": "wikidata A wikidata identifier, e.g. Q42. " }, { "if": "value=pnat", "then": "pnat A strict positive number" }, { "if": "value=float", "then": "float A decimal number" }, { "if": "value=pfloat", "then": "pfloat A positive decimal number or zero" }, { "if": "value=email", "then": "email An email adress" }, { "if": "value=url", "then": "url The validatedTextField will format URLs to always be valid and have a https://-header (even though the 'https'-part will be hidden from the user. Furthermore, some tracking parameters will be removed" }, { "if": "value=phone", "then": "phone A phone number" }, { "if": "value=opening_hours", "then": "opening_hours Has extra elements to easily input when a POI is opened. " }, { "if": "value=color", "then": "color Shows a color picker" }, { "if": "value=icon", "then": "icon Makes sure that a valid .svg-path is added" }, { "if": "value=fediverse", "then": "fediverse Validates fediverse addresses and normalizes them into `@username@server`-format" } ] }, "type": "string", "description": "The type of the text-field, e.g. 'string', 'nat', 'float', 'date',...\nSee Docs/SpecialInputElements.md and UI/Input/ValidatedTextField.ts for supported values" }, { "path": [ "tagRenderings", "override", "freeform", "placeholder" ], "required": false, "hints": {}, "description": "A (translated) text that is shown (as gray text) within the textfield" }, { "path": [ "tagRenderings", "override", "freeform", "helperArgs" ], "required": false, "hints": {}, "type": "array", "description": "Extra parameters to initialize the input helper arguments.\nFor semantics, see the 'SpecialInputElements.md'" }, { "path": [ "tagRenderings", "override", "freeform", "addExtraTags" ], "required": false, "hints": {}, "type": "array", "description": "If a value is added with the textfield, these extra tag is addded.\nUseful to add a 'fixme=freeform textfield used - to be checked'" }, { "path": [ "tagRenderings", "override", "freeform", "inline" ], "required": false, "hints": { "question": "Show the freeform as box within the question?", "iftrue": "show the freeform input field as a small field within the question", "ifunset": "show the freeform input field full-width" }, "type": "boolean", "description": "Instead of showing a full-width text field, the text field will be shown within the rendering of the question.\nThis combines badly with special input elements, as it'll distort the layout." }, { "path": [ "tagRenderings", "override", "freeform", "default" ], "required": false, "hints": {}, "type": "string", "description": "default value to enter if no previous tagging is present.\nNormally undefined (aka do not enter anything)" }, { "path": [ "tagRenderings", "override", "question" ], "required": false, "hints": { "question": "What question should be shown to the contributor?", "ifunset": "This tagrendering will be shown if it is known, but cannot be edited by the contributor, effectively resutling in a read-only rendering" }, "type": [ { "$ref": "#/definitions/Record" }, { "type": "string" } ], "description": "A question is presented ot the user if no mapping matches and the 'freeform' key is not set as well." }, { "path": [ "tagRenderings", "override", "questionHint" ], "required": false, "hints": { "question": "Should some extra information be shown to the contributor, alongside the question?", "ifunset": "No extra hint is given" }, "type": [ { "$ref": "#/definitions/Record" }, { "type": "string" } ], "description": "This hint is shown in subtle text under the question.\nThis can give some extra information on what the answer should ook like" }, { "path": [ "tagRenderings", "override", "labels" ], "required": false, "hints": {}, "type": "array", "description": "A list of labels. These are strings that are used for various purposes, e.g. to only include a subset of the tagRenderings when reusing a layer" }, { "path": [ "tagRenderings", "override", "render" ], "required": false, "hints": { "typehint": "rendered", "question": "What text should be rendered?" }, "type": [ { "$ref": "#/definitions/Record" }, { "type": "object", "properties": { "special": { "allOf": [ { "$ref": "#/definitions/Record>" }, { "type": "object", "properties": { "type": { "type": "string" } }, "required": [ "type" ] } ] } }, "required": [ "special" ] }, { "type": "string" } ], "description": "This piece of text will be shown in the infobox.\nNote that \"&LBRACEkey&RBRACE\"-parts are substituted by the corresponding values of the element.\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`" }, { "path": [ "tagRenderings", "override", "icon" ], "required": false, "hints": { "typehint": "icon", "question": "what icon should be shown next to the 'render' value?" }, "type": [ { "type": "object", "properties": { "path": { "description": "The path to the icon\nType: icon", "type": "string" }, "class": { "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)", "type": "string" } }, "required": [ "path" ] }, { "type": "string" } ], "description": "An icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value" }, { "path": [ "tagRenderings", "override", "icon", "path" ], "required": true, "hints": { "typehint": "icon" }, "type": "string", "description": "The path to the icon" }, { "path": [ "tagRenderings", "override", "icon", "class" ], "required": false, "hints": {}, "type": "string", "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)" }, { "path": [ "tagRenderings", "override", "condition" ], "required": false, "hints": { "question": "When should this item be shown?" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "$ref": "#/definitions/{or:TagConfigJson[];}" }, { "type": "string" } ], "description": "Only show this tagrendering (or ask the question) if the selected object also matches the tags specified as `condition`.\nThis is useful to ask a follow-up question.\nFor example, within toilets, asking _where_ the diaper changing table is is only useful _if_ there is one.\nThis can be done by adding `\"condition\": \"changing_table=yes\"`\nA full example would be:\n```json\n {\n \"question\": \"Where is the changing table located?\",\n \"render\": \"The changing table is located at {changing_table:location}\",\n \"condition\": \"changing_table=yes\",\n \"freeform\": {\n \"key\": \"changing_table:location\",\n \"inline\": true\n },\n \"mappings\": [\n {\n \"then\": \"The changing table is in the toilet for women.\",\n \"if\": \"changing_table:location=female_toilet\"\n },\n {\n \"then\": \"The changing table is in the toilet for men.\",\n \"if\": \"changing_table:location=male_toilet\"\n },\n {\n \"if\": \"changing_table:location=wheelchair_toilet\",\n \"then\": \"The changing table is in the toilet for wheelchair users.\",\n },\n {\n \"if\": \"changing_table:location=dedicated_room\",\n \"then\": \"The changing table is in a dedicated room. \",\n }\n ],\n \"id\": \"toilet-changing_table:location\"\n },\n```" }, { "path": [ "tagRenderings", "override", "condition", "and" ], "required": false, "hints": { "typehint": "tag" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" }, { "path": [ "tagRenderings", "override", "condition", "or" ], "required": false, "hints": { "typehint": "tag" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" }, { "path": [ "tagRenderings", "override", "metacondition" ], "required": false, "hints": { "question": "When should this item be shown (including special conditions)?" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "$ref": "#/definitions/{or:TagConfigJson[];}" }, { "type": "string" } ], "description": "If set, this tag will be evaluated agains the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options.\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_" }, { "path": [ "tagRenderings", "override", "metacondition", "and" ], "required": false, "hints": { "typehint": "tag" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" }, { "path": [ "tagRenderings", "override", "metacondition", "or" ], "required": false, "hints": { "typehint": "tag" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" }, { "path": [ "tagRenderings", "override", "description" ], "required": false, "hints": {}, "type": [ { "$ref": "#/definitions/Record" }, { "type": "string" } ], "description": "A human-readable text explaining what this tagRendering does.\nMostly used for the shared tagrenderings" }, { "path": [ "tagRenderings", "override", "classes" ], "required": false, "hints": { "question": "What css-classes should be applied to showing this attribute?" }, "type": "string", "description": "A list of css-classes to apply to the entire tagRendering.\nThese classes are applied in 'answer'-mode, not in question mode\nThis is only for advanced users.\nValues are split on ` ` (space)" }, { "path": [ "tagRenderings" ], "required": false, "hints": {}, "type": "object", "description": "Rewrites and multiplies the given renderings of type T.\nThis can be used for introducing many similar questions automatically,\nwhich also makes translations easier.\n(Note that the key does _not_ need to be wrapped in {}.\nHowever, we recommend to use them if the key is used in a translation, as missing keys will be picked up and warned for by the translation scripts)\nFor example:\n```\n{\n rewrite: {\n sourceString: [\"key\", \"a|b|c\"],\n into: [\n [\"X\", 0]\n [\"Y\", 1],\n [\"Z\", 2]\n ],\n renderings: [{\n \"key\":\"a|b|c\"\n }]\n }\n}\n```\nwill result in _three_ copies (as the values to rewrite into have three values, namely:\n[\n {\n # The first pair: key --> X, a|b|c --> 0\n \"X\": 0\n },\n {\n \"Y\": 1\n },\n {\n \"Z\": 2\n }\n]" }, { "path": [ "tagRenderings", "renderings", "mappings" ], "required": false, "hints": { "question": "What are common options?" }, "type": "array", "description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes" }, { "path": [ "tagRenderings", "renderings", "mappings", "if" ], "required": true, "hints": { "typehint": "tag", "question": "What tags should be matched to show this option?" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "If in 'question'-mode and the contributor selects this option, these tags will be applied to the object" }, { "path": [ "tagRenderings", "renderings", "mappings", "then" ], "required": true, "hints": { "typehint": "rendered", "question": "What corresponding text should be shown?" }, "type": [ { "$ref": "#/definitions/Record" }, { "type": "string" } ], "description": "Shown if the `if` is fulfilled" }, { "path": [ "tagRenderings", "renderings", "mappings", "icon" ], "required": false, "hints": { "typehint": "icon", "question": "What icon should be shown next to this mapping?", "ifunset": "Show no icon" }, "type": [ { "type": "object", "properties": { "path": { "description": "The path to the icon\nType: icon", "type": "string" }, "class": { "description": "Size of the image", "type": "string" } }, "required": [ "path" ] }, { "type": "string" } ], "description": "This icon will only be shown if the value is known, it is not displayed in the options (but might be in the future)" }, { "path": [ "tagRenderings", "renderings", "mappings", "icon", "path" ], "required": true, "hints": { "typehint": "icon" }, "type": "string", "description": "The path to the icon" }, { "path": [ "tagRenderings", "renderings", "mappings", "icon", "class" ], "required": false, "hints": {}, "type": "string", "description": "Size of the image" }, { "path": [ "tagRenderings", "renderings", "mappings", "hideInAnswer" ], "required": false, "hints": { "typehint": "tag", "question": "Under what circumstances should this mapping be hidden from the possibilities a contributor can pick?", "iftrue": "Never show this mapping as option to pick", "ifunset": "Always show this mapping as option to pick" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "$ref": "#/definitions/{or:TagConfigJson[];}" }, { "type": [ "string", "boolean" ] } ], "description": "In some cases, multiple taggings exist (e.g. a default assumption, or a commonly mapped abbreviation and a fully written variation).\nIn the latter case, a correct text should be shown, but only a single, canonical tagging should be selectable by the user.\nIn this case, one of the mappings can be hiden by setting this flag.\nTo demonstrate an example making a default assumption:\nmappings: [\n {\n if: \"access=\", -- no access tag present, we assume accessible\n then: \"Accessible to the general public\",\n hideInAnswer: true\n },\n {\n if: \"access=yes\",\n then: \"Accessible to the general public\", -- the user selected this, we add that to OSM\n },\n {\n if: \"access=no\",\n then: \"Not accessible to the public\"\n }\n]\nFor example, for an operator, we have `operator=Agentschap Natuur en Bos`, which is often abbreviated to `operator=ANB`.\nThen, we would add two mappings:\n{\n if: \"operator=Agentschap Natuur en Bos\" -- the non-abbreviated version which should be uploaded\n then: \"Maintained by Agentschap Natuur en Bos\"\n},\n{\n if: \"operator=ANB\", -- we don't want to upload abbreviations\n then: \"Maintained by Agentschap Natuur en Bos\"\n hideInAnswer: true\n}\nHide in answer can also be a tagsfilter, e.g. to make sure an option is only shown when appropriate.\nKeep in mind that this is reverse logic: it will be hidden in the answer if the condition is true, it will thus only show in the case of a mismatch\ne.g., for toilets: if \"wheelchair=no\", we know there is no wheelchair dedicated room.\nFor the location of the changing table, the option \"in the wheelchair accessible toilet is weird\", so we write:\n{\n \"question\": \"Where is the changing table located?\"\n \"mappings\": [\n {\"if\":\"changing_table:location=female\",\"then\":\"In the female restroom\"},\n {\"if\":\"changing_table:location=male\",\"then\":\"In the male restroom\"},\n {\"if\":\"changing_table:location=wheelchair\",\"then\":\"In the wheelchair accessible restroom\", \"hideInAnswer\": \"wheelchair=no\"},\n ]\n}\nAlso have a look for the meta-tags\n{\n if: \"operator=Agentschap Natuur en Bos\",\n then: \"Maintained by Agentschap Natuur en Bos\",\n hideInAnswer: \"_country!=be\"\n}" }, { "path": [ "tagRenderings", "renderings", "mappings", "hideInAnswer", "and" ], "required": false, "hints": { "typehint": "tag" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" }, { "path": [ "tagRenderings", "renderings", "mappings", "hideInAnswer", "or" ], "required": false, "hints": { "typehint": "tag" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" }, { "path": [ "tagRenderings", "renderings", "mappings", "ifnot" ], "required": false, "hints": { "question": "What tags should be applied if this mapping is _not_ chosen?" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "$ref": "#/definitions/{or:TagConfigJson[];}" }, { "type": "string" } ], "description": "Only applicable if 'multiAnswer' is set.\nThis is for situations such as:\n`accepts:coins=no` where one can select all the possible payment methods. However, we want to make explicit that some options _were not_ selected.\nThis can be done with `ifnot`\nNote that we can not explicitly render this negative case to the user, we cannot show `does _not_ accept coins`.\nIf this is important to your usecase, consider using multiple radiobutton-fields without `multiAnswer`" }, { "path": [ "tagRenderings", "renderings", "mappings", "ifnot", "and" ], "required": false, "hints": { "typehint": "tag" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" }, { "path": [ "tagRenderings", "renderings", "mappings", "ifnot", "or" ], "required": false, "hints": { "typehint": "tag" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" }, { "path": [ "tagRenderings", "renderings", "mappings", "addExtraTags" ], "required": false, "hints": { "typehint": "simple_tag[]", "question": "What extra tags should be added to the object if this object is chosen?" }, "type": "array", "description": "If chosen as answer, these tags will be applied onto the object, together with the tags from the `if`\nNot compatible with multiAnswer.\nThis can be used e.g. to erase other keys which indicate the 'not' value:\n```json\n{\n \"if\": \"crossing:marking=rainbow\",\n \"then\": \"This is a rainbow crossing\",\n \"addExtraTags\": [\"not:crossing:marking=\"]\n}\n```" }, { "path": [ "tagRenderings", "renderings", "mappings", "searchTerms" ], "required": false, "hints": { "group": "hidden", "question": "If there are many options, what search terms match too?" }, "type": "object", "description": "If there are many options, the mappings-radiobuttons will be replaced by an element with a searchfunction\nSearchterms (per language) allow to easily find an option if there are many options" }, { "path": [ "tagRenderings", "renderings", "mappings", "priorityIf" ], "required": false, "hints": { "group": "hidden" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "$ref": "#/definitions/{or:TagConfigJson[];}" }, { "type": "string" } ], "description": "If the searchable selector is picked, mappings with this item will have priority and show up even if the others are hidden\nUse this sparingly" }, { "path": [ "tagRenderings", "renderings", "mappings", "priorityIf", "and" ], "required": false, "hints": { "typehint": "tag" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" }, { "path": [ "tagRenderings", "renderings", "mappings", "priorityIf", "or" ], "required": false, "hints": { "typehint": "tag" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" }, { "path": [ "tagRenderings", "renderings", "mappings", "#" ], "required": false, "hints": { "group": "hidden" }, "type": "string", "description": "Used for comments or to disable a validation\nignore-image-in-then: normally, a `then`-clause is not allowed to have an `img`-html-element as icons are preferred. In some cases (most notably title-icons), this is allowed" }, { "path": [ "tagRenderings", "renderings", "multiAnswer" ], "required": false, "hints": { "question": "Should a contributor be allowed to select multiple mappings?", "iftrue": "allow to select multiple mappigns", "iffalse": "only allow to select a single mapping", "ifunset": "only allow to select a single mapping" }, "type": "boolean", "description": "If true, use checkboxes instead of radio buttons when asking the question" }, { "path": [ "tagRenderings", "renderings", "freeform" ], "required": false, "hints": {}, "type": "object", "description": "Allow freeform text input from the user" }, { "path": [ "tagRenderings", "renderings", "freeform", "key" ], "required": true, "hints": { "ifunset": "do not offer a freeform textfield as answer option" }, "type": "string", "description": "question What is the name of the attribute that should be written to?" }, { "path": [ "tagRenderings", "renderings", "freeform", "type" ], "required": false, "hints": { "question": "What is the input type?", "suggestions": [ { "if": "value=string", "then": "string A simple piece of text" }, { "if": "value=text", "then": "text A longer piece of text. Uses an textArea instead of a textField" }, { "if": "value=date", "then": "date A date with date picker" }, { "if": "value=nat", "then": "nat A whole, positive number or zero" }, { "if": "value=int", "then": "int A whole number, either positive, negative or zero" }, { "if": "value=distance", "then": "distance A geographical distance in meters (rounded at two points). Will give an extra minimap with a measurement tool. Arguments: [ zoomlevel, preferredBackgroundMapType (comma separated) ], e.g. `[\"21\", \"map,photo\"]" }, { "if": "value=direction", "then": "direction A geographical direction, in degrees. 0° is north, 90° is east, ... Will return a value between 0 (incl) and 360 (excl)." }, { "if": "value=wikidata", "then": "wikidata A wikidata identifier, e.g. Q42. " }, { "if": "value=pnat", "then": "pnat A strict positive number" }, { "if": "value=float", "then": "float A decimal number" }, { "if": "value=pfloat", "then": "pfloat A positive decimal number or zero" }, { "if": "value=email", "then": "email An email adress" }, { "if": "value=url", "then": "url The validatedTextField will format URLs to always be valid and have a https://-header (even though the 'https'-part will be hidden from the user. Furthermore, some tracking parameters will be removed" }, { "if": "value=phone", "then": "phone A phone number" }, { "if": "value=opening_hours", "then": "opening_hours Has extra elements to easily input when a POI is opened. " }, { "if": "value=color", "then": "color Shows a color picker" }, { "if": "value=icon", "then": "icon Makes sure that a valid .svg-path is added" }, { "if": "value=fediverse", "then": "fediverse Validates fediverse addresses and normalizes them into `@username@server`-format" } ] }, "type": "string", "description": "The type of the text-field, e.g. 'string', 'nat', 'float', 'date',...\nSee Docs/SpecialInputElements.md and UI/Input/ValidatedTextField.ts for supported values" }, { "path": [ "tagRenderings", "renderings", "freeform", "placeholder" ], "required": false, "hints": {}, "description": "A (translated) text that is shown (as gray text) within the textfield" }, { "path": [ "tagRenderings", "renderings", "freeform", "helperArgs" ], "required": false, "hints": {}, "type": "array", "description": "Extra parameters to initialize the input helper arguments.\nFor semantics, see the 'SpecialInputElements.md'" }, { "path": [ "tagRenderings", "renderings", "freeform", "addExtraTags" ], "required": false, "hints": {}, "type": "array", "description": "If a value is added with the textfield, these extra tag is addded.\nUseful to add a 'fixme=freeform textfield used - to be checked'" }, { "path": [ "tagRenderings", "renderings", "freeform", "inline" ], "required": false, "hints": { "question": "Show the freeform as box within the question?", "iftrue": "show the freeform input field as a small field within the question", "ifunset": "show the freeform input field full-width" }, "type": "boolean", "description": "Instead of showing a full-width text field, the text field will be shown within the rendering of the question.\nThis combines badly with special input elements, as it'll distort the layout." }, { "path": [ "tagRenderings", "renderings", "freeform", "default" ], "required": false, "hints": {}, "type": "string", "description": "default value to enter if no previous tagging is present.\nNormally undefined (aka do not enter anything)" }, { "path": [ "tagRenderings", "renderings", "question" ], "required": false, "hints": { "question": "What question should be shown to the contributor?", "ifunset": "This tagrendering will be shown if it is known, but cannot be edited by the contributor, effectively resutling in a read-only rendering" }, "type": [ { "$ref": "#/definitions/Record" }, { "type": "string" } ], "description": "A question is presented ot the user if no mapping matches and the 'freeform' key is not set as well." }, { "path": [ "tagRenderings", "renderings", "questionHint" ], "required": false, "hints": { "question": "Should some extra information be shown to the contributor, alongside the question?", "ifunset": "No extra hint is given" }, "type": [ { "$ref": "#/definitions/Record" }, { "type": "string" } ], "description": "This hint is shown in subtle text under the question.\nThis can give some extra information on what the answer should ook like" }, { "path": [ "tagRenderings", "renderings", "labels" ], "required": false, "hints": {}, "type": "array", "description": "A list of labels. These are strings that are used for various purposes, e.g. to only include a subset of the tagRenderings when reusing a layer" }, { "path": [ "tagRenderings", "renderings", "render" ], "required": false, "hints": { "typehint": "rendered", "question": "What text should be rendered?" }, "type": [ { "$ref": "#/definitions/Record" }, { "type": "object", "properties": { "special": { "allOf": [ { "$ref": "#/definitions/Record>" }, { "type": "object", "properties": { "type": { "type": "string" } }, "required": [ "type" ] } ] } }, "required": [ "special" ] }, { "type": "string" } ], "description": "This piece of text will be shown in the infobox.\nNote that \"&LBRACEkey&RBRACE\"-parts are substituted by the corresponding values of the element.\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`" }, { "path": [ "tagRenderings", "renderings", "icon" ], "required": false, "hints": { "typehint": "icon", "question": "what icon should be shown next to the 'render' value?" }, "type": [ { "type": "object", "properties": { "path": { "description": "The path to the icon\nType: icon", "type": "string" }, "class": { "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)", "type": "string" } }, "required": [ "path" ] }, { "type": "string" } ], "description": "An icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value" }, { "path": [ "tagRenderings", "renderings", "icon", "path" ], "required": true, "hints": { "typehint": "icon" }, "type": "string", "description": "The path to the icon" }, { "path": [ "tagRenderings", "renderings", "icon", "class" ], "required": false, "hints": {}, "type": "string", "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)" }, { "path": [ "tagRenderings", "renderings", "condition" ], "required": false, "hints": { "question": "When should this item be shown?" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "$ref": "#/definitions/{or:TagConfigJson[];}" }, { "type": "string" } ], "description": "Only show this tagrendering (or ask the question) if the selected object also matches the tags specified as `condition`.\nThis is useful to ask a follow-up question.\nFor example, within toilets, asking _where_ the diaper changing table is is only useful _if_ there is one.\nThis can be done by adding `\"condition\": \"changing_table=yes\"`\nA full example would be:\n```json\n {\n \"question\": \"Where is the changing table located?\",\n \"render\": \"The changing table is located at {changing_table:location}\",\n \"condition\": \"changing_table=yes\",\n \"freeform\": {\n \"key\": \"changing_table:location\",\n \"inline\": true\n },\n \"mappings\": [\n {\n \"then\": \"The changing table is in the toilet for women.\",\n \"if\": \"changing_table:location=female_toilet\"\n },\n {\n \"then\": \"The changing table is in the toilet for men.\",\n \"if\": \"changing_table:location=male_toilet\"\n },\n {\n \"if\": \"changing_table:location=wheelchair_toilet\",\n \"then\": \"The changing table is in the toilet for wheelchair users.\",\n },\n {\n \"if\": \"changing_table:location=dedicated_room\",\n \"then\": \"The changing table is in a dedicated room. \",\n }\n ],\n \"id\": \"toilet-changing_table:location\"\n },\n```" }, { "path": [ "tagRenderings", "renderings", "condition", "and" ], "required": false, "hints": { "typehint": "tag" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" }, { "path": [ "tagRenderings", "renderings", "condition", "or" ], "required": false, "hints": { "typehint": "tag" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" }, { "path": [ "tagRenderings", "renderings", "metacondition" ], "required": false, "hints": { "question": "When should this item be shown (including special conditions)?" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "$ref": "#/definitions/{or:TagConfigJson[];}" }, { "type": "string" } ], "description": "If set, this tag will be evaluated agains the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options.\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_" }, { "path": [ "tagRenderings", "renderings", "metacondition", "and" ], "required": false, "hints": { "typehint": "tag" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" }, { "path": [ "tagRenderings", "renderings", "metacondition", "or" ], "required": false, "hints": { "typehint": "tag" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" }, { "path": [ "tagRenderings", "renderings", "description" ], "required": false, "hints": {}, "type": [ { "$ref": "#/definitions/Record" }, { "type": "string" } ], "description": "A human-readable text explaining what this tagRendering does.\nMostly used for the shared tagrenderings" }, { "path": [ "tagRenderings", "renderings", "classes" ], "required": false, "hints": { "question": "What css-classes should be applied to showing this attribute?" }, "type": "string", "description": "A list of css-classes to apply to the entire tagRendering.\nThese classes are applied in 'answer'-mode, not in question mode\nThis is only for advanced users.\nValues are split on ` ` (space)" }, { "path": [ "tagRenderings", "renderings", "override", "mappings" ], "required": false, "hints": { "question": "What are common options?" }, "type": "array", "description": "Allows fixed-tag inputs, shown either as radiobuttons or as checkboxes" }, { "path": [ "tagRenderings", "renderings", "override", "mappings", "if" ], "required": true, "hints": { "typehint": "tag", "question": "What tags should be matched to show this option?" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "If in 'question'-mode and the contributor selects this option, these tags will be applied to the object" }, { "path": [ "tagRenderings", "renderings", "override", "mappings", "then" ], "required": true, "hints": { "typehint": "rendered", "question": "What corresponding text should be shown?" }, "type": [ { "$ref": "#/definitions/Record" }, { "type": "string" } ], "description": "Shown if the `if` is fulfilled" }, { "path": [ "tagRenderings", "renderings", "override", "mappings", "icon" ], "required": false, "hints": { "typehint": "icon", "question": "What icon should be shown next to this mapping?", "ifunset": "Show no icon" }, "type": [ { "type": "object", "properties": { "path": { "description": "The path to the icon\nType: icon", "type": "string" }, "class": { "description": "Size of the image", "type": "string" } }, "required": [ "path" ] }, { "type": "string" } ], "description": "This icon will only be shown if the value is known, it is not displayed in the options (but might be in the future)" }, { "path": [ "tagRenderings", "renderings", "override", "mappings", "icon", "path" ], "required": true, "hints": { "typehint": "icon" }, "type": "string", "description": "The path to the icon" }, { "path": [ "tagRenderings", "renderings", "override", "mappings", "icon", "class" ], "required": false, "hints": {}, "type": "string", "description": "Size of the image" }, { "path": [ "tagRenderings", "renderings", "override", "mappings", "hideInAnswer" ], "required": false, "hints": { "typehint": "tag", "question": "Under what circumstances should this mapping be hidden from the possibilities a contributor can pick?", "iftrue": "Never show this mapping as option to pick", "ifunset": "Always show this mapping as option to pick" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "$ref": "#/definitions/{or:TagConfigJson[];}" }, { "type": [ "string", "boolean" ] } ], "description": "In some cases, multiple taggings exist (e.g. a default assumption, or a commonly mapped abbreviation and a fully written variation).\nIn the latter case, a correct text should be shown, but only a single, canonical tagging should be selectable by the user.\nIn this case, one of the mappings can be hiden by setting this flag.\nTo demonstrate an example making a default assumption:\nmappings: [\n {\n if: \"access=\", -- no access tag present, we assume accessible\n then: \"Accessible to the general public\",\n hideInAnswer: true\n },\n {\n if: \"access=yes\",\n then: \"Accessible to the general public\", -- the user selected this, we add that to OSM\n },\n {\n if: \"access=no\",\n then: \"Not accessible to the public\"\n }\n]\nFor example, for an operator, we have `operator=Agentschap Natuur en Bos`, which is often abbreviated to `operator=ANB`.\nThen, we would add two mappings:\n{\n if: \"operator=Agentschap Natuur en Bos\" -- the non-abbreviated version which should be uploaded\n then: \"Maintained by Agentschap Natuur en Bos\"\n},\n{\n if: \"operator=ANB\", -- we don't want to upload abbreviations\n then: \"Maintained by Agentschap Natuur en Bos\"\n hideInAnswer: true\n}\nHide in answer can also be a tagsfilter, e.g. to make sure an option is only shown when appropriate.\nKeep in mind that this is reverse logic: it will be hidden in the answer if the condition is true, it will thus only show in the case of a mismatch\ne.g., for toilets: if \"wheelchair=no\", we know there is no wheelchair dedicated room.\nFor the location of the changing table, the option \"in the wheelchair accessible toilet is weird\", so we write:\n{\n \"question\": \"Where is the changing table located?\"\n \"mappings\": [\n {\"if\":\"changing_table:location=female\",\"then\":\"In the female restroom\"},\n {\"if\":\"changing_table:location=male\",\"then\":\"In the male restroom\"},\n {\"if\":\"changing_table:location=wheelchair\",\"then\":\"In the wheelchair accessible restroom\", \"hideInAnswer\": \"wheelchair=no\"},\n ]\n}\nAlso have a look for the meta-tags\n{\n if: \"operator=Agentschap Natuur en Bos\",\n then: \"Maintained by Agentschap Natuur en Bos\",\n hideInAnswer: \"_country!=be\"\n}" }, { "path": [ "tagRenderings", "renderings", "override", "mappings", "hideInAnswer", "and" ], "required": false, "hints": { "typehint": "tag" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" }, { "path": [ "tagRenderings", "renderings", "override", "mappings", "hideInAnswer", "or" ], "required": false, "hints": { "typehint": "tag" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" }, { "path": [ "tagRenderings", "renderings", "override", "mappings", "ifnot" ], "required": false, "hints": { "question": "What tags should be applied if this mapping is _not_ chosen?" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "$ref": "#/definitions/{or:TagConfigJson[];}" }, { "type": "string" } ], "description": "Only applicable if 'multiAnswer' is set.\nThis is for situations such as:\n`accepts:coins=no` where one can select all the possible payment methods. However, we want to make explicit that some options _were not_ selected.\nThis can be done with `ifnot`\nNote that we can not explicitly render this negative case to the user, we cannot show `does _not_ accept coins`.\nIf this is important to your usecase, consider using multiple radiobutton-fields without `multiAnswer`" }, { "path": [ "tagRenderings", "renderings", "override", "mappings", "ifnot", "and" ], "required": false, "hints": { "typehint": "tag" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" }, { "path": [ "tagRenderings", "renderings", "override", "mappings", "ifnot", "or" ], "required": false, "hints": { "typehint": "tag" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" }, { "path": [ "tagRenderings", "renderings", "override", "mappings", "addExtraTags" ], "required": false, "hints": { "typehint": "simple_tag[]", "question": "What extra tags should be added to the object if this object is chosen?" }, "type": "array", "description": "If chosen as answer, these tags will be applied onto the object, together with the tags from the `if`\nNot compatible with multiAnswer.\nThis can be used e.g. to erase other keys which indicate the 'not' value:\n```json\n{\n \"if\": \"crossing:marking=rainbow\",\n \"then\": \"This is a rainbow crossing\",\n \"addExtraTags\": [\"not:crossing:marking=\"]\n}\n```" }, { "path": [ "tagRenderings", "renderings", "override", "mappings", "searchTerms" ], "required": false, "hints": { "group": "hidden", "question": "If there are many options, what search terms match too?" }, "type": "object", "description": "If there are many options, the mappings-radiobuttons will be replaced by an element with a searchfunction\nSearchterms (per language) allow to easily find an option if there are many options" }, { "path": [ "tagRenderings", "renderings", "override", "mappings", "priorityIf" ], "required": false, "hints": { "group": "hidden" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "$ref": "#/definitions/{or:TagConfigJson[];}" }, { "type": "string" } ], "description": "If the searchable selector is picked, mappings with this item will have priority and show up even if the others are hidden\nUse this sparingly" }, { "path": [ "tagRenderings", "renderings", "override", "mappings", "priorityIf", "and" ], "required": false, "hints": { "typehint": "tag" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" }, { "path": [ "tagRenderings", "renderings", "override", "mappings", "priorityIf", "or" ], "required": false, "hints": { "typehint": "tag" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" }, { "path": [ "tagRenderings", "renderings", "override", "mappings", "#" ], "required": false, "hints": { "group": "hidden" }, "type": "string", "description": "Used for comments or to disable a validation\nignore-image-in-then: normally, a `then`-clause is not allowed to have an `img`-html-element as icons are preferred. In some cases (most notably title-icons), this is allowed" }, { "path": [ "tagRenderings", "renderings", "override", "multiAnswer" ], "required": false, "hints": { "question": "Should a contributor be allowed to select multiple mappings?", "iftrue": "allow to select multiple mappigns", "iffalse": "only allow to select a single mapping", "ifunset": "only allow to select a single mapping" }, "type": "boolean", "description": "If true, use checkboxes instead of radio buttons when asking the question" }, { "path": [ "tagRenderings", "renderings", "override", "freeform" ], "required": false, "hints": {}, "type": "object", "description": "Allow freeform text input from the user" }, { "path": [ "tagRenderings", "renderings", "override", "freeform", "key" ], "required": true, "hints": { "ifunset": "do not offer a freeform textfield as answer option" }, "type": "string", "description": "question What is the name of the attribute that should be written to?" }, { "path": [ "tagRenderings", "renderings", "override", "freeform", "type" ], "required": false, "hints": { "question": "What is the input type?", "suggestions": [ { "if": "value=string", "then": "string A simple piece of text" }, { "if": "value=text", "then": "text A longer piece of text. Uses an textArea instead of a textField" }, { "if": "value=date", "then": "date A date with date picker" }, { "if": "value=nat", "then": "nat A whole, positive number or zero" }, { "if": "value=int", "then": "int A whole number, either positive, negative or zero" }, { "if": "value=distance", "then": "distance A geographical distance in meters (rounded at two points). Will give an extra minimap with a measurement tool. Arguments: [ zoomlevel, preferredBackgroundMapType (comma separated) ], e.g. `[\"21\", \"map,photo\"]" }, { "if": "value=direction", "then": "direction A geographical direction, in degrees. 0° is north, 90° is east, ... Will return a value between 0 (incl) and 360 (excl)." }, { "if": "value=wikidata", "then": "wikidata A wikidata identifier, e.g. Q42. " }, { "if": "value=pnat", "then": "pnat A strict positive number" }, { "if": "value=float", "then": "float A decimal number" }, { "if": "value=pfloat", "then": "pfloat A positive decimal number or zero" }, { "if": "value=email", "then": "email An email adress" }, { "if": "value=url", "then": "url The validatedTextField will format URLs to always be valid and have a https://-header (even though the 'https'-part will be hidden from the user. Furthermore, some tracking parameters will be removed" }, { "if": "value=phone", "then": "phone A phone number" }, { "if": "value=opening_hours", "then": "opening_hours Has extra elements to easily input when a POI is opened. " }, { "if": "value=color", "then": "color Shows a color picker" }, { "if": "value=icon", "then": "icon Makes sure that a valid .svg-path is added" }, { "if": "value=fediverse", "then": "fediverse Validates fediverse addresses and normalizes them into `@username@server`-format" } ] }, "type": "string", "description": "The type of the text-field, e.g. 'string', 'nat', 'float', 'date',...\nSee Docs/SpecialInputElements.md and UI/Input/ValidatedTextField.ts for supported values" }, { "path": [ "tagRenderings", "renderings", "override", "freeform", "placeholder" ], "required": false, "hints": {}, "description": "A (translated) text that is shown (as gray text) within the textfield" }, { "path": [ "tagRenderings", "renderings", "override", "freeform", "helperArgs" ], "required": false, "hints": {}, "type": "array", "description": "Extra parameters to initialize the input helper arguments.\nFor semantics, see the 'SpecialInputElements.md'" }, { "path": [ "tagRenderings", "renderings", "override", "freeform", "addExtraTags" ], "required": false, "hints": {}, "type": "array", "description": "If a value is added with the textfield, these extra tag is addded.\nUseful to add a 'fixme=freeform textfield used - to be checked'" }, { "path": [ "tagRenderings", "renderings", "override", "freeform", "inline" ], "required": false, "hints": { "question": "Show the freeform as box within the question?", "iftrue": "show the freeform input field as a small field within the question", "ifunset": "show the freeform input field full-width" }, "type": "boolean", "description": "Instead of showing a full-width text field, the text field will be shown within the rendering of the question.\nThis combines badly with special input elements, as it'll distort the layout." }, { "path": [ "tagRenderings", "renderings", "override", "freeform", "default" ], "required": false, "hints": {}, "type": "string", "description": "default value to enter if no previous tagging is present.\nNormally undefined (aka do not enter anything)" }, { "path": [ "tagRenderings", "renderings", "override", "question" ], "required": false, "hints": { "question": "What question should be shown to the contributor?", "ifunset": "This tagrendering will be shown if it is known, but cannot be edited by the contributor, effectively resutling in a read-only rendering" }, "type": [ { "$ref": "#/definitions/Record" }, { "type": "string" } ], "description": "A question is presented ot the user if no mapping matches and the 'freeform' key is not set as well." }, { "path": [ "tagRenderings", "renderings", "override", "questionHint" ], "required": false, "hints": { "question": "Should some extra information be shown to the contributor, alongside the question?", "ifunset": "No extra hint is given" }, "type": [ { "$ref": "#/definitions/Record" }, { "type": "string" } ], "description": "This hint is shown in subtle text under the question.\nThis can give some extra information on what the answer should ook like" }, { "path": [ "tagRenderings", "renderings", "override", "labels" ], "required": false, "hints": {}, "type": "array", "description": "A list of labels. These are strings that are used for various purposes, e.g. to only include a subset of the tagRenderings when reusing a layer" }, { "path": [ "tagRenderings", "renderings", "override", "render" ], "required": false, "hints": { "typehint": "rendered", "question": "What text should be rendered?" }, "type": [ { "$ref": "#/definitions/Record" }, { "type": "object", "properties": { "special": { "allOf": [ { "$ref": "#/definitions/Record>" }, { "type": "object", "properties": { "type": { "type": "string" } }, "required": [ "type" ] } ] } }, "required": [ "special" ] }, { "type": "string" } ], "description": "This piece of text will be shown in the infobox.\nNote that \"&LBRACEkey&RBRACE\"-parts are substituted by the corresponding values of the element.\nThis text will be shown if:\n- there is no mapping which matches (or there are no matches)\n- no question, no mappings and no 'freeform' is set\nNote that this is a HTML-interpreted value, so you can add links as e.g. '<a href='{website}'>{website}</a>' or include images such as `This is of type A <br><img src='typeA-icon.svg' />`" }, { "path": [ "tagRenderings", "renderings", "override", "icon" ], "required": false, "hints": { "typehint": "icon", "question": "what icon should be shown next to the 'render' value?" }, "type": [ { "type": "object", "properties": { "path": { "description": "The path to the icon\nType: icon", "type": "string" }, "class": { "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)", "type": "string" } }, "required": [ "path" ] }, { "type": "string" } ], "description": "An icon shown next to the rendering; typically shown pretty small\nThis is only shown next to the \"render\" value" }, { "path": [ "tagRenderings", "renderings", "override", "icon", "path" ], "required": true, "hints": { "typehint": "icon" }, "type": "string", "description": "The path to the icon" }, { "path": [ "tagRenderings", "renderings", "override", "icon", "class" ], "required": false, "hints": {}, "type": "string", "description": "A hint to mapcomplete on how to render this icon within the mapping.\nThis is translated to 'mapping-icon-', so defining your own in combination with a custom CSS is possible (but discouraged)" }, { "path": [ "tagRenderings", "renderings", "override", "condition" ], "required": false, "hints": { "question": "When should this item be shown?" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "$ref": "#/definitions/{or:TagConfigJson[];}" }, { "type": "string" } ], "description": "Only show this tagrendering (or ask the question) if the selected object also matches the tags specified as `condition`.\nThis is useful to ask a follow-up question.\nFor example, within toilets, asking _where_ the diaper changing table is is only useful _if_ there is one.\nThis can be done by adding `\"condition\": \"changing_table=yes\"`\nA full example would be:\n```json\n {\n \"question\": \"Where is the changing table located?\",\n \"render\": \"The changing table is located at {changing_table:location}\",\n \"condition\": \"changing_table=yes\",\n \"freeform\": {\n \"key\": \"changing_table:location\",\n \"inline\": true\n },\n \"mappings\": [\n {\n \"then\": \"The changing table is in the toilet for women.\",\n \"if\": \"changing_table:location=female_toilet\"\n },\n {\n \"then\": \"The changing table is in the toilet for men.\",\n \"if\": \"changing_table:location=male_toilet\"\n },\n {\n \"if\": \"changing_table:location=wheelchair_toilet\",\n \"then\": \"The changing table is in the toilet for wheelchair users.\",\n },\n {\n \"if\": \"changing_table:location=dedicated_room\",\n \"then\": \"The changing table is in a dedicated room. \",\n }\n ],\n \"id\": \"toilet-changing_table:location\"\n },\n```" }, { "path": [ "tagRenderings", "renderings", "override", "condition", "and" ], "required": false, "hints": { "typehint": "tag" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" }, { "path": [ "tagRenderings", "renderings", "override", "condition", "or" ], "required": false, "hints": { "typehint": "tag" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" }, { "path": [ "tagRenderings", "renderings", "override", "metacondition" ], "required": false, "hints": { "question": "When should this item be shown (including special conditions)?" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "$ref": "#/definitions/{or:TagConfigJson[];}" }, { "type": "string" } ], "description": "If set, this tag will be evaluated agains the _usersettings/application state_ table.\nEnable 'show debug info' in user settings to see available options.\nNote that values with an underscore depicts _application state_ (including metainfo about the user) whereas values without an underscore depict _user settings_" }, { "path": [ "tagRenderings", "renderings", "override", "metacondition", "and" ], "required": false, "hints": { "typehint": "tag" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" }, { "path": [ "tagRenderings", "renderings", "override", "metacondition", "or" ], "required": false, "hints": { "typehint": "tag" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" }, { "path": [ "tagRenderings", "renderings", "override", "description" ], "required": false, "hints": {}, "type": [ { "$ref": "#/definitions/Record" }, { "type": "string" } ], "description": "A human-readable text explaining what this tagRendering does.\nMostly used for the shared tagrenderings" }, { "path": [ "tagRenderings", "renderings", "override", "classes" ], "required": false, "hints": { "question": "What css-classes should be applied to showing this attribute?" }, "type": "string", "description": "A list of css-classes to apply to the entire tagRendering.\nThese classes are applied in 'answer'-mode, not in question mode\nThis is only for advanced users.\nValues are split on ` ` (space)" }, { "path": [ "filter" ], "required": false, "hints": { "group": "filters" }, "type": [ { "type": "array", "items": { "anyOf": [ { "$ref": "#/definitions/default_1" }, { "type": "string" } ] } }, { "type": "object", "properties": { "sameAs": { "type": "string" } }, "required": [ "sameAs" ] } ], "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" }, { "path": [ "filter", "id" ], "required": true, "hints": {}, "type": "string", "description": "An id/name for this filter, used to set the URL parameters" }, { "path": [ "filter", "options" ], "required": true, "hints": {}, "type": "array", "description": "The options for a filter\nIf there are multiple options these will be a list of radio buttons\nIf there is only one option this will be a checkbox\nFiltering is done based on the given osmTags that are compared to the objects in that layer.\nAn example which searches by name:\n```\n{\n \"id\": \"shop-name\",\n \"options\": [\n {\n \"fields\": [\n {\n \"name\": \"search\",\n \"type\": \"string\"\n }\n ],\n \"osmTags\": \"name~i~.*{search}.*\",\n \"question\": {\n \"en\": \"Only show shops with name {search}\",\n }\n }\n ]\n }\n ```" }, { "path": [ "filter", "options", "osmTags" ], "required": false, "hints": { "typehint": "tag" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "$ref": "#/definitions/{or:TagConfigJson[];}" }, { "type": "string" } ], "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" }, { "path": [ "filter", "options", "osmTags", "and" ], "required": false, "hints": { "typehint": "tag" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" }, { "path": [ "filter", "options", "osmTags", "or" ], "required": false, "hints": { "typehint": "tag" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" }, { "path": [ "filter", "options", "fields", "name" ], "required": true, "hints": {}, "type": "string", "description": "If name is `search`, use \"_first_comment~.*{search}.*\" as osmTags" }, { "path": [ "filter", "#" ], "required": false, "hints": {}, "type": "string", "description": "Used for comments or to disable a check\n\"ignore-possible-duplicate\": disables a check in `DetectDuplicateFilters` which complains that a filter can be replaced by a filter from the `filters`-library-layer" }, { "path": [ "deletion" ], "required": false, "hints": { "types": "Use an advanced delete configuration ; boolean", "group": "editing", "iftrue": "Allow deletion", "iffalse": "Do not allow deletion" }, "type": [ { "type": "object", "properties": { "neededChangesets": { "description": "*\nBy default, the contributor needs 20 previous changesets to delete points edited by others.\nFor some small features (e.g. bicycle racks) this is too much and this requirement can be lowered or dropped, which can be done here.\n\ntype: nat\nquestion: How many changesets must a contributor have before being allowed to delete a point?", "type": "number" }, "extraDeleteReasons": { "description": "*\nBy default, three reasons to delete a point are shown:\n\n- The point does not exist anymore\n- The point was a testing point\n- THe point could not be found\n\nHowever, for some layers, there might be different or more specific reasons for deletion which can be user friendly to set, e.g.:\n\n- the shop has closed\n- the climbing route has been closed of for nature conservation reasons\n- ...\n\nThese reasons can be stated here and will be shown in the list of options the user can choose from", "type": "array", "items": { "type": "object", "properties": { "explanation": { "description": "The text that will be shown to the user as option for why this point does not exist anymore.\nNote that the most common reasons (test point, does not exist anymore, cannot be found) are already offered by default\n\nquestion: For what extra reason might this feature be removed in real-life?" }, "changesetMessage": { "description": "The text that will be uploaded into the changeset or will be used in the fixme in case of a soft deletion\nShould be a few words, in english\n\nquestion: What should be added to the changeset as delete reason?", "type": "string" } }, "required": [ "changesetMessage", "explanation" ] } }, "nonDeleteMappings": { "description": "In some cases, a (starting) contributor might wish to delete a feature even though deletion is not appropriate.\n(The most relevant case are small paths running over private property. These should be marked as 'private' instead of deleted, as the community might trace the path again from aerial imagery, gettting us back to the original situation).\n\nBy adding a 'nonDeleteMapping', an option can be added into the list which will retag the feature.\nIt is important that the feature will be retagged in such a way that it won't be picked up by the layer anymore!", "type": "array", "items": { "type": "object", "properties": { "if": { "$ref": "#/definitions/TagConfigJson", "description": "The tags that will be given to the object.\nThis must remove tags so that the 'source/osmTags' won't match anymore\n\nquestion: What tags should be applied to the object?" }, "then": { "description": "The human explanation for the options\n\nquestion: What text should be shown to the contributor for this reason?" } }, "required": [ "if", "then" ] } }, "softDeletionTags": { "description": "In some cases, the contributor is not allowed to delete the current feature (e.g. because it isn't a point, the point is referenced by a relation or the user isn't experienced enough).\nTo still offer the user a 'delete'-option, the feature is retagged with these tags. This is a soft deletion, as the point isn't actually removed from OSM but rather marked as 'disused'\nIt is important that the feature will be retagged in such a way that it won't be picked up by the layer anymore!\n\nExample (note that \"amenity=\" erases the 'amenity'-key alltogether):\n\n```\n{\n \"and\": [\"disussed:amenity=public_bookcase\", \"amenity=\"]\n}\n```\n\nor (notice the use of the ':='-tag to copy the old value of 'shop=*' into 'disused:shop='):\n\n```\n{\n \"and\": [\"disused:shop:={shop}\", \"shop=\"]\n}\n```\n\nquestion: If a hard delete is not possible, what tags should be applied to mark this feature as deleted?\ntype: tag", "anyOf": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "$ref": "#/definitions/{or:TagConfigJson[];}" }, { "type": "string" } ] }, "omitDefaultDeleteReasons": { "description": "Set this flag if the default delete reasons should be omitted from the dialog.\nThis requires at least one extraDeleteReason or nonDeleteMapping\n\nquestion: Should the default delete reasons be hidden?\niftrue: Hide the default delete reasons\niffalse: Show the default delete reasons\nifunset: Show the default delete reasons (default behaviour)", "type": "boolean" } }, "additionalProperties": false }, { "type": "boolean" } ], "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.\nTo configure, the following values are possible:\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### The delete dialog\n#### Hard deletion if enough experience\nA feature can only be deleted from OpenStreetMap by mapcomplete if:\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)\nIn all other cases, a 'soft deletion' is used.\n#### Soft deletion\nA 'soft deletion' is when the point isn't deleted fromOSM 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.\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##### No-delete options\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!)\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." }, { "path": [ "deletion", "neededChangesets" ], "required": false, "hints": { "typehint": "nat", "question": "How many changesets must a contributor have before being allowed to delete a point?" }, "type": "number", "description": "*\nBy default, the contributor needs 20 previous changesets to delete points edited by others.\nFor some small features (e.g. bicycle racks) this is too much and this requirement can be lowered or dropped, which can be done here." }, { "path": [ "deletion", "extraDeleteReasons" ], "required": false, "hints": {}, "type": "array", "description": "*\nBy default, three reasons to delete a point are shown:\n- The point does not exist anymore\n- The point was a testing point\n- THe point could not be found\nHowever, for some layers, there might be different or more specific reasons for deletion which can be user friendly to set, e.g.:\n- the shop has closed\n- the climbing route has been closed of for nature conservation reasons\n- ...\nThese reasons can be stated here and will be shown in the list of options the user can choose from" }, { "path": [ "deletion", "extraDeleteReasons", "explanation" ], "required": true, "hints": { "question": "For what extra reason might this feature be removed in real-life?" }, "description": "The text that will be shown to the user as option for why this point does not exist anymore.\nNote that the most common reasons (test point, does not exist anymore, cannot be found) are already offered by default" }, { "path": [ "deletion", "extraDeleteReasons", "changesetMessage" ], "required": true, "hints": { "question": "What should be added to the changeset as delete reason?" }, "type": "string", "description": "The text that will be uploaded into the changeset or will be used in the fixme in case of a soft deletion\nShould be a few words, in english" }, { "path": [ "deletion", "nonDeleteMappings" ], "required": false, "hints": {}, "type": "array", "description": "In some cases, a (starting) contributor might wish to delete a feature even though deletion is not appropriate.\n(The most relevant case are small paths running over private property. These should be marked as 'private' instead of deleted, as the community might trace the path again from aerial imagery, gettting us back to the original situation).\nBy adding a 'nonDeleteMapping', an option can be added into the list which will retag the feature.\nIt is important that the feature will be retagged in such a way that it won't be picked up by the layer anymore!" }, { "path": [ "deletion", "nonDeleteMappings", "if" ], "required": true, "hints": { "typehint": "tag", "question": "What tags should be applied to the object?" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "The tags that will be given to the object.\nThis must remove tags so that the 'source/osmTags' won't match anymore" }, { "path": [ "deletion", "nonDeleteMappings", "then" ], "required": true, "hints": { "question": "What text should be shown to the contributor for this reason?" }, "description": "The human explanation for the options" }, { "path": [ "deletion", "softDeletionTags" ], "required": false, "hints": { "typehint": "tag", "question": "If a hard delete is not possible, what tags should be applied to mark this feature as deleted?" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "$ref": "#/definitions/{or:TagConfigJson[];}" }, { "type": "string" } ], "description": "In some cases, the contributor is not allowed to delete the current feature (e.g. because it isn't a point, the point is referenced by a relation or the user isn't experienced enough).\nTo still offer the user a 'delete'-option, the feature is retagged with these tags. This is a soft deletion, as the point isn't actually removed from OSM but rather marked as 'disused'\nIt is important that the feature will be retagged in such a way that it won't be picked up by the layer anymore!\nExample (note that \"amenity=\" erases the 'amenity'-key alltogether):\n```\n{\n \"and\": [\"disussed:amenity=public_bookcase\", \"amenity=\"]\n}\n```\nor (notice the use of the ':='-tag to copy the old value of 'shop=*' into 'disused:shop='):\n```\n{\n \"and\": [\"disused:shop:={shop}\", \"shop=\"]\n}\n```" }, { "path": [ "deletion", "softDeletionTags", "and" ], "required": false, "hints": { "typehint": "tag" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" }, { "path": [ "deletion", "softDeletionTags", "or" ], "required": false, "hints": { "typehint": "tag" }, "type": [ { "$ref": "#/definitions/{and:TagConfigJson[];}" }, { "type": "object", "properties": { "or": { "type": "array", "items": { "$ref": "#/definitions/TagConfigJson" } } }, "required": [ "or" ] }, { "type": "string" } ], "description": "The main representation of Tags.\nSee https://github.com/pietervdvn/MapComplete/blob/develop/Docs/Tags_format.md for more documentation" }, { "path": [ "deletion", "omitDefaultDeleteReasons" ], "required": false, "hints": { "question": "Should the default delete reasons be hidden?", "iftrue": "Hide the default delete reasons", "iffalse": "Show the default delete reasons", "ifunset": "Show the default delete reasons (default behaviour)" }, "type": "boolean", "description": "Set this flag if the default delete reasons should be omitted from the dialog.\nThis requires at least one extraDeleteReason or nonDeleteMapping" }, { "path": [ "allowMove" ], "required": false, "hints": { "types": "use an advanced move configuration ; boolean", "group": "editing", "question": "Is deleting a point allowed?", "iftrue": "Allow contributors to move a point (for accuracy or a relocation)", "iffalse": "Don't allow contributors to move points", "ifunset": "Don't allow contributors to move points (default)" }, "type": [ { "type": "object", "properties": { "enableImproveAccuracy": { "description": "question: Should moving this type of point to improve the accuracy be allowed?\niftrue: This point can be moved to improve the accuracy\nifunset: (default) This point can be moved to improve the accuracy\niffalse: This point cannot be moved to improve the accuracy", "type": "boolean" }, "enableRelocation": { "description": "question: Should moving this type of point due to a relocation be allowed?\n\nThis will erase the attributes `addr:street`, `addr:housenumber`, `addr:city` and `addr:postcode`\n\niftrue: This type of point can be moved due to a relocation (and will remove address information when this is done)\nifunset: (default) This type of point can be moved due to a relocation (and will remove address information when this is done)\niffalse: This type of point cannot be moved due to a relocation", "type": "boolean" } }, "additionalProperties": false }, { "type": "boolean" } ], "description": "Indicates if a point can be moved and why.\nA feature can be moved by MapComplete if:\n- It is a point\n- The point is _not_ part of a way or a a relation." }, { "path": [ "allowMove", "enableImproveAccuracy" ], "required": false, "hints": { "question": "Should moving this type of point to improve the accuracy be allowed?", "iftrue": "This point can be moved to improve the accuracy", "iffalse": "This point cannot be moved to improve the accuracy", "ifunset": "(default) This point can be moved to improve the accuracy" }, "type": "boolean", "description": "" }, { "path": [ "allowMove", "enableRelocation" ], "required": false, "hints": { "question": "Should moving this type of point due to a relocation be allowed?", "iftrue": "This type of point can be moved due to a relocation (and will remove address information when this is done)", "iffalse": "This type of point cannot be moved due to a relocation", "ifunset": "(default) This type of point can be moved due to a relocation (and will remove address information when this is done)" }, "type": "boolean", "description": "This will erase the attributes `addr:street`, `addr:housenumber`, `addr:city` and `addr:postcode`" }, { "path": [ "allowSplit" ], "required": false, "hints": { "group": "editing", "question": "Should the contributor be able to split ways using this layer?", "iftrue": "enable the 'split-roads'-component", "iffalse": "don't enable the split-roads componenet", "ifunset": "don't enable the split-roads component" }, "type": "boolean", "description": "If set, a 'split this way' button is shown on objects rendered as LineStrings, e.g. highways.\nIf the way is part of a relation, MapComplete will attempt to update this relation as well" }, { "path": [ "units" ], "required": false, "hints": { "default": "ult: true," }, "type": "object", "description": "In some cases, a value is represented in a certain unit (such as meters for heigt/distance/..., km/h for speed, ...)\nSometimes, multiple denominations are possible (e.g. km/h vs mile/h; megawatt vs kilowatt vs gigawatt for power generators, ...)\nThis brings in some troubles, as there are multiple ways to write it (no denomitation, 'm' vs 'meter' 'metre', ...)\nNot only do we want to write consistent data to OSM, we also want to present this consistently to the user.\nThis is handled by defining units.\n# Rendering\nTo render a value with long (human) denomination, use {canonical(key)}\n# Usage\nFirst of all, you define which keys have units applied, for example:\n```\nunits: [\n appliesTo: [\"maxspeed\", \"maxspeed:hgv\", \"maxspeed:bus\"]\n applicableUnits: [\n ...\n ]\n]\n```\nApplicableUnits defines which is the canonical extension, how it is presented to the user, ...:\n```\napplicableUnits: [\n{\n canonicalDenomination: \"km/h\",\n alternativeDenomination: [\"km/u\", \"kmh\", \"kph\"]\n human: {\n en: \"kilometer/hour\",\n nl: \"kilometer/uur\"\n },\n humanShort: {\n en: \"km/h\",\n nl: \"km/u\"\n }\n},\n{\n canoncialDenomination: \"mph\",\n ... similar for miles an hour ...\n}\n]\n```\nIf this is defined, then every key which the denominations apply to (`maxspeed`, `maxspeed:hgv` and `maxspeed:bus`) will be rewritten at the metatagging stage:\nevery value will be parsed and the canonical extension will be added add presented to the other parts of the code.\nAlso, if a freeform text field is used, an extra dropdown with applicable denominations will be given" }, { "path": [ "units", "appliesToKey" ], "required": true, "hints": {}, "type": "array", "description": "Every key from this list will be normalized.\nTo render the value properly (with a human readable denomination), use `{canonical()}`" }, { "path": [ "units", "eraseInvalidValues" ], "required": false, "hints": {}, "type": "boolean", "description": "If set, invalid values will be erased in the MC application (but not in OSM of course!)\nBe careful with setting this" }, { "path": [ "units", "applicableUnits" ], "required": true, "hints": {}, "type": "array", "description": "The possible denominations for this unit.\nFor length, denominations could be \"meter\", \"kilometer\", \"miles\", \"foot\"" }, { "path": [ "units", "applicableUnits", "useIfNoUnitGiven" ], "required": false, "hints": {}, "type": [ { "type": "array", "items": { "type": "string" } }, { "type": "boolean" } ], "description": "If this evaluates to true and the value to interpret has _no_ unit given, assumes that this unit is meant.\nAlternatively, a list of country codes can be given where this acts as the default interpretation\nE.g., a denomination using \"meter\" would probably set this flag to \"true\";\na denomination for \"mp/h\" will use the condition \"_country=gb\" to indicate that it is the default in the UK.\nIf none of the units indicate that they are the default, the first denomination will be used instead" }, { "path": [ "units", "applicableUnits", "canonicalDenomination" ], "required": true, "hints": {}, "type": "string", "description": "The canonical value for this denomination which will be added to the value in OSM.\ne.g. \"m\" for meters\nIf the user inputs '42', the canonical value will be added and it'll become '42m'.\nImportant: often, _no_ canonical values are expected, e.g. in the case of 'maxspeed' where 'km/h' is the default.\nIn this case, an empty string should be used" }, { "path": [ "units", "applicableUnits", "canonicalDenominationSingular" ], "required": false, "hints": {}, "type": "string", "description": "The canonical denomination in the case that the unit is precisely '1'.\nUsed for display purposes only.\nE.g.: for duration of something in minutes: `2 minutes` but `1 minute`; the `minute` goes here" }, { "path": [ "units", "applicableUnits", "alternativeDenomination" ], "required": false, "hints": {}, "type": "array", "description": "A list of alternative values which can occur in the OSM database - used for parsing.\nE.g.: while 'm' is canonical, `meter`, `mtrs`, ... can occur as well" }, { "path": [ "units", "applicableUnits", "human" ], "required": false, "hints": {}, "type": [ { "$ref": "#/definitions/Record" }, { "type": "string" } ], "description": "The value for humans in the dropdown. This should not use abbreviations and should be translated, e.g.\n{\n \"en\": \"meter\",\n \"fr\": \"metre\"\n}" }, { "path": [ "units", "applicableUnits", "humanSingular" ], "required": false, "hints": {}, "type": [ { "$ref": "#/definitions/Record" }, { "type": "string" } ], "description": "The value for humans in the dropdown. This should not use abbreviations and should be translated, e.g.\n{\n \"en\": \"minute\",\n \"nl\": \"minuut\"\n}" }, { "path": [ "units", "applicableUnits", "prefix" ], "required": false, "hints": {}, "type": "boolean", "description": "If set, then the canonical value will be prefixed instead, e.g. for '€'\nNote that if all values use 'prefix', the dropdown might move to before the text field" }, { "path": [ "units", "defaultInput" ], "required": false, "hints": {}, "type": "string", "description": "In some cases, the default denomination is not the most user friendly to input.\nE.g., when measuring kerb heights, it is illogical to ask contributors to input an amount in meters.\nWhen a default input method should be used, this can be specified by setting the canonical denomination here, e.g.\n`defaultInput: \"cm\"`. This must be a denomination which appears in the applicableUnits" }, { "path": [ "syncSelection" ], "required": false, "hints": { "group": "advanced", "question": "Should enabling/disabling the layer be saved (locally or in the cloud)?", "suggestions": [ { "if": "value=no", "then": "Don't save, always revert to the default" }, { "if": "value=local", "then": "Save selection in local storage" }, { "if": "value=theme-only", "then": "Save the state in the OSM-usersettings, but apply on this theme only (default)" }, { "if": "value=global", "then": "Save in OSM-usersettings and toggle on _all_ themes using this layer" } ] }, "type": "string", "description": "If set, synchronizes whether or not this layer is enabled." }, { "path": [ "#" ], "required": false, "hints": { "group": "hidden" }, "type": "string", "description": "Used for comments and/or to disable some checks\nno-question-hint-check: disables a check in MiscTagRenderingChecks which complains about 'div', 'span' or 'class=subtle'-HTML elements in the tagRendering" }, { "path": [ "fullNodeDatabase" ], "required": false, "hints": { "group": "hidden" }, "type": "boolean", "description": "_Set automatically by MapComplete, please ignore_" } ]