Docs: some last tweaks

This commit is contained in:
Pieter Vander Vennet 2025-09-25 04:17:38 +02:00
parent a634ec0850
commit 133fd6594b
49 changed files with 113 additions and 111 deletions

View file

@ -18,7 +18,7 @@ You might encounter the following metatags on a changeset:
| default |
| created_by | MapComplete <version> | The piece of software used to create this changeset; will always start with MapComplete, followed by the version number
| default |
| locale | en|nl|de|... | The code of the language that the contributor used MapComplete in. Hints what language the user speaks.
| locale | `en`, `nl`, `de`, ... | The code of the language that the contributor used MapComplete in. Hints what language the user speaks.
| default |
| host | https://mapcomplete.org/<theme> | The URL that the contributor used to make changes. One can see the used instance with this
| default |

View file

@ -95,7 +95,7 @@ The default value is _false_
The mode the application starts in, e.g. 'map', 'dashboard' or 'statistics'
This documentation is defined in the source code at [generateDocs.ts](ervdvn/git/MapComplete/scripts/generateDocs.ts#L498)
This documentation is defined in the source code at [generateDocs.ts](ervdvn/git/MapComplete/scripts/generateDocs.ts#L500)
The default value is _map_

View file

@ -15,7 +15,7 @@ In OpenStreetMap, this is encoded with the tag `lit=yes` or `lit=no`. We might w
This is what this will look like in the interface:
<img class="h-fit" src="../../public/assets/docs/PredefinedOption.png"/>
<img class="h-fit" src="https://mapcomplete.org/assets/docs/PredefinedOption.png"/>
# Substituting attributes
@ -25,7 +25,7 @@ A special property about all shown texts is that, **if the name of a key appears
For example, if the object has tags `min_age=3` and the text to display is `Accessible to kids older than {min_age} years`, then this will be displayed to the user as **Accessible to kids older than 3 years**
Note that this also works withing predifined options
Note that this also works within predefined options
# Special values
@ -36,24 +36,24 @@ Special components can be summoned by calling them. For example, the relevant wi
These renderings can be turned into a way to contribute data easily. If a **question** is provided, then these renderings will be asked if unknown or gain the pencil to make changes.
A predefined option will show up as an option that can be picked.
<img class="w-1/2" src="../../public/assets/docs/QuestionPredefinedOptions.png"/>
<img class="w-1/2" src="https://mapcomplete.org/assets/docs/QuestionPredefinedOptions.png"/>
# Requesting data with an input field
It is also possible to have a text field. For this, the **key** to write into must be given (_What is the name of the attribute that should be written to?_), in this case `max_age`.
<img class="w-1/2" src="../../public/assets/docs/QuestionTextField.png"/>
<img class="w-1/2" src="https://mapcomplete.org/assets/docs/QuestionTextField.png"/>
# Combining predefined options and freeform text
A text field and predefined options can be combined. The contributor can then choose between a predefined option or filling out something.
<img class="w-1/2" src="../../public/assets/docs/QuestionCombined.png"/>
<img class="w-1/2" src="https://mapcomplete.org/assets/docs/QuestionCombined.png"/>
# Selecting multiple values
One can set a question to allow multiple answers. This works with predefined options or a freeform text field.
<img class="w-1/2 h-fit" src="../../public/assets/docs/QuestionMulti.png"/>
<img class="w-1/2 h-fit" src="https://mapcomplete.org/assets/docs/QuestionMulti.png"/>
Note that these will be rendered as a list:
<img class="w-1/2 h-fit" src="../../public/assets/docs/RenderMulti.png"/>
<img class="w-1/2 h-fit" src="https://mapcomplete.org/assets/docs/RenderMulti.png"/>

View file

@ -21,7 +21,7 @@ This theme is available in the following languages:
# Layers defined in this theme configuration file
- [[object Object]](#[object Object])
- [Buildings (`buildings_with_architecture`)](#buildings_with_architecture)
These layers can not be reused in different themes.
# buildings_with_architecture

View file

@ -37,8 +37,8 @@ This theme is available in the following languages:
# Layers defined in this theme configuration file
- [[object Object]](#[object Object])
- [[object Object]](#[object Object])
- [Banks (`banks_with_atm`)](#banks_with_atm)
- [Post offices (`post_offices_with_atm`)](#post_offices_with_atm)
These layers can not be reused in different themes.
# banks_with_atm

View file

@ -30,10 +30,10 @@ This theme is available in the following languages:
# Layers defined in this theme configuration file
- [[object Object]](#[object Object])
- [[object Object]](#[object Object])
- [[object Object]](#[object Object])
- [[object Object]](#[object Object])
- [OSM Buildings (`osm_buildings`)](#osm_buildings)
- [OSM Adresses (`osm_adresses`)](#osm_adresses)
- [BAG Buildings (`bag_pand`)](#bag_pand)
- [BAG Addresses (`bag_verblijfsobject`)](#bag_verblijfsobject)
These layers can not be reused in different themes.
# osm_buildings

View file

@ -16,9 +16,9 @@ This theme is available in the following languages:
# Layers defined in this theme configuration file
- [[object Object]](#[object Object])
- [[object Object]](#[object Object])
- [[object Object]](#[object Object])
- [Natuurgebied (`nature_reserve_buurtnatuur`)](#nature_reserve_buurtnatuur)
- [Park (`parks`)](#parks)
- [Bos (`forest`)](#forest)
These layers can not be reused in different themes.
# nature_reserve_buurtnatuur

View file

@ -34,7 +34,7 @@ This theme is available in the following languages:
# Layers defined in this theme configuration file
- [[object Object]](#[object Object])
- [Second hand shops (`shops_second_hand`)](#shops_second_hand)
These layers can not be reused in different themes.
# shops_second_hand

View file

@ -38,7 +38,7 @@ This theme is available in the following languages:
# Layers defined in this theme configuration file
- [[object Object]](#[object Object])
- [Shop (`shops_with_climbing_shoe_repair`)](#shops_with_climbing_shoe_repair)
These layers can not be reused in different themes.
# shops_with_climbing_shoe_repair

View file

@ -29,8 +29,8 @@ This theme is available in the following languages:
# Layers defined in this theme configuration file
- [[object Object]](#[object Object])
- [[object Object]](#[object Object])
- [cycle highways (`cycle_highways_no_highway`)](#cycle_highways_no_highway)
- [cycle highways (`cycle_highways_under-construction`)](#cycle_highways_under-construction)
These layers can not be reused in different themes.
# cycle_highways_no_highway

View file

@ -31,9 +31,9 @@ This theme is available in the following languages:
# Layers defined in this theme configuration file
- [[object Object]](#[object Object])
- [[object Object]](#[object Object])
- [[object Object]](#[object Object])
- [Node to node links (`node2node_bicycle`)](#node2node_bicycle)
- [Nodes (`node_bicycle`)](#node_bicycle)
- [Cycling guideposts (`bicycle_guidepost`)](#bicycle_guidepost)
These layers can not be reused in different themes.
# node2node_bicycle

View file

@ -33,8 +33,8 @@ This theme is available in the following languages:
# Layers defined in this theme configuration file
- [[object Object]](#[object Object])
- [[object Object]](#[object Object])
- [Future cyclestreet (`toekomstige_fietsstraat`)](#toekomstige_fietsstraat)
- [All streets (`not_cyclestreets`)](#not_cyclestreets)
These layers can not be reused in different themes.
# toekomstige_fietsstraat

View file

@ -47,10 +47,10 @@ This theme is available in the following languages:
# Layers defined in this theme configuration file
- [[object Object]](#[object Object])
- [[object Object]](#[object Object])
- [[object Object]](#[object Object])
- [[object Object]](#[object Object])
- [Repair cafés and assisted repair workshops (`bicycle_assisted_repair_workshop`)](#bicycle_assisted_repair_workshop)
- [Bicycle rental (`bicycle_rental_non_docking`)](#bicycle_rental_non_docking)
- [Charging stations (`charging_station_ebikes`)](#charging_station_ebikes)
- [Vending Machines (`vending_machine_bicycle`)](#vending_machine_bicycle)
These layers can not be reused in different themes.
# bicycle_assisted_repair_workshop

View file

@ -36,14 +36,14 @@ This theme is available in the following languages:
# Layers defined in this theme configuration file
- [[object Object]](#[object Object])
- [[object Object]](#[object Object])
- [[object Object]](#[object Object])
- [[object Object]](#[object Object])
- [[object Object]](#[object Object])
- [[object Object]](#[object Object])
- [[object Object]](#[object Object])
- [[object Object]](#[object Object])
- [Streets without etymology information (`streets_without_etymology`)](#streets_without_etymology)
- [Parks and forests without etymology information (`parks_and_forests_without_etymology`)](#parks_and_forests_without_etymology)
- [Education institutions without etymology information (`education_institutions_without_etymology`)](#education_institutions_without_etymology)
- [Cultural places without etymology information (`cultural_places_without_etymology`)](#cultural_places_without_etymology)
- [Touristic places without etymology information (`toursistic_places_without_etymology`)](#toursistic_places_without_etymology)
- [Health and social places without etymology information (`health_and_social_places_without_etymology`)](#health_and_social_places_without_etymology)
- [Sport places without etymology information (`sport_places_without_etymology`)](#sport_places_without_etymology)
- [Parks without etymology information (`parks_without_etymology`)](#parks_without_etymology)
These layers can not be reused in different themes.
# streets_without_etymology

View file

@ -29,7 +29,7 @@ This theme is available in the following languages:
# Layers defined in this theme configuration file
- [[object Object]](#[object Object])
- [Facade gardens (`facadegardens`)](#facadegardens)
These layers can not be reused in different themes.
# facadegardens

View file

@ -35,7 +35,7 @@ This theme is available in the following languages:
# Layers defined in this theme configuration file
- [[object Object]](#[object Object])
- [Shops selling food (`food_shops`)](#food_shops)
These layers can not be reused in different themes.
# food_shops

View file

@ -28,7 +28,7 @@ This theme is available in the following languages:
# Layers defined in this theme configuration file
- [[object Object]](#[object Object])
- [Fries shop (`friture`)](#friture)
These layers can not be reused in different themes.
# friture

View file

@ -25,8 +25,8 @@ This theme is available in the following languages:
# Layers defined in this theme configuration file
- [[object Object]](#[object Object])
- [[object Object]](#[object Object])
- [Advertisement (`advertising_wall_paintings`)](#advertising_wall_paintings)
- [Artworks (`artwork_on_wall`)](#artwork_on_wall)
These layers can not be reused in different themes.
# advertising_wall_paintings

View file

@ -32,9 +32,9 @@ This theme is available in the following languages:
# Layers defined in this theme configuration file
- [[object Object]](#[object Object])
- [[object Object]](#[object Object])
- [[object Object]](#[object Object])
- [Restaurants and fast food (`food_glutenfree`)](#food_glutenfree)
- [Ice cream parlors (`icecream_glutenfree`)](#icecream_glutenfree)
- [Shop (`shops_glutenfree`)](#shops_glutenfree)
These layers can not be reused in different themes.
# food_glutenfree

View file

@ -18,10 +18,10 @@ This theme is available in the following languages:
# Layers defined in this theme configuration file
- [[object Object]](#[object Object])
- [[object Object]](#[object Object])
- [[object Object]](#[object Object])
- [[object Object]](#[object Object])
- [All OSM-buildings (`osm_buildings_no_points`)](#osm_buildings_no_points)
- [GRB geometries (`grb`)](#grb)
- [Service roads (`service_ways`)](#service_ways)
- [All OSM Objects (`generic_osm_object`)](#generic_osm_object)
These layers can not be reused in different themes.
# osm_buildings_no_points

View file

@ -38,7 +38,7 @@ This theme is available in the following languages:
# Layers defined in this theme configuration file
- [[object Object]](#[object Object])
- [Shop (`medical_shops`)](#medical_shops)
These layers can not be reused in different themes.
# medical_shops

View file

@ -31,7 +31,7 @@ This theme is available in the following languages:
# Layers defined in this theme configuration file
- [[object Object]](#[object Object])
- [Crossings (`crossings_no_traffic_lights`)](#crossings_no_traffic_lights)
These layers can not be reused in different themes.
# crossings_no_traffic_lights

View file

@ -30,9 +30,9 @@ This theme is available in the following languages:
# Layers defined in this theme configuration file
- [[object Object]](#[object Object])
- [[object Object]](#[object Object])
- [[object Object]](#[object Object])
- [Restaurants and fast food (`food_lactosefree`)](#food_lactosefree)
- [Ice cream parlors (`icecream_lactosefree`)](#icecream_lactosefree)
- [Shop (`shops_lactosefree`)](#shops_lactosefree)
These layers can not be reused in different themes.
# food_lactosefree

View file

@ -23,7 +23,7 @@ This theme is available in the following languages:
# Layers defined in this theme configuration file
- [[object Object]](#[object Object])
- [Changeset centers (`mapcomplete-changes`)](#mapcomplete-changes)
These layers can not be reused in different themes.
# mapcomplete-changes

View file

@ -49,8 +49,8 @@ This theme is available in the following languages:
# Layers defined in this theme configuration file
- [[object Object]](#[object Object])
- [[object Object]](#[object Object])
- [ (`onwheels_entrance_data`)](#onwheels_entrance_data)
- [Disabled parking spaces (`parking_spaces_disabled`)](#parking_spaces_disabled)
These layers can not be reused in different themes.
# onwheels_entrance_data

View file

@ -33,9 +33,9 @@ This theme is available in the following languages:
# Layers defined in this theme configuration file
- [[object Object]](#[object Object])
- [[object Object]](#[object Object])
- [[object Object]](#[object Object])
- [Erotic shops (`erotic_shop`)](#erotic_shop)
- [Vending Machines (`condom_vending_machine`)](#condom_vending_machine)
- [Cinema (`erotic_cinema`)](#erotic_cinema)
These layers can not be reused in different themes.
# erotic_shop

View file

@ -40,11 +40,11 @@ This theme is available in the following languages:
# Layers defined in this theme configuration file
- [[object Object]](#[object Object])
- [[object Object]](#[object Object])
- [[object Object]](#[object Object])
- [[object Object]](#[object Object])
- [[object Object]](#[object Object])
- [Dog friendly eateries (`food_dog_friendly`)](#food_dog_friendly)
- [Dog friendly drinking places (`cafe_pub_dog_friendly`)](#cafe_pub_dog_friendly)
- [Pet stores (`pet_shops`)](#pet_shops)
- [Dog-friendly shops (`shop_dog_friendly`)](#shop_dog_friendly)
- [Waste baskets with excrement bag dispensers (`waste_basket_dogs`)](#waste_basket_dogs)
These layers can not be reused in different themes.
# food_dog_friendly

View file

@ -30,9 +30,9 @@ This theme is available in the following languages:
# Layers defined in this theme configuration file
- [[object Object]](#[object Object])
- [[object Object]](#[object Object])
- [[object Object]](#[object Object])
- [postal codes (`postal_code_boundary`)](#postal_code_boundary)
- [ (`wrong_postal_code`)](#wrong_postal_code)
- [town halls (`town_hall`)](#town_hall)
These layers can not be reused in different themes.
# postal_code_boundary

View file

@ -29,7 +29,7 @@ This theme is available in the following languages:
# Layers defined in this theme configuration file
- [[object Object]](#[object Object])
- [ (`rainbow_crossing_high_zoom`)](#rainbow_crossing_high_zoom)
These layers can not be reused in different themes.
# rainbow_crossing_high_zoom

View file

@ -25,10 +25,10 @@ This theme is available in the following languages:
# Layers defined in this theme configuration file
- [[object Object]](#[object Object])
- [[object Object]](#[object Object])
- [[object Object]](#[object Object])
- [[object Object]](#[object Object])
- [Tourism accomodation (`tourism_accomodation_with_sauna`)](#tourism_accomodation_with_sauna)
- [Sports centres (`sports_centre_with_sauna`)](#sports_centre_with_sauna)
- [Shop (`shops_with_sauna`)](#shops_with_sauna)
- [ (`beauty_shops`)](#beauty_shops)
These layers can not be reused in different themes.
# tourism_accomodation_with_sauna

View file

@ -24,9 +24,9 @@ This theme is available in the following languages:
# Layers defined in this theme configuration file
- [[object Object]](#[object Object])
- [[object Object]](#[object Object])
- [[object Object]](#[object Object])
- [Group Campsites (`group_campsite`)](#group_campsite)
- [Hostels for groups and scouts (`group_hostel`)](#group_hostel)
- [ (`hostel`)](#hostel)
These layers can not be reused in different themes.
# group_campsite

View file

@ -19,8 +19,8 @@ This theme is available in the following languages:
# Layers defined in this theme configuration file
- [[object Object]](#[object Object])
- [[object Object]](#[object Object])
- [ (`shadow`)](#shadow)
- [Wandelroutes van provincie Antwerpen (`walking_routes`)](#walking_routes)
These layers can not be reused in different themes.
# shadow

View file

@ -34,7 +34,7 @@ This theme is available in the following languages:
# Layers defined in this theme configuration file
- [[object Object]](#[object Object])
- [Shop (`sport_shops`)](#sport_shops)
These layers can not be reused in different themes.
# sport_shops

View file

@ -48,8 +48,8 @@ This theme is available in the following languages:
# Layers defined in this theme configuration file
- [[object Object]](#[object Object])
- [[object Object]](#[object Object])
- [Train Stations (`train_station`)](#train_station)
- [Departures boards (`departures_board`)](#departures_board)
These layers can not be reused in different themes.
# train_station

View file

@ -32,7 +32,7 @@ This theme is available in the following languages:
# Layers defined in this theme configuration file
- [[object Object]](#[object Object])
- [Lit streets (`lit_streets`)](#lit_streets)
These layers can not be reused in different themes.
# lit_streets

View file

@ -15,7 +15,7 @@ This theme is available in the following languages:
# Layers defined in this theme configuration file
- [[object Object]](#[object Object])
- [Dataset Assen (`assen`)](#assen)
These layers can not be reused in different themes.
# assen

View file

@ -22,8 +22,8 @@ This theme is available in the following languages:
# Layers defined in this theme configuration file
- [[object Object]](#[object Object])
- [[object Object]](#[object Object])
- [Charging stations (`charging_station_ebikes`)](#charging_station_ebikes)
- [Bicycle rental (`bicycle_rental_non_docking`)](#bicycle_rental_non_docking)
These layers can not be reused in different themes.
# charging_station_ebikes

View file

@ -34,7 +34,7 @@ This theme is available in the following languages:
# Layers defined in this theme configuration file
- [[object Object]](#[object Object])
- [Shelter (`pt_shelter`)](#pt_shelter)
These layers can not be reused in different themes.
# pt_shelter

View file

@ -17,9 +17,9 @@ This theme is available in the following languages:
# Layers defined in this theme configuration file
- [[object Object]](#[object Object])
- [[object Object]](#[object Object])
- [[object Object]](#[object Object])
- [Inspire polygons (`raw_inspire_polygons`)](#raw_inspire_polygons)
- [Addresses to check (`to_import`)](#to_import)
- [Known addresses in OSM (`uk_address`)](#uk_address)
These layers can not be reused in different themes.
# raw_inspire_polygons

View file

@ -20,8 +20,8 @@ This theme is available in the following languages:
# Layers defined in this theme configuration file
- [[object Object]](#[object Object])
- [[object Object]](#[object Object])
- [Velopark data (`velopark_maproulette`)](#velopark_maproulette)
- [Bicycle parkings with velopark ID (`bike_parking_with_velopark_ref`)](#bike_parking_with_velopark_ref)
These layers can not be reused in different themes.
# velopark_maproulette

View file

@ -31,7 +31,7 @@ This theme is available in the following languages:
# Layers defined in this theme configuration file
- [[object Object]](#[object Object])
- [ (`all_vending_machine`)](#all_vending_machine)
These layers can not be reused in different themes.
# all_vending_machine

View file

@ -26,9 +26,9 @@ This theme is available in the following languages:
# Layers defined in this theme configuration file
- [[object Object]](#[object Object])
- [[object Object]](#[object Object])
- [[object Object]](#[object Object])
- [Node to node links (`node2node_hiking`)](#node2node_hiking)
- [Nodes (`node_hiking`)](#node_hiking)
- [Hiking guideposts (`guidepost_hiking`)](#guidepost_hiking)
These layers can not be reused in different themes.
# node2node_hiking

View file

@ -17,8 +17,8 @@ This theme is available in the following languages:
# Layers defined in this theme configuration file
- [[object Object]](#[object Object])
- [[object Object]](#[object Object])
- [Dataset Afvalbakken Assen (`waste_basket_assen`)](#waste_basket_assen)
- [Dataset Recyclingcontainers Assen (`recycling_assen`)](#recycling_assen)
These layers can not be reused in different themes.
# waste_basket_assen

View file

@ -14,8 +14,8 @@ This theme is available in the following languages:
# Layers defined in this theme configuration file
- [[object Object]](#[object Object])
- [[object Object]](#[object Object])
- [Straten met een breedte (`street_with_width`)](#street_with_width)
- [Straten zonder breedte (`street_no_width`)](#street_no_width)
These layers can not be reused in different themes.
# street_with_width

View file

@ -19,7 +19,7 @@ This theme is available in the following languages:
# Layers defined in this theme configuration file
- [[object Object]](#[object Object])
- [Serviced streets (`serviced_streets`)](#serviced_streets)
These layers can not be reused in different themes.
# serviced_streets

View file

@ -16,8 +16,8 @@ This theme is available in the following languages:
# Layers defined in this theme configuration file
- [[object Object]](#[object Object])
- [[object Object]](#[object Object])
- [Public transport stops in ZHV (`zhv`)](#zhv)
- [Public transport stops in OSM (`all_transit_stops`)](#all_transit_stops)
These layers can not be reused in different themes.
# zhv

View file

@ -46,7 +46,8 @@ class ToSlideshowJson {
}
public convert() {
const lines = readFileSync(this._source, "utf8").split("\n")
const lines = readFileSync(this._source, "utf8")
.split("\n")
const sections: string[][] = []
let currentSection: string[] = []
@ -55,8 +56,9 @@ class ToSlideshowJson {
sections.push(currentSection)
currentSection = []
}
line = line.replace('src="../../public/', 'src="./')
line = line.replace('src="../../', 'src="./')
line = line.replaceAll('src="https://mapcomplete.org/', 'src="./')
line = line.replaceAll('src="../../public/', 'src="./')
line = line.replaceAll('src="../../', 'src="./')
currentSection.push(line)
}
sections.push(currentSection)
@ -574,7 +576,7 @@ export class GenerateDocs extends Script {
en: "Layers defined in this theme configuration file",
nl: "Lagen gedefinieerd in dit kaartthema-bestand",
})).textFor(lang))
el.push(MarkdownUtils.list(layersToInline.map(id => `[${id}](#${id})`)))
el.push(MarkdownUtils.list(layersToInline.map(l => `[${l.name?.textFor(lang) ?? ""} (\`${l.id}\`)](#${l.id})`)))
el.push(new Translation({
en: "These layers can not be reused in different themes.",

View file

@ -215,7 +215,7 @@ export class Changes {
},
{
key: "locale",
value: "en|nl|de|...",
value: "`en`, `nl`, `de`, ...",
docs: "The code of the language that the contributor used MapComplete in. Hints what language the user speaks.",
},
{

View file

@ -1 +1 @@
{"sections":["# How to work with TagRenderings?\n\nThe information box shows various attributes of the selected feature in a human friendly way.\n\nThis is done by a **tagRendering** which converts attributes into text.\n\nThis can be done by using **predefined options** (mappings) or with a **render**-string\n","# Predefined options\n\nA predefined option states that, `if` a certain tag is present, `then` a certain text should be shown.\n\nFor example, a playground may be lit or not.\nIn OpenStreetMap, this is encoded with the tag `lit=yes` or `lit=no`. We might want to show `This playground is lit at night` and `This playground is not lit at night` to users of MapComplete.\n\nThis is what this will look like in the interface:\n\n<img class=\"h-fit\" src=\"./assets/docs/PredefinedOption.png\"/>\n","# Substituting attributes\n\nIf none of the predefined options match, the string given in the `render`-field is used (under the question _\"What text should be rendered?\"_).\n\nA special property about all shown texts is that, **if the name of a key appears between braces, this will be replaced by the corresponding value**.\n\nFor example, if the object has tags `min_age=3` and the text to display is `Accessible to kids older than {min_age} years`, then this will be displayed to the user as **Accessible to kids older than 3 years**\n\nNote that this also works withing predifined options\n","# Special values\n\nSpecial components can be summoned by calling them. For example, the relevant wikipedia will be displayed by entering the text `{wikipedia()}`. A table with opening hours is displayed with `{opening_hours()}`. For a full reference, [see the documentation](https://source.mapcomplete.org/MapComplete/MapComplete/src/branch/develop/Docs/SpecialRenderings.md).\n","# Requesting data with predefined options\n\nThese renderings can be turned into a way to contribute data easily. If a **question** is provided, then these renderings will be asked if unknown or gain the pencil to make changes. \n\nA predefined option will show up as an option that can be picked.\n<img class=\"w-1/2\" src=\"./assets/docs/QuestionPredefinedOptions.png\"/>\n","# Requesting data with an input field\n\nIt is also possible to have a text field. For this, the **key** to write into must be given (_What is the name of the attribute that should be written to?_), in this case `max_age`.\n<img class=\"w-1/2\" src=\"./assets/docs/QuestionTextField.png\"/>\n","# Combining predefined options and freeform text\n\nA text field and predefined options can be combined. The contributor can then choose between a predefined option or filling out something.\n<img class=\"w-1/2\" src=\"./assets/docs/QuestionCombined.png\"/>\n","# Selecting multiple values\n\nOne can set a question to allow multiple answers. This works with predefined options or a freeform text field.\n\n<img class=\"w-1/2 h-fit\" src=\"./assets/docs/QuestionMulti.png\"/>\n\nNote that these will be rendered as a list:\n\n<img class=\"w-1/2 h-fit\" src=\"./assets/docs/RenderMulti.png\"/>\n"]}
{"sections":["# How to work with TagRenderings?\n\nThe information box shows various attributes of the selected feature in a human friendly way.\n\nThis is done by a **tagRendering** which converts attributes into text.\n\nThis can be done by using **predefined options** (mappings) or with a **render**-string\n","# Predefined options\n\nA predefined option states that, `if` a certain tag is present, `then` a certain text should be shown.\n\nFor example, a playground may be lit or not.\nIn OpenStreetMap, this is encoded with the tag `lit=yes` or `lit=no`. We might want to show `This playground is lit at night` and `This playground is not lit at night` to users of MapComplete.\n\nThis is what this will look like in the interface:\n\n<img class=\"h-fit\" src=\"./assets/docs/PredefinedOption.png\"/>\n","# Substituting attributes\n\nIf none of the predefined options match, the string given in the `render`-field is used (under the question _\"What text should be rendered?\"_).\n\nA special property about all shown texts is that, **if the name of a key appears between braces, this will be replaced by the corresponding value**.\n\nFor example, if the object has tags `min_age=3` and the text to display is `Accessible to kids older than {min_age} years`, then this will be displayed to the user as **Accessible to kids older than 3 years**\n\nNote that this also works within predefined options\n","# Special values\n\nSpecial components can be summoned by calling them. For example, the relevant wikipedia will be displayed by entering the text `{wikipedia()}`. A table with opening hours is displayed with `{opening_hours()}`. For a full reference, [see the documentation](https://source.mapcomplete.org/MapComplete/MapComplete/src/branch/develop/Docs/SpecialRenderings.md).\n","# Requesting data with predefined options\n\nThese renderings can be turned into a way to contribute data easily. If a **question** is provided, then these renderings will be asked if unknown or gain the pencil to make changes. \n\nA predefined option will show up as an option that can be picked.\n<img class=\"w-1/2\" src=\"./assets/docs/QuestionPredefinedOptions.png\"/>\n","# Requesting data with an input field\n\nIt is also possible to have a text field. For this, the **key** to write into must be given (_What is the name of the attribute that should be written to?_), in this case `max_age`.\n<img class=\"w-1/2\" src=\"./assets/docs/QuestionTextField.png\"/>\n","# Combining predefined options and freeform text\n\nA text field and predefined options can be combined. The contributor can then choose between a predefined option or filling out something.\n<img class=\"w-1/2\" src=\"./assets/docs/QuestionCombined.png\"/>\n","# Selecting multiple values\n\nOne can set a question to allow multiple answers. This works with predefined options or a freeform text field.\n\n<img class=\"w-1/2 h-fit\" src=\"./assets/docs/QuestionMulti.png\"/>\n\nNote that these will be rendered as a list:\n\n<img class=\"w-1/2 h-fit\" src=\"./assets/docs/RenderMulti.png\"/>\n"]}