forked from MapComplete/MapComplete
Better table export as MD, regenerate of the documentation
This commit is contained in:
parent
5f82bf78e8
commit
b9b504aebc
3 changed files with 403 additions and 6 deletions
|
@ -1 +1,99 @@
|
|||
<h3>Special tag renderings</h3> In a tagrendering, some special values are substituted by an advanced UI-element. This allows advanced features and visualizations to be reused by custom themes or even to query third-party API's. General usage is <b>{func_name()}</b> or <b>{func_name(arg, someotherarg)}</b>. Note that you <i>do not</i> need to use quotes around your arguments, the comma is enough to seperate them. This also implies you cannot use a comma in your args <h3>all_tags</h3> Prints all key-value pairs of the object - used for debugging <ol> </ol> <b>Example usage: </b> {all_tags()} <h3>image_carousel</h3> Creates an image carousel for the given sources. An attempt will be made to guess what source is used. Supported: Wikidata identifiers, Wikipedia pages, Wikimedia categories, IMGUR (with attribution, direct links) <ol> <li> <b>image key/prefix</b>: The keys given to the images, e.g. if <span class='literal-code'>image</span> is given, the first picture URL will be added as <span class='literal-code'>image</span>, the second as <span class='literal-code'>image:0</span>, the third as <span class='literal-code'>image:1</span>, etc... Default: <span class='literal-code'>image</span> </li> <li> <b>smart search</b>: Also include images given via 'Wikidata', 'wikimedia_commons' and 'mapillary Default: <span class='literal-code'>true</span> </li> </ol> <b>Example usage: </b> {image_carousel(image,true)} <h3>image_upload</h3> Creates a button where a user can upload an image to IMGUR <ol> <li> <b>image-key</b>: Image tag to add the URL to (or image-tag:0, image-tag:1 when multiple images are added) Default: <span class='literal-code'>image</span> </li> </ol> <b>Example usage: </b> {image_upload(image)} <h3>reviews</h3> Adds an overview of the mangrove-reviews of this object. Mangrove.Reviews needs - in order to identify the reviewed object - a coordinate and a name. By default, the name of the object is given, but this can be overwritten <ol> <li> <b>subjectKey</b>: The key to use to determine the subject. If specified, the subject will be <b>tags[subjectKey]</b> Default: <span class='literal-code'>name</span> </li> <li> <b>fallback</b>: The identifier to use, if <i>tags[subjectKey]</i> as specified above is not available. This is effectively a fallback value </li> </ol> <b>Example usage: </b> <b>{reviews()}<b> for a vanilla review, <b>{reviews(name, play_forest)}</b> to review a play forest. If a name is known, the name will be used as identifier, otherwise 'play_forest' is used <h3>opening_hours_table</h3> Creates an opening-hours table. Usage: {opening_hours_table(opening_hours)} to create a table of the tag 'opening_hours'. <ol> <li> <b>key</b>: The tagkey from which the table is constructed. Default: <span class='literal-code'>opening_hours</span> </li> </ol> <b>Example usage: </b> {opening_hours_table(opening_hours)} <h3>live</h3> Downloads a JSON from the given URL, e.g. '{live(example.org/data.json, shorthand:x.y.z, other:a.b.c, shorthand)}' will download the given file, will create an object {shorthand: json[x][y][z], other: json[a][b][c] out of it and will return 'other' or 'json[a][b][c]. This is made to use in combination with tags, e.g. {live({url}, {url:format}, needed_value)} <ol> <li> <b>Url</b>: The URL to load </li> <li> <b>Shorthands</b>: A list of shorthands, of the format 'shorthandname:path.path.path'. Seperated by ; </li> <li> <b>path</b>: The path (or shorthand) that should be returned </li> </ol> <b>Example usage: </b> {live({url},{url:format},hour)} {live(https://data.mobility.brussels/bike/api/counts/?request=live&featureID=CB2105,hour:data.hour_cnt;day:data.day_cnt;year:data.year_cnt,hour)} <h3>share_link</h3> Creates a link that (attempts to) open the native 'share'-screen <ol> <li> <b>url</b>: The url to share (default: current URL) </li> </ol> <b>Example usage: </b> {share_link()} to share the current page, {share_link(<some_url>)} to share the given url Generated from UI/SpecialVisualisations.ts
|
||||
|
||||
### Special tag renderings
|
||||
|
||||
In a tagrendering, some special values are substituted by an advanced UI-element. This allows advanced features and visualizations to be reused by custom themes or even to query third-party API's. General usage is <b>{func_name()}</b> or <b>{func_name(arg, someotherarg)}</b>. Note that you <i>do not</i> need to use quotes around your arguments, the comma is enough to seperate them. This also implies you cannot use a comma in your args
|
||||
### all_tags
|
||||
|
||||
Prints all key-value pairs of the object - used for debugging
|
||||
|
||||
name | default | description
|
||||
------ | --------- | -------------
|
||||
|
||||
|
||||
#### Example usage
|
||||
|
||||
{all_tags()}
|
||||
### image_carousel
|
||||
|
||||
Creates an image carousel for the given sources. An attempt will be made to guess what source is used. Supported: Wikidata identifiers, Wikipedia pages, Wikimedia categories, IMGUR (with attribution, direct links)
|
||||
|
||||
name | default | description
|
||||
------ | --------- | -------------
|
||||
image key/prefix | image | The keys given to the images, e.g. if <span class='literal-code'>image</span> is given, the first picture URL will be added as <span class='literal-code'>image</span>, the second as <span class='literal-code'>image:0</span>, the third as <span class='literal-code'>image:1</span>, etc...
|
||||
smart search | true | Also include images given via 'Wikidata', 'wikimedia_commons' and 'mapillary
|
||||
|
||||
#### Example usage
|
||||
|
||||
{image_carousel(image,true)}
|
||||
### image_upload
|
||||
|
||||
Creates a button where a user can upload an image to IMGUR
|
||||
|
||||
name | default | description
|
||||
------ | --------- | -------------
|
||||
image-key | image | Image tag to add the URL to (or image-tag:0, image-tag:1 when multiple images are added)
|
||||
|
||||
#### Example usage
|
||||
|
||||
{image_upload(image)}
|
||||
### reviews
|
||||
|
||||
Adds an overview of the mangrove-reviews of this object. Mangrove.Reviews needs - in order to identify the reviewed object - a coordinate and a name. By default, the name of the object is given, but this can be overwritten
|
||||
|
||||
name | default | description
|
||||
------ | --------- | -------------
|
||||
subjectKey | name | The key to use to determine the subject. If specified, the subject will be <b>tags[subjectKey]</b>
|
||||
fallback | undefined | The identifier to use, if <i>tags[subjectKey]</i> as specified above is not available. This is effectively a fallback value
|
||||
|
||||
#### Example usage
|
||||
|
||||
<b>{reviews()}<b> for a vanilla review, <b>{reviews(name, play_forest)}</b> to review a play forest. If a name is known, the name will be used as identifier, otherwise 'play_forest' is used
|
||||
### opening_hours_table
|
||||
|
||||
Creates an opening-hours table. Usage: {opening_hours_table(opening_hours)} to create a table of the tag 'opening_hours'.
|
||||
|
||||
name | default | description
|
||||
------ | --------- | -------------
|
||||
key | opening_hours | The tagkey from which the table is constructed.
|
||||
|
||||
#### Example usage
|
||||
|
||||
{opening_hours_table(opening_hours)}
|
||||
### live
|
||||
|
||||
Downloads a JSON from the given URL, e.g. '{live(example.org/data.json, shorthand:x.y.z, other:a.b.c, shorthand)}' will download the given file, will create an object {shorthand: json[x][y][z], other: json[a][b][c] out of it and will return 'other' or 'json[a][b][c]. This is made to use in combination with tags, e.g. {live({url}, {url:format}, needed_value)}
|
||||
|
||||
name | default | description
|
||||
------ | --------- | -------------
|
||||
Url | undefined | The URL to load
|
||||
Shorthands | undefined | A list of shorthands, of the format 'shorthandname:path.path.path'. Seperated by ;
|
||||
path | undefined | The path (or shorthand) that should be returned
|
||||
|
||||
#### Example usage
|
||||
|
||||
{live({url},{url:format},hour)} {live(https://data.mobility.brussels/bike/api/counts/?request=live&featureID=CB2105,hour:data.hour_cnt;day:data.day_cnt;year:data.year_cnt,hour)}
|
||||
### histogram
|
||||
|
||||
Create a histogram for a list of given values, read from the properties.
|
||||
|
||||
name | default | description
|
||||
------ | --------- | -------------
|
||||
key | undefined | The key to be read and to generate a histogram from
|
||||
title | | The text to put above the given values column
|
||||
countHeader | | The text to put above the counts
|
||||
colors | undefined | (Matches all resting arguments - optional) Matches a regex onto a color value, e.g. `3[a-zA-Z+-]*:#33cc33`
|
||||
|
||||
#### Example usage
|
||||
|
||||
`{histogram('some_key')}` with properties being `{some_key: ['a','b','a','c']} to create a histogram
|
||||
### share_link
|
||||
|
||||
Creates a link that (attempts to) open the native 'share'-screen
|
||||
|
||||
name | default | description
|
||||
------ | --------- | -------------
|
||||
url | undefined | The url to share (default: current URL)
|
||||
|
||||
#### Example usage
|
||||
|
||||
{share_link()} to share the current page, {share_link(<some_url>)} to share the given url Generated from UI/SpecialVisualisations.ts
|
|
@ -52,6 +52,60 @@
|
|||
"key": "url",
|
||||
"description": "Layer 'Climbing club' shows and asks freeform values for key 'url' (in the MapComplete.osm.be theme 'Open Climbing Map')"
|
||||
},
|
||||
{
|
||||
"key": "_embedding_feature:access",
|
||||
"description": "Layer 'Climbing club' shows _embedding_feature:access=yes with a fixed text, namely '<span class='subtle'>The <a href='#{_embedding_feature:id}'>containing feature</a> states that this is</span> publicly accessible<br/>{_embedding_feature:access:description}' (in the MapComplete.osm.be theme 'Open Climbing Map')",
|
||||
"value": "yes"
|
||||
},
|
||||
{
|
||||
"key": "_embedding_feature:access",
|
||||
"description": "Layer 'Climbing club' shows _embedding_feature:access=permit with a fixed text, namely '<span class='subtle'>The <a href='#{_embedding_feature:id}'>containing feature</a> states that </span> a permit is needed to access<br/>{_embedding_feature:access:description}' (in the MapComplete.osm.be theme 'Open Climbing Map')",
|
||||
"value": "permit"
|
||||
},
|
||||
{
|
||||
"key": "_embedding_feature:access",
|
||||
"description": "Layer 'Climbing club' shows _embedding_feature:access=customers with a fixed text, namely '<span class='subtle'>The <a href='#{_embedding_feature:id}'>containing feature</a> states that this is</span> only accessible to customers<br/>{_embedding_feature:access:description}' (in the MapComplete.osm.be theme 'Open Climbing Map')",
|
||||
"value": "customers"
|
||||
},
|
||||
{
|
||||
"key": "_embedding_feature:access",
|
||||
"description": "Layer 'Climbing club' shows _embedding_feature:access=members with a fixed text, namely '<span class='subtle'>The <a href='#{_embedding_feature:id}'>containing feature</a> states that this is</span> only accessible to club members<br/>{_embedding_feature:access:description}' (in the MapComplete.osm.be theme 'Open Climbing Map')",
|
||||
"value": "members"
|
||||
},
|
||||
{
|
||||
"key": "_embedding_feature:access",
|
||||
"description": "Layer 'Climbing club' shows _embedding_feature:access=no with a fixed text, namely 'Not accessible as stated by <a href='#{_embedding_feature:id}'>the containing feature</a>' (in the MapComplete.osm.be theme 'Open Climbing Map')",
|
||||
"value": "no"
|
||||
},
|
||||
{
|
||||
"key": "access",
|
||||
"description": "Layer 'Climbing club' shows access=yes with a fixed text, namely 'Publicly accessible to anyone' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Open Climbing Map')",
|
||||
"value": "yes"
|
||||
},
|
||||
{
|
||||
"key": "access",
|
||||
"description": "Layer 'Climbing club' shows access=permit with a fixed text, namely 'You need a permit to access here' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Open Climbing Map')",
|
||||
"value": "permit"
|
||||
},
|
||||
{
|
||||
"key": "access",
|
||||
"description": "Layer 'Climbing club' shows access=customers with a fixed text, namely 'Only custumers' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Open Climbing Map')",
|
||||
"value": "customers"
|
||||
},
|
||||
{
|
||||
"key": "access",
|
||||
"description": "Layer 'Climbing club' shows access=members with a fixed text, namely 'Only club members' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Open Climbing Map')",
|
||||
"value": "members"
|
||||
},
|
||||
{
|
||||
"key": "access",
|
||||
"description": "Layer 'Climbing club' shows access=no with a fixed text, namely 'Not accessible' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Open Climbing Map')",
|
||||
"value": "no"
|
||||
},
|
||||
{
|
||||
"key": "access:description",
|
||||
"description": "Layer 'Climbing club' shows values with key 'access:description' (in the MapComplete.osm.be theme 'Open Climbing Map')"
|
||||
},
|
||||
{
|
||||
"key": "climbing:length",
|
||||
"description": "Layer 'Climbing club' shows and asks freeform values for key 'climbing:length' (in the MapComplete.osm.be theme 'Open Climbing Map')"
|
||||
|
@ -169,6 +223,60 @@
|
|||
"key": "url",
|
||||
"description": "Layer 'Climbing gyms' shows and asks freeform values for key 'url' (in the MapComplete.osm.be theme 'Open Climbing Map')"
|
||||
},
|
||||
{
|
||||
"key": "_embedding_feature:access",
|
||||
"description": "Layer 'Climbing gyms' shows _embedding_feature:access=yes with a fixed text, namely '<span class='subtle'>The <a href='#{_embedding_feature:id}'>containing feature</a> states that this is</span> publicly accessible<br/>{_embedding_feature:access:description}' (in the MapComplete.osm.be theme 'Open Climbing Map')",
|
||||
"value": "yes"
|
||||
},
|
||||
{
|
||||
"key": "_embedding_feature:access",
|
||||
"description": "Layer 'Climbing gyms' shows _embedding_feature:access=permit with a fixed text, namely '<span class='subtle'>The <a href='#{_embedding_feature:id}'>containing feature</a> states that </span> a permit is needed to access<br/>{_embedding_feature:access:description}' (in the MapComplete.osm.be theme 'Open Climbing Map')",
|
||||
"value": "permit"
|
||||
},
|
||||
{
|
||||
"key": "_embedding_feature:access",
|
||||
"description": "Layer 'Climbing gyms' shows _embedding_feature:access=customers with a fixed text, namely '<span class='subtle'>The <a href='#{_embedding_feature:id}'>containing feature</a> states that this is</span> only accessible to customers<br/>{_embedding_feature:access:description}' (in the MapComplete.osm.be theme 'Open Climbing Map')",
|
||||
"value": "customers"
|
||||
},
|
||||
{
|
||||
"key": "_embedding_feature:access",
|
||||
"description": "Layer 'Climbing gyms' shows _embedding_feature:access=members with a fixed text, namely '<span class='subtle'>The <a href='#{_embedding_feature:id}'>containing feature</a> states that this is</span> only accessible to club members<br/>{_embedding_feature:access:description}' (in the MapComplete.osm.be theme 'Open Climbing Map')",
|
||||
"value": "members"
|
||||
},
|
||||
{
|
||||
"key": "_embedding_feature:access",
|
||||
"description": "Layer 'Climbing gyms' shows _embedding_feature:access=no with a fixed text, namely 'Not accessible as stated by <a href='#{_embedding_feature:id}'>the containing feature</a>' (in the MapComplete.osm.be theme 'Open Climbing Map')",
|
||||
"value": "no"
|
||||
},
|
||||
{
|
||||
"key": "access",
|
||||
"description": "Layer 'Climbing gyms' shows access=yes with a fixed text, namely 'Publicly accessible to anyone' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Open Climbing Map')",
|
||||
"value": "yes"
|
||||
},
|
||||
{
|
||||
"key": "access",
|
||||
"description": "Layer 'Climbing gyms' shows access=permit with a fixed text, namely 'You need a permit to access here' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Open Climbing Map')",
|
||||
"value": "permit"
|
||||
},
|
||||
{
|
||||
"key": "access",
|
||||
"description": "Layer 'Climbing gyms' shows access=customers with a fixed text, namely 'Only custumers' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Open Climbing Map')",
|
||||
"value": "customers"
|
||||
},
|
||||
{
|
||||
"key": "access",
|
||||
"description": "Layer 'Climbing gyms' shows access=members with a fixed text, namely 'Only club members' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Open Climbing Map')",
|
||||
"value": "members"
|
||||
},
|
||||
{
|
||||
"key": "access",
|
||||
"description": "Layer 'Climbing gyms' shows access=no with a fixed text, namely 'Not accessible' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Open Climbing Map')",
|
||||
"value": "no"
|
||||
},
|
||||
{
|
||||
"key": "access:description",
|
||||
"description": "Layer 'Climbing gyms' shows values with key 'access:description' (in the MapComplete.osm.be theme 'Open Climbing Map')"
|
||||
},
|
||||
{
|
||||
"key": "climbing:length",
|
||||
"description": "Layer 'Climbing gyms' shows and asks freeform values for key 'climbing:length' (in the MapComplete.osm.be theme 'Open Climbing Map')"
|
||||
|
@ -301,6 +409,60 @@
|
|||
"key": "url",
|
||||
"description": "Layer 'Climbing routes' shows and asks freeform values for key 'url' (in the MapComplete.osm.be theme 'Open Climbing Map')"
|
||||
},
|
||||
{
|
||||
"key": "_embedding_feature:access",
|
||||
"description": "Layer 'Climbing routes' shows _embedding_feature:access=yes with a fixed text, namely '<span class='subtle'>The <a href='#{_embedding_feature:id}'>containing feature</a> states that this is</span> publicly accessible<br/>{_embedding_feature:access:description}' (in the MapComplete.osm.be theme 'Open Climbing Map')",
|
||||
"value": "yes"
|
||||
},
|
||||
{
|
||||
"key": "_embedding_feature:access",
|
||||
"description": "Layer 'Climbing routes' shows _embedding_feature:access=permit with a fixed text, namely '<span class='subtle'>The <a href='#{_embedding_feature:id}'>containing feature</a> states that </span> a permit is needed to access<br/>{_embedding_feature:access:description}' (in the MapComplete.osm.be theme 'Open Climbing Map')",
|
||||
"value": "permit"
|
||||
},
|
||||
{
|
||||
"key": "_embedding_feature:access",
|
||||
"description": "Layer 'Climbing routes' shows _embedding_feature:access=customers with a fixed text, namely '<span class='subtle'>The <a href='#{_embedding_feature:id}'>containing feature</a> states that this is</span> only accessible to customers<br/>{_embedding_feature:access:description}' (in the MapComplete.osm.be theme 'Open Climbing Map')",
|
||||
"value": "customers"
|
||||
},
|
||||
{
|
||||
"key": "_embedding_feature:access",
|
||||
"description": "Layer 'Climbing routes' shows _embedding_feature:access=members with a fixed text, namely '<span class='subtle'>The <a href='#{_embedding_feature:id}'>containing feature</a> states that this is</span> only accessible to club members<br/>{_embedding_feature:access:description}' (in the MapComplete.osm.be theme 'Open Climbing Map')",
|
||||
"value": "members"
|
||||
},
|
||||
{
|
||||
"key": "_embedding_feature:access",
|
||||
"description": "Layer 'Climbing routes' shows _embedding_feature:access=no with a fixed text, namely 'Not accessible as stated by <a href='#{_embedding_feature:id}'>the containing feature</a>' (in the MapComplete.osm.be theme 'Open Climbing Map')",
|
||||
"value": "no"
|
||||
},
|
||||
{
|
||||
"key": "access",
|
||||
"description": "Layer 'Climbing routes' shows access=yes with a fixed text, namely 'Publicly accessible to anyone' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Open Climbing Map')",
|
||||
"value": "yes"
|
||||
},
|
||||
{
|
||||
"key": "access",
|
||||
"description": "Layer 'Climbing routes' shows access=permit with a fixed text, namely 'You need a permit to access here' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Open Climbing Map')",
|
||||
"value": "permit"
|
||||
},
|
||||
{
|
||||
"key": "access",
|
||||
"description": "Layer 'Climbing routes' shows access=customers with a fixed text, namely 'Only custumers' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Open Climbing Map')",
|
||||
"value": "customers"
|
||||
},
|
||||
{
|
||||
"key": "access",
|
||||
"description": "Layer 'Climbing routes' shows access=members with a fixed text, namely 'Only club members' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Open Climbing Map')",
|
||||
"value": "members"
|
||||
},
|
||||
{
|
||||
"key": "access",
|
||||
"description": "Layer 'Climbing routes' shows access=no with a fixed text, namely 'Not accessible' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Open Climbing Map')",
|
||||
"value": "no"
|
||||
},
|
||||
{
|
||||
"key": "access:description",
|
||||
"description": "Layer 'Climbing routes' shows values with key 'access:description' (in the MapComplete.osm.be theme 'Open Climbing Map')"
|
||||
},
|
||||
{
|
||||
"key": "climbing:length",
|
||||
"description": "Layer 'Climbing routes' shows and asks freeform values for key 'climbing:length' (in the MapComplete.osm.be theme 'Open Climbing Map')"
|
||||
|
@ -404,11 +566,15 @@
|
|||
},
|
||||
{
|
||||
"key": "climbing:length",
|
||||
"description": "Layer 'Climbing routes' shows values with key 'climbing:length' (in the MapComplete.osm.be theme 'Open Climbing Map')"
|
||||
"description": "Layer 'Climbing routes' shows and asks freeform values for key 'climbing:length' (in the MapComplete.osm.be theme 'Open Climbing Map')"
|
||||
},
|
||||
{
|
||||
"key": "climbing:grade:french",
|
||||
"description": "Layer 'Climbing routes' shows values with key 'climbing:grade:french' (in the MapComplete.osm.be theme 'Open Climbing Map')"
|
||||
"description": "Layer 'Climbing routes' shows and asks freeform values for key 'climbing:grade:french' (in the MapComplete.osm.be theme 'Open Climbing Map')"
|
||||
},
|
||||
{
|
||||
"key": "description",
|
||||
"description": "Layer 'Climbing routes' shows and asks freeform values for key 'description' (in the MapComplete.osm.be theme 'Open Climbing Map')"
|
||||
},
|
||||
{
|
||||
"key": "sport",
|
||||
|
@ -435,6 +601,60 @@
|
|||
"key": "url",
|
||||
"description": "Layer 'Climbing opportunities' shows and asks freeform values for key 'url' (in the MapComplete.osm.be theme 'Open Climbing Map')"
|
||||
},
|
||||
{
|
||||
"key": "_embedding_feature:access",
|
||||
"description": "Layer 'Climbing opportunities' shows _embedding_feature:access=yes with a fixed text, namely '<span class='subtle'>The <a href='#{_embedding_feature:id}'>containing feature</a> states that this is</span> publicly accessible<br/>{_embedding_feature:access:description}' (in the MapComplete.osm.be theme 'Open Climbing Map')",
|
||||
"value": "yes"
|
||||
},
|
||||
{
|
||||
"key": "_embedding_feature:access",
|
||||
"description": "Layer 'Climbing opportunities' shows _embedding_feature:access=permit with a fixed text, namely '<span class='subtle'>The <a href='#{_embedding_feature:id}'>containing feature</a> states that </span> a permit is needed to access<br/>{_embedding_feature:access:description}' (in the MapComplete.osm.be theme 'Open Climbing Map')",
|
||||
"value": "permit"
|
||||
},
|
||||
{
|
||||
"key": "_embedding_feature:access",
|
||||
"description": "Layer 'Climbing opportunities' shows _embedding_feature:access=customers with a fixed text, namely '<span class='subtle'>The <a href='#{_embedding_feature:id}'>containing feature</a> states that this is</span> only accessible to customers<br/>{_embedding_feature:access:description}' (in the MapComplete.osm.be theme 'Open Climbing Map')",
|
||||
"value": "customers"
|
||||
},
|
||||
{
|
||||
"key": "_embedding_feature:access",
|
||||
"description": "Layer 'Climbing opportunities' shows _embedding_feature:access=members with a fixed text, namely '<span class='subtle'>The <a href='#{_embedding_feature:id}'>containing feature</a> states that this is</span> only accessible to club members<br/>{_embedding_feature:access:description}' (in the MapComplete.osm.be theme 'Open Climbing Map')",
|
||||
"value": "members"
|
||||
},
|
||||
{
|
||||
"key": "_embedding_feature:access",
|
||||
"description": "Layer 'Climbing opportunities' shows _embedding_feature:access=no with a fixed text, namely 'Not accessible as stated by <a href='#{_embedding_feature:id}'>the containing feature</a>' (in the MapComplete.osm.be theme 'Open Climbing Map')",
|
||||
"value": "no"
|
||||
},
|
||||
{
|
||||
"key": "access",
|
||||
"description": "Layer 'Climbing opportunities' shows access=yes with a fixed text, namely 'Publicly accessible to anyone' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Open Climbing Map')",
|
||||
"value": "yes"
|
||||
},
|
||||
{
|
||||
"key": "access",
|
||||
"description": "Layer 'Climbing opportunities' shows access=permit with a fixed text, namely 'You need a permit to access here' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Open Climbing Map')",
|
||||
"value": "permit"
|
||||
},
|
||||
{
|
||||
"key": "access",
|
||||
"description": "Layer 'Climbing opportunities' shows access=customers with a fixed text, namely 'Only custumers' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Open Climbing Map')",
|
||||
"value": "customers"
|
||||
},
|
||||
{
|
||||
"key": "access",
|
||||
"description": "Layer 'Climbing opportunities' shows access=members with a fixed text, namely 'Only club members' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Open Climbing Map')",
|
||||
"value": "members"
|
||||
},
|
||||
{
|
||||
"key": "access",
|
||||
"description": "Layer 'Climbing opportunities' shows access=no with a fixed text, namely 'Not accessible' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Open Climbing Map')",
|
||||
"value": "no"
|
||||
},
|
||||
{
|
||||
"key": "access:description",
|
||||
"description": "Layer 'Climbing opportunities' shows values with key 'access:description' (in the MapComplete.osm.be theme 'Open Climbing Map')"
|
||||
},
|
||||
{
|
||||
"key": "climbing:length",
|
||||
"description": "Layer 'Climbing opportunities' shows and asks freeform values for key 'climbing:length' (in the MapComplete.osm.be theme 'Open Climbing Map')"
|
||||
|
@ -536,6 +756,21 @@
|
|||
"description": "Layer 'Climbing opportunities' shows noname=yes&name= with a fixed text, namely 'This climbing opportunity doesn't have a name' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Open Climbing Map') Picking this answer will delete the key name.",
|
||||
"value": ""
|
||||
},
|
||||
{
|
||||
"key": "climbing",
|
||||
"description": "Layer 'Climbing opportunities' shows climbing=boulder with a fixed text, namely 'A climbing boulder - a single rock or cliff with one or a few climbing routes which can be climbed safely without rope' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Open Climbing Map')",
|
||||
"value": "boulder"
|
||||
},
|
||||
{
|
||||
"key": "climbing",
|
||||
"description": "Layer 'Climbing opportunities' shows climbing=crag with a fixed text, namely 'A climbing crag - a single rock or cliff with at least a few climbing routes' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Open Climbing Map')",
|
||||
"value": "crag"
|
||||
},
|
||||
{
|
||||
"key": "climbing",
|
||||
"description": "Layer 'Climbing opportunities' shows climbing=area with a fixed text, namely 'A climbing area with one or more climbing crags and/or boulders' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Open Climbing Map')",
|
||||
"value": "area"
|
||||
},
|
||||
{
|
||||
"key": "leisure",
|
||||
"description": "The MapComplete theme Open Climbing Map has a layer Climbing opportunities? showing features with this tag",
|
||||
|
@ -566,15 +801,79 @@
|
|||
"description": "The MapComplete theme Open Climbing Map has a layer Climbing opportunities? showing features with this tag",
|
||||
"value": "stone"
|
||||
},
|
||||
{
|
||||
"key": "climbing",
|
||||
"description": "The MapComplete theme Open Climbing Map has a layer Climbing opportunities? showing features with this tag",
|
||||
"value": ""
|
||||
},
|
||||
{
|
||||
"key": "sport",
|
||||
"description": "Layer 'Climbing opportunities?' shows sport=climbing with a fixed text, namely 'Climbing is possible here' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Open Climbing Map')",
|
||||
"value": "climbing"
|
||||
},
|
||||
{
|
||||
"key": "climbing",
|
||||
"description": "Layer 'Climbing opportunities?' shows climbing=no with a fixed text, namely 'Climbing is not possible here' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Open Climbing Map')",
|
||||
"value": "no"
|
||||
},
|
||||
{
|
||||
"key": "url",
|
||||
"description": "Layer 'Climbing opportunities?' shows and asks freeform values for key 'url' (in the MapComplete.osm.be theme 'Open Climbing Map')"
|
||||
},
|
||||
{
|
||||
"key": "_embedding_feature:access",
|
||||
"description": "Layer 'Climbing opportunities?' shows _embedding_feature:access=yes with a fixed text, namely '<span class='subtle'>The <a href='#{_embedding_feature:id}'>containing feature</a> states that this is</span> publicly accessible<br/>{_embedding_feature:access:description}' (in the MapComplete.osm.be theme 'Open Climbing Map')",
|
||||
"value": "yes"
|
||||
},
|
||||
{
|
||||
"key": "_embedding_feature:access",
|
||||
"description": "Layer 'Climbing opportunities?' shows _embedding_feature:access=permit with a fixed text, namely '<span class='subtle'>The <a href='#{_embedding_feature:id}'>containing feature</a> states that </span> a permit is needed to access<br/>{_embedding_feature:access:description}' (in the MapComplete.osm.be theme 'Open Climbing Map')",
|
||||
"value": "permit"
|
||||
},
|
||||
{
|
||||
"key": "_embedding_feature:access",
|
||||
"description": "Layer 'Climbing opportunities?' shows _embedding_feature:access=customers with a fixed text, namely '<span class='subtle'>The <a href='#{_embedding_feature:id}'>containing feature</a> states that this is</span> only accessible to customers<br/>{_embedding_feature:access:description}' (in the MapComplete.osm.be theme 'Open Climbing Map')",
|
||||
"value": "customers"
|
||||
},
|
||||
{
|
||||
"key": "_embedding_feature:access",
|
||||
"description": "Layer 'Climbing opportunities?' shows _embedding_feature:access=members with a fixed text, namely '<span class='subtle'>The <a href='#{_embedding_feature:id}'>containing feature</a> states that this is</span> only accessible to club members<br/>{_embedding_feature:access:description}' (in the MapComplete.osm.be theme 'Open Climbing Map')",
|
||||
"value": "members"
|
||||
},
|
||||
{
|
||||
"key": "_embedding_feature:access",
|
||||
"description": "Layer 'Climbing opportunities?' shows _embedding_feature:access=no with a fixed text, namely 'Not accessible as stated by <a href='#{_embedding_feature:id}'>the containing feature</a>' (in the MapComplete.osm.be theme 'Open Climbing Map')",
|
||||
"value": "no"
|
||||
},
|
||||
{
|
||||
"key": "access",
|
||||
"description": "Layer 'Climbing opportunities?' shows access=yes with a fixed text, namely 'Publicly accessible to anyone' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Open Climbing Map')",
|
||||
"value": "yes"
|
||||
},
|
||||
{
|
||||
"key": "access",
|
||||
"description": "Layer 'Climbing opportunities?' shows access=permit with a fixed text, namely 'You need a permit to access here' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Open Climbing Map')",
|
||||
"value": "permit"
|
||||
},
|
||||
{
|
||||
"key": "access",
|
||||
"description": "Layer 'Climbing opportunities?' shows access=customers with a fixed text, namely 'Only custumers' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Open Climbing Map')",
|
||||
"value": "customers"
|
||||
},
|
||||
{
|
||||
"key": "access",
|
||||
"description": "Layer 'Climbing opportunities?' shows access=members with a fixed text, namely 'Only club members' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Open Climbing Map')",
|
||||
"value": "members"
|
||||
},
|
||||
{
|
||||
"key": "access",
|
||||
"description": "Layer 'Climbing opportunities?' shows access=no with a fixed text, namely 'Not accessible' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Open Climbing Map')",
|
||||
"value": "no"
|
||||
},
|
||||
{
|
||||
"key": "access:description",
|
||||
"description": "Layer 'Climbing opportunities?' shows values with key 'access:description' (in the MapComplete.osm.be theme 'Open Climbing Map')"
|
||||
},
|
||||
{
|
||||
"key": "climbing:length",
|
||||
"description": "Layer 'Climbing opportunities?' shows and asks freeform values for key 'climbing:length' (in the MapComplete.osm.be theme 'Open Climbing Map')"
|
||||
|
|
|
@ -21,10 +21,10 @@ export default class Table extends BaseUIElement {
|
|||
|
||||
const headerMarkdownParts = this._header.map(hel => hel?.AsMarkdown() ?? " ")
|
||||
const header = headerMarkdownParts.join(" | ");
|
||||
const headerSep = headerMarkdownParts.map(part => '-'.repeat(part.length + 2)).join("|")
|
||||
const table = this._contents.map(row => row.map(el => el.AsMarkdown() ?? " ").join("|")).join("\n")
|
||||
const headerSep = headerMarkdownParts.map(part => '-'.repeat(part.length + 2)).join(" | ")
|
||||
const table = this._contents.map(row => row.map(el => el.AsMarkdown() ?? " ").join(" | ")).join("\n")
|
||||
|
||||
return [header, headerSep, table, ""].join("\n")
|
||||
return "\n\n" + [header, headerSep, table, ""].join("\n")
|
||||
}
|
||||
|
||||
protected InnerConstructElement(): HTMLElement {
|
||||
|
|
Loading…
Reference in a new issue