Regen docs

This commit is contained in:
pietervdvn 2021-11-07 17:18:10 +01:00
parent e15ec387a2
commit 1511b0a167
11 changed files with 412 additions and 406 deletions

View file

@ -1,101 +1,142 @@
Metatags
Metatags
========== ==========
Metatags are extra tags available, in order to display more data or to give better questions. Metatags are extra tags available, in order to display more data or to give better questions.
The are calculated automatically on every feature when the data arrives in the webbrowser. This document gives an The are calculated automatically on every feature when the data arrives in the webbrowser. This document gives an overview of the available metatags.
overview of the available metatags.
**Hint:** when using metatags, add the [query parameter](URL_Parameters.md) `debug=true` to the URL. This will include a **Hint:** when using metatags, add the [query parameter](URL_Parameters.md) `debug=true` to the URL. This will include a box in the popup for features which shows all the properties of the object
box in the popup for features which shows all the properties of the object
Metatags calculated by MapComplete Metatags calculated by MapComplete
------------------------------------ ------------------------------------
The following values are always calculated, by default, by MapComplete and are available automatically on all elements The following values are always calculated, by default, by MapComplete and are available automatically on all elements in every theme
in every theme
### _lat, _lon ### _lat, _lon
The latitude and longitude of the point (or centerpoint in the case of a way/area) The latitude and longitude of the point (or centerpoint in the case of a way/area)
### _layer ### _layer
The layer-id to which this feature belongs. Note that this might be return any applicable if `passAllFeatures` is
defined.
The layer-id to which this feature belongs. Note that this might be return any applicable if `passAllFeatures` is defined.
### _surface, _surface:ha ### _surface, _surface:ha
The surface area of the feature, in square meters and in hectare. Not set on points and ways The surface area of the feature, in square meters and in hectare. Not set on points and ways
This is a lazy metatag and is only calculated when needed This is a lazy metatag and is only calculated when needed
### _length, _length:km ### _length, _length:km
The total length of a feature in meters (and in kilometers, rounded to one decimal for '_length:km'). For a surface, the
length of the perimeter
The total length of a feature in meters (and in kilometers, rounded to one decimal for '_length:km'). For a surface, the length of the perimeter
### Theme-defined keys ### Theme-defined keys
If 'units' is defined in the layoutConfig, then this metatagger will rewrite the specified keys to have the canonical
form (e.g. `1meter` will be rewritten to `1m`)
If 'units' is defined in the layoutConfig, then this metatagger will rewrite the specified keys to have the canonical form (e.g. `1meter` will be rewritten to `1m`)
### _country ### _country
The country code of the property (with latlon2country) The country code of the property (with latlon2country)
### _isOpen, _isOpen:description ### _isOpen, _isOpen:description
If 'opening_hours' is present, it will add the current state of the feature (being 'yes' or 'no') If 'opening_hours' is present, it will add the current state of the feature (being 'yes' or 'no')
This is a lazy metatag and is only calculated when needed This is a lazy metatag and is only calculated when needed
### _direction:numerical, _direction:leftright ### _direction:numerical, _direction:leftright
_direction:numerical is a normalized, numerical direction based on 'camera:direction' or on 'direction'; it is only
present if a valid direction is found (e.g. 38.5 or NE). _direction:leftright is either 'left' or 'right', which is
left-looking on the map or 'right-looking' on the map _direction:numerical is a normalized, numerical direction based on 'camera:direction' or on 'direction'; it is only present if a valid direction is found (e.g. 38.5 or NE). _direction:leftright is either 'left' or 'right', which is left-looking on the map or 'right-looking' on the map
### _now:date, _now:datetime, _loaded:date, _loaded:_datetime ### _now:date, _now:datetime, _loaded:date, _loaded:_datetime
Adds the time that the data got loaded - pretty much the time of downloading from overpass. The format is YYYY-MM-DD hh:
mm, aka 'sortable' aka ISO-8601-but-not-entirely
Adds the time that the data got loaded - pretty much the time of downloading from overpass. The format is YYYY-MM-DD hh:mm, aka 'sortable' aka ISO-8601-but-not-entirely
### _last_edit:contributor, _last_edit:contributor:uid, _last_edit:changeset, _last_edit:timestamp, _version_number, _backend ### _last_edit:contributor, _last_edit:contributor:uid, _last_edit:changeset, _last_edit:timestamp, _version_number, _backend
Information about the last edit of this object. Information about the last edit of this object.
### sidewalk:left, sidewalk:right, generic_key:left:property, generic_key:right:property ### sidewalk:left, sidewalk:right, generic_key:left:property, generic_key:right:property
Rewrites tags from 'generic_key:both:property' as 'generic_key:left:property' and 'generic_key:right:property' (and
similar for sidewalk tagging). Note that this rewritten tags _will be reuploaded on a change_. To prevent to much
unrelated retagging, this is only enabled if the layer has at least some lineRenderings with offset defined Rewrites tags from 'generic_key:both:property' as 'generic_key:left:property' and 'generic_key:right:property' (and similar for sidewalk tagging). Note that this rewritten tags _will be reuploaded on a change_. To prevent to much unrelated retagging, this is only enabled if the layer has at least some lineRenderings with offset defined
Calculating tags with Javascript Calculating tags with Javascript
---------------------------------- ----------------------------------
In some cases, it is useful to have some tags calculated based on other properties. Some useful tags are available by In some cases, it is useful to have some tags calculated based on other properties. Some useful tags are available by default (e.g. `lat`, `lon`, `_country`), as detailed above.
default (e.g. `lat`, `lon`, `_country`), as detailed above.
It is also possible to calculate your own tags - but this requires some javascript knowledge. It is also possible to calculate your own tags - but this requires some javascript knowledge.
Before proceeding, some warnings: Before proceeding, some warnings:
- DO NOT DO THIS AS BEGINNER
- **Only do this if all other techniques fail** This should _not_ be done to create a rendering effect, only to
calculate a specific value - DO NOT DO THIS AS BEGINNER
- **THIS MIGHT BE DISABLED WITHOUT ANY NOTICE ON UNOFFICIAL THEMES** As unofficial themes might be loaded from the - **Only do this if all other techniques fail** This should _not_ be done to create a rendering effect, only to calculate a specific value
internet, this is the equivalent of injecting arbitrary code into the client. It'll be disabled if abuse occurs. - **THIS MIGHT BE DISABLED WITHOUT ANY NOTICE ON UNOFFICIAL THEMES** As unofficial themes might be loaded from the internet, this is the equivalent of injecting arbitrary code into the client. It'll be disabled if abuse occurs.
To enable this feature, add a field `calculatedTags` in the layer object, e.g.: To enable this feature, add a field `calculatedTags` in the layer object, e.g.:
@ -113,75 +154,71 @@ To enable this feature, add a field `calculatedTags` in the layer object, e.g.:
```` ````
The above code will be executed for every feature in the layer. The feature is accessible as `feat` and is an amended
geojson object:
- `area` contains the surface area (in square meters) of the object
- `lat` and `lon` contain the latitude and longitude The above code will be executed for every feature in the layer. The feature is accessible as `feat` and is an amended geojson object:
- `area` contains the surface area (in square meters) of the object
- `lat` and `lon` contain the latitude and longitude
Some advanced functions are available on **feat** as well: Some advanced functions are available on **feat** as well:
- [distanceTo](#distanceTo) - [distanceTo](#distanceTo)
- [overlapWith](#overlapWith) - [overlapWith](#overlapWith)
- [closest](#closest) - [closest](#closest)
- [closestn](#closestn) - [closestn](#closestn)
- [memberships](#memberships) - [memberships](#memberships)
- [get](#get) - [get](#get)
### distanceTo ### distanceTo
Calculates the distance between the feature and a specified point in kilometer. The input should either be a pair of Calculates the distance between the feature and a specified point in kilometer. The input should either be a pair of coordinates, a geojson feature or the ID of an object
coordinates, a geojson feature or the ID of an object
0. feature OR featureID OR longitude 0. feature OR featureID OR longitude
1. undefined OR latitude 1. undefined OR latitude
### overlapWith ### overlapWith
Gives a list of features from the specified layer which this feature (partly) overlaps with. A point which is embedded Gives a list of features from the specified layer which this feature (partly) overlaps with. A point which is embedded in the feature is detected as well.If the current feature is a point, all features that this point is embeded in are given.
in the feature is detected as well.If the current feature is a point, all features that this point is embeded in are
given.
The returned value is `{ feat: GeoJSONFeature, overlap: number}[]` where `overlap` is the overlapping surface are (in The returned value is `{ feat: GeoJSONFeature, overlap: number}[]` where `overlap` is the overlapping surface are (in m²) for areas, the overlapping length (in meter) if the current feature is a line or `undefined` if the current feature is a point.
m²) for areas, the overlapping length (in meter) if the current feature is a line or `undefined` if the current feature The resulting list is sorted in descending order by overlap. The feature with the most overlap will thus be the first in the list
is a point. The resulting list is sorted in descending order by overlap. The feature with the most overlap will thus be
the first in the list
For example to get all objects which overlap or embed from a layer, For example to get all objects which overlap or embed from a layer, use `_contained_climbing_routes_properties=feat.overlapWith('climbing_route')`
use `_contained_climbing_routes_properties=feat.overlapWith('climbing_route')`
0. ...layerIds - one or more layer ids of the layer from which every feature is checked for overlap) 0. ...layerIds - one or more layer ids of the layer from which every feature is checked for overlap)
### closest ### closest
Given either a list of geojson features or a single layer name, gives the single object which is nearest to the feature. Given either a list of geojson features or a single layer name, gives the single object which is nearest to the feature. In the case of ways/polygons, only the centerpoint is considered. Returns a single geojson feature or undefined if nothing is found (or not yet laoded)
In the case of ways/polygons, only the centerpoint is considered. Returns a single geojson feature or undefined if
nothing is found (or not yet laoded)
0. list of features or a layer name or '*' to get all features 0. list of features or a layer name or '*' to get all features
### closestn ### closestn
Given either a list of geojson features or a single layer name, gives the n closest objects which are nearest to the Given either a list of geojson features or a single layer name, gives the n closest objects which are nearest to the feature (excluding the feature itself). In the case of ways/polygons, only the centerpoint is considered. Returns a list of `{feat: geojson, distance:number}` the empty list if nothing is found (or not yet loaded)
feature (excluding the feature itself). In the case of ways/polygons, only the centerpoint is considered. Returns a list
of `{feat: geojson, distance:number}` the empty list if nothing is found (or not yet loaded)
If a 'unique tag key' is given, the tag with this key will only appear once (e.g. if 'name' is given, all features will If a 'unique tag key' is given, the tag with this key will only appear once (e.g. if 'name' is given, all features will have a different name)
have a different name)
0. list of features or layer name or '*' to get all features 0. list of features or layer name or '*' to get all features
1. amount of features 1. amount of features
2. unique tag key (optional) 2. unique tag key (optional)
3. maxDistanceInMeters (optional) 3. maxDistanceInMeters (optional)
### memberships ### memberships
Gives a list of `{role: string, relation: Relation}`-objects, containing all the relations that this feature is part of. Gives a list of `{role: string, relation: Relation}`-objects, containing all the relations that this feature is part of.
For example: `_part_of_walking_routes=feat.memberships().map(r => r.relation.tags.name).join(';')` For example: `_part_of_walking_routes=feat.memberships().map(r => r.relation.tags.name).join(';')`
### get ### get
Gets the property of the feature, parses it (as JSON) and returns it. Might return 'undefined' if not defined, null, ... Gets the property of the feature, parses it (as JSON) and returns it. Might return 'undefined' if not defined, null, ...
0. key Generated from SimpleMetaTagger, ExtraFunction 0. key
Generated from SimpleMetaTagger, ExtraFunction

View file

@ -1,10 +1,10 @@
Available types for text fields
Available types for text fields
================================= =================================
The listed types here trigger a special input element. Use them in `tagrendering.freeform.type` of your tagrendering to The listed types here trigger a special input element. Use them in `tagrendering.freeform.type` of your tagrendering to activate them
activate them
## string ## string
@ -24,15 +24,15 @@ A geographical direction, in degrees. 0° is north, 90° is east, ... Will retur
## length ## length
A geographical length in meters (rounded at two points). Will give an extra minimap with a measurement tool. A geographical length 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"]
Arguments: [ zoomlevel, preferredBackgroundMapType (comma separated) ], e.g. `["21", "map,photo"]
## wikidata ## wikidata
A wikidata identifier, e.g. Q42. A wikidata identifier, e.g. Q42.
### Helper arguments ### Helper arguments
name | doc name | doc
------ | ----- ------ | -----
key | the value of this tag will initialize search (default: name) key | the value of this tag will initialize search (default: name)
@ -43,10 +43,10 @@ subarg | doc
removePrefixes | remove these snippets of text from the start of the passed string to search removePrefixes | remove these snippets of text from the start of the passed string to search
removePostfixes | remove these snippets of text from the end of the passed string to search removePostfixes | remove these snippets of text from the end of the passed string to search
### Example usage ### Example usage
The following is the 'freeform'-part of a layer config which will trigger a search for the wikidata item corresponding The following is the 'freeform'-part of a layer config which will trigger a search for the wikidata item corresponding with the name of the selected feature. It will also remove '-street', '-square', ... if found at the end of the name
with the name of the selected feature. It will also remove '-street', '-square', ... if found at the end of the name
``` ```
"freeform": { "freeform": {
@ -102,9 +102,10 @@ A phone number
## opening_hours ## opening_hours
Has extra elements to easily input when a POI is opened. Has extra elements to easily input when a POI is opened.
### Helper arguments ### Helper arguments
name | doc name | doc
------ | ----- ------ | -----
options | A JSON-object of type `{ prefix: string, postfix: string }`. options | A JSON-object of type `{ prefix: string, postfix: string }`.
@ -114,9 +115,10 @@ subarg | doc
prefix | Piece of text that will always be added to the front of the generated opening hours. If the OSM-data does not start with this, it will fail to parse prefix | Piece of text that will always be added to the front of the generated opening hours. If the OSM-data does not start with this, it will fail to parse
postfix | Piece of text that will always be added to the end of the generated opening hours postfix | Piece of text that will always be added to the end of the generated opening hours
### Example usage ### Example usage
To add a conditional (based on time) access restriction: To add a conditional (based on time) access restriction:
``` ```
@ -132,8 +134,7 @@ To add a conditional (based on time) access restriction:
} }
``` ```
*Don't forget to pass the prefix and postfix in the rendering as *Don't forget to pass the prefix and postfix in the rendering as well*: `{opening_hours_table(opening_hours,yes @ &LPARENS, &RPARENS )`
well*: `{opening_hours_table(opening_hours,yes @ &LPARENS, &RPARENS )`
## color ## color

View file

@ -1,40 +1,43 @@
### Special tag renderings ### 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 `{func_name()}`, `{func_name(arg, someotherarg)}` or `{func_name(args):cssStyle}`. Note that you _do
not_ need to use quotes around your arguments, the comma is enough to separate them. This also implies you cannot use a
comma in your args
- [all_tags](#all_tags) 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.
- [image_carousel](#image_carousel)
- [image_upload](#image_upload) General usage is `{func_name()}`, `{func_name(arg, someotherarg)}` or `{func_name(args):cssStyle}`. Note that you _do not_ need to use quotes around your arguments, the comma is enough to separate them. This also implies you cannot use a comma in your args
- [wikipedia](#wikipedia)
- [minimap](#minimap)
- [sided_minimap](#sided_minimap)
- [reviews](#reviews) - [all_tags](#all_tags)
- [opening_hours_table](#opening_hours_table) - [image_carousel](#image_carousel)
- [live](#live) - [image_upload](#image_upload)
- [histogram](#histogram) - [wikipedia](#wikipedia)
- [share_link](#share_link) - [minimap](#minimap)
- [canonical](#canonical) - [sided_minimap](#sided_minimap)
- [import_button](#import_button) - [reviews](#reviews)
- [multi_apply](#multi_apply) - [opening_hours_table](#opening_hours_table)
- [tag_apply](#tag_apply) - [live](#live)
- [histogram](#histogram)
- [share_link](#share_link)
- [canonical](#canonical)
- [import_button](#import_button)
- [multi_apply](#multi_apply)
- [tag_apply](#tag_apply)
### all_tags ### all_tags
Prints all key-value pairs of the object - used for debugging Prints all key-value pairs of the object - used for debugging
#### Example usage #### Example usage
`{all_tags()}` `{all_tags()}`
### image_carousel ### image_carousel
Creates an image carousel for the given sources. An attempt will be made to guess what source is used. Supported: 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)
Wikidata identifiers, Wikipedia pages, Wikimedia categories, IMGUR (with attribution, direct links)
name | default | description name | default | description
------ | --------- | ------------- ------ | --------- | -------------
@ -42,11 +45,12 @@ image key/prefix (multiple values allowed if comma-seperated) | image,mapillary,
#### Example usage #### Example usage
`{image_carousel(image,mapillary,image,wikidata,wikimedia_commons,image,image)}` `{image_carousel(image,mapillary,image,wikidata,wikimedia_commons,image,image)}`
### image_upload ### image_upload
Creates a button where a user can upload an image to IMGUR Creates a button where a user can upload an image to IMGUR
name | default | description name | default | description
------ | --------- | ------------- ------ | --------- | -------------
@ -55,11 +59,12 @@ label | Add image | The text to show on the button
#### Example usage #### Example usage
`{image_upload(image,Add image)}` `{image_upload(image,Add image)}`
### wikipedia ### wikipedia
A box showing the corresponding wikipedia article - based on the wikidata tag A box showing the corresponding wikipedia article - based on the wikidata tag
name | default | description name | default | description
------ | --------- | ------------- ------ | --------- | -------------
@ -67,13 +72,12 @@ keyToShowWikipediaFor | wikidata | Use the wikidata entry from this key to show
#### Example usage #### Example usage
`{wikipedia()}` is a basic example, `{wikipedia(name:etymology:wikidata)}` to show the wikipedia page of whom the `{wikipedia()}` is a basic example, `{wikipedia(name:etymology:wikidata)}` to show the wikipedia page of whom the feature was named after. Also remember that these can be styled, e.g. `{wikipedia():max-height: 10rem}` to limit the height
feature was named after. Also remember that these can be styled, e.g. `{wikipedia():max-height: 10rem}` to limit the
height
### minimap ### minimap
A small map showing the selected feature. A small map showing the selected feature.
name | default | description name | default | description
------ | --------- | ------------- ------ | --------- | -------------
@ -82,14 +86,12 @@ idKey | id | (Matches all resting arguments) This argument should be the key of
#### Example usage #### Example usage
`{minimap()}` `{minimap()}`, `{minimap(17, id, _list_of_embedded_feature_ids_calculated_by_calculated_tag):height:10rem; border: 2px solid black}`
, `{minimap(17, id, _list_of_embedded_feature_ids_calculated_by_calculated_tag):height:10rem; border: 2px solid black}`
### sided_minimap ### sided_minimap
A small map showing _only one side_ the selected feature. *This features requires to have linerenderings with offset* as A small map showing _only one side_ the selected feature. *This features requires to have linerenderings with offset* as only linerenderings with a postive or negative offset will be shown. Note: in most cases, this map will be automatically introduced
only linerenderings with a postive or negative offset will be shown. Note: in most cases, this map will be automatically
introduced
name | default | description name | default | description
------ | --------- | ------------- ------ | --------- | -------------
@ -97,48 +99,41 @@ side | _undefined_ | The side to show, either `left` or `right`
#### Example usage #### Example usage
`{sided_minimap(left)}` `{sided_minimap(left)}`
### reviews ### reviews
Adds an overview of the mangrove-reviews of this object. Mangrove.Reviews needs - in order to identify the reviewed 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
object - a coordinate and a name. By default, the name of the object is given, but this can be overwritten
name | default | description name | default | description
------ | --------- | ------------- ------ | --------- | -------------
subjectKey | name | The key to use to determine the subject. If specified, the subject will be <b>tags[subjectKey]</b> subjectKey | name | The key to use to determine the subject. If specified, the subject will be <b>tags[subjectKey]</b>
fallback | _ fallback | _undefined_ | The identifier to use, if <i>tags[subjectKey]</i> as specified above is not available. This is effectively a fallback value
undefined_ | The identifier to use, if <i>tags[subjectKey]</i> as specified above is not available. This is effectively a fallback value
#### Example usage #### Example usage
`{reviews()}` for a vanilla review, `{reviews(name, play_forest)}` to review a play forest. If a name is known, the name `{reviews()}` for a vanilla review, `{reviews(name, play_forest)}` to review a play forest. If a name is known, the name will be used as identifier, otherwise 'play_forest' is used
will be used as identifier, otherwise 'play_forest' is used
### opening_hours_table ### opening_hours_table
Creates an opening-hours table. Usage: {opening_hours_table(opening_hours)} to create a table of the tag ' Creates an opening-hours table. Usage: {opening_hours_table(opening_hours)} to create a table of the tag 'opening_hours'.
opening_hours'.
name | default | description name | default | description
------ | --------- | ------------- ------ | --------- | -------------
key | opening_hours | The tagkey from which the table is constructed. key | opening_hours | The tagkey from which the table is constructed.
prefix | _empty string_ | Remove this string from the start of the value before parsing. __Note: use `&LPARENs` to prefix | _empty string_ | Remove this string from the start of the value before parsing. __Note: use `&LPARENs` to indicate `(` if needed__
indicate `(` if needed__ postfix | _empty string_ | Remove this string from the end of the value before parsing. __Note: use `&RPARENs` to indicate `)` if needed__
postfix | _empty string_ | Remove this string from the end of the value before parsing. __Note: use `&RPARENs` to
indicate `)` if needed__
#### Example usage #### Example usage
A normal opening hours table can be invoked with `{opening_hours_table()}`. A table for e.g. conditional access with A normal opening hours table can be invoked with `{opening_hours_table()}`. A table for e.g. conditional access with opening hours can be `{opening_hours_table(access:conditional, no @ &LPARENS, &RPARENS)}`
opening hours can be `{opening_hours_table(access:conditional, no @ &LPARENS, &RPARENS)}`
### live ### 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 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)}
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 name | default | description
------ | --------- | ------------- ------ | --------- | -------------
@ -148,28 +143,28 @@ path | _undefined_ | The path (or shorthand) that should be returned
#### Example usage #### Example usage
{live({url},{url:format},hour)} {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)}
{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 ### histogram
Create a histogram for a list of given values, read from the properties. Create a histogram for a list of given values, read from the properties.
name | default | description name | default | description
------ | --------- | ------------- ------ | --------- | -------------
key | _undefined_ | The key to be read and to generate a histogram from key | _undefined_ | The key to be read and to generate a histogram from
title | _empty string_ | The text to put above the given values column title | _empty string_ | The text to put above the given values column
countHeader | _empty string_ | The text to put above the counts countHeader | _empty string_ | The text to put above the counts
colors* | _ colors* | _undefined_ | (Matches all resting arguments - optional) Matches a regex onto a color value, e.g. `3[a-zA-Z+-]*:#33cc33`
undefined_ | (Matches all resting arguments - optional) Matches a regex onto a color value, e.g. `3[a-zA-Z+-]*:#33cc33`
#### Example usage #### Example usage
`{histogram('some_key')}` with properties being `{some_key: ['a','b','a','c']} to create a histogram `{histogram('some_key')}` with properties being `{some_key: ['a','b','a','c']} to create a histogram
### share_link ### share_link
Creates a link that (attempts to) open the native 'share'-screen Creates a link that (attempts to) open the native 'share'-screen
name | default | description name | default | description
------ | --------- | ------------- ------ | --------- | -------------
@ -177,11 +172,12 @@ url | _undefined_ | The url to share (default: current URL)
#### Example usage #### Example usage
{share_link()} to share the current page, {share_link(<some_url>)} to share the given url {share_link()} to share the current page, {share_link(<some_url>)} to share the given url
### canonical ### canonical
Converts a short, canonical value into the long, translated text Converts a short, canonical value into the long, translated text
name | default | description name | default | description
------ | --------- | ------------- ------ | --------- | -------------
@ -189,12 +185,12 @@ key | _undefined_ | The key of the tag to give the canonical text for
#### Example usage #### Example usage
{canonical(length)} will give 42 metre (in french) {canonical(length)} will give 42 metre (in french)
### import_button ### import_button
This button will copy the data from an external dataset into OpenStreetMap. It is only functional in official themes but This button will copy the data from an external dataset into OpenStreetMap. It is only functional in official themes but can be tested in unofficial themes.
can be tested in unofficial themes.
#### Importing a dataset into OpenStreetMap: requirements #### Importing a dataset into OpenStreetMap: requirements
@ -202,113 +198,101 @@ If you want to import a dataset, make sure that:
1. The dataset to import has a suitable license 1. The dataset to import has a suitable license
2. The community has been informed of the import 2. The community has been informed of the import
3. All other requirements of the [import guidelines](https://wiki.openstreetmap.org/wiki/Import/Guidelines) have been 3. All other requirements of the [import guidelines](https://wiki.openstreetmap.org/wiki/Import/Guidelines) have been followed
followed
There are also some technicalities in your theme to keep in mind: There are also some technicalities in your theme to keep in mind:
1. The new feature will be added and will flow through the program as any other new point as if it came from OSM. This 1. The new feature will be added and will flow through the program as any other new point as if it came from OSM.
means that there should be a layer which will match the new tags and which will display it. This means that there should be a layer which will match the new tags and which will display it.
2. The original feature from your geojson layer will gain the tag '_imported=yes'. This should be used to change the 2. The original feature from your geojson layer will gain the tag '_imported=yes'.
appearance or even to hide it (eg by changing the icon size to zero) This should be used to change the appearance or even to hide it (eg by changing the icon size to zero)
3. There should be a way for the theme to detect previously imported points, even after reloading. A reference number to 3. There should be a way for the theme to detect previously imported points, even after reloading.
the original dataset is an excellent way to do this A reference number to the original dataset is an excellent way to do this
4. When importing ways, the theme creator is also responsible of avoiding overlapping ways. 4. When importing ways, the theme creator is also responsible of avoiding overlapping ways.
#### Disabled in unofficial themes #### Disabled in unofficial themes
The import button can be tested in an unofficial theme by adding `test=true` or `backend=osm-test` The import button can be tested in an unofficial theme by adding `test=true` or `backend=osm-test` as [URL-paramter](URL_Parameters.md).
as [URL-paramter](URL_Parameters.md). The import button will show up then. If in testmode, you can read the The import button will show up then. If in testmode, you can read the changeset-XML directly in the web console.
changeset-XML directly in the web console. In the case that MapComplete is pointed to the testing grounds, the edit will In the case that MapComplete is pointed to the testing grounds, the edit will be made on https://master.apis.dev.openstreetmap.org
be made on https://master.apis.dev.openstreetmap.org
#### Specifying which tags to copy or add #### Specifying which tags to copy or add
The argument `tags` of the import button takes a `;`-seperated list of tags to add. The argument `tags` of the import button takes a `;`-seperated list of tags to add.
These can either be a tag to add, such as `amenity=fast_food` or can use a substitution, e.g. `addr:housenumber=$number` These can either be a tag to add, such as `amenity=fast_food` or can use a substitution, e.g. `addr:housenumber=$number`.
. This new point will then have the tags `amenity=fast_food` and `addr:housenumber` with the value that was saved This new point will then have the tags `amenity=fast_food` and `addr:housenumber` with the value that was saved in `number` in the original feature.
in `number` in the original feature.
If a value to substitute is undefined, empty string will be used instead. If a value to substitute is undefined, empty string will be used instead.
This supports multiple values, e.g. `ref=$source:geometry:type/$source:geometry:ref` This supports multiple values, e.g. `ref=$source:geometry:type/$source:geometry:ref`
Remark that the syntax is slightly different then expected; it uses '$' to note a value to copy, followed by a name ( Remark that the syntax is slightly different then expected; it uses '$' to note a value to copy, followed by a name (matched with `[a-zA-Z0-9_:]*`). Sadly, delimiting with `{}` as these already mark the boundaries of the special rendering...
matched with `[a-zA-Z0-9_:]*`). Sadly, delimiting with `{}` as these already mark the boundaries of the special
rendering... Note that these values can be prepare with javascript in the theme by using a [calculatedTag](calculatedTags.md#calculating-tags-with-javascript)
Note that these values can be prepare with javascript in the theme by using
a [calculatedTag](calculatedTags.md#calculating-tags-with-javascript)
name | default | description name | default | description
------ | --------- | ------------- ------ | --------- | -------------
targetLayer | _ targetLayer | _undefined_ | The id of the layer where this point should end up. This is not very strict, it will simply result in checking that this layer is shown preventing possible duplicate elements
undefined_ | The id of the layer where this point should end up. This is not very strict, it will simply result in checking that this layer is shown preventing possible duplicate elements
tags | _undefined_ | The tags to add onto the new object - see specification above tags | _undefined_ | The tags to add onto the new object - see specification above
text | Import this data into OpenStreetMap | The text to show on the button text | Import this data into OpenStreetMap | The text to show on the button
icon | ./assets/svg/addSmall.svg | A nice icon to show in the button icon | ./assets/svg/addSmall.svg | A nice icon to show in the button
minzoom | 18 | How far the contributor must zoom in before being able to import the point minzoom | 18 | How far the contributor must zoom in before being able to import the point
Snap onto layer(s)/replace geometry with this other way | _ Snap onto layer(s)/replace geometry with this other way | _undefined_ | - If the value corresponding with this key starts with 'way/' and the feature is a LineString or Polygon, the original OSM-way geometry will be changed to match the new geometry
undefined_ | - If the value corresponding with this key starts with 'way/' and the feature is a LineString or Polygon, the original OSM-way geometry will be changed to match the new geometry - If a way of the given layer(s) is closeby, will snap the new point onto this way (similar as preset might snap). To show multiple layers to snap onto, use a `;`-seperated list
snap max distance | 5 | The maximum distance that this point will move to snap onto a layer (in meters)
- If a way of the given layer(s) is closeby, will snap the new point onto this way (similar as preset might snap). To
show multiple layers to snap onto, use a `;`-seperated list snap max distance | 5 | The maximum distance that this
point will move to snap onto a layer (in meters)
#### Example usage #### Example usage
`{import_button(,,Import this data into OpenStreetMap,./assets/svg/addSmall.svg,18,,5)}` `{import_button(,,Import this data into OpenStreetMap,./assets/svg/addSmall.svg,18,,5)}`
### multi_apply ### multi_apply
A button to apply the tagging of this object onto a list of other features. This is an advanced feature for which you'll A button to apply the tagging of this object onto a list of other features. This is an advanced feature for which you'll need calculatedTags
need calculatedTags
name | default | description name | default | description
------ | --------- | ------------- ------ | --------- | -------------
feature_ids | _undefined_ | A JSOn-serialized list of IDs of features to apply the tagging on feature_ids | _undefined_ | A JSOn-serialized list of IDs of features to apply the tagging on
keys | _ keys | _undefined_ | One key (or multiple keys, seperated by ';') of the attribute that should be copied onto the other features.
undefined_ | One key (or multiple keys, seperated by ';') of the attribute that should be copied onto the other features.
text | _undefined_ | The text to show on the button text | _undefined_ | The text to show on the button
autoapply | _ autoapply | _undefined_ | A boolean indicating wether this tagging should be applied automatically if the relevant tags on this object are changed. A visual element indicating the multi_apply is still shown
undefined_ | A boolean indicating wether this tagging should be applied automatically if the relevant tags on this object are changed. A visual element indicating the multi_apply is still shown overwrite | _undefined_ | If set to 'true', the tags on the other objects will always be overwritten. The default behaviour will be to only change the tags on other objects if they are either undefined or had the same value before the change
overwrite | _
undefined_ | If set to 'true', the tags on the other objects will always be overwritten. The default behaviour will be to only change the tags on other objects if they are either undefined or had the same value before the change
#### Example usage #### Example usage
{multi_apply(_features_with_the_same_name_within_100m, name:etymology:wikidata;name:etymology, Apply etymology {multi_apply(_features_with_the_same_name_within_100m, name:etymology:wikidata;name:etymology, Apply etymology information on all nearby objects with the same name)}
information on all nearby objects with the same name)}
### tag_apply ### tag_apply
Shows a big button; clicking this button will apply certain tags onto the feature. Shows a big button; clicking this button will apply certain tags onto the feature.
The first argument takes a specification of which tags to add. These can either be a tag to add, such The first argument takes a specification of which tags to add.
as `amenity=fast_food` or can use a substitution, e.g. `addr:housenumber=$number`. This new point will then have the These can either be a tag to add, such as `amenity=fast_food` or can use a substitution, e.g. `addr:housenumber=$number`.
tags `amenity=fast_food` and `addr:housenumber` with the value that was saved in `number` in the original feature. This new point will then have the tags `amenity=fast_food` and `addr:housenumber` with the value that was saved in `number` in the original feature.
If a value to substitute is undefined, empty string will be used instead. If a value to substitute is undefined, empty string will be used instead.
This supports multiple values, e.g. `ref=$source:geometry:type/$source:geometry:ref` This supports multiple values, e.g. `ref=$source:geometry:type/$source:geometry:ref`
Remark that the syntax is slightly different then expected; it uses '$' to note a value to copy, followed by a name ( Remark that the syntax is slightly different then expected; it uses '$' to note a value to copy, followed by a name (matched with `[a-zA-Z0-9_:]*`). Sadly, delimiting with `{}` as these already mark the boundaries of the special rendering...
matched with `[a-zA-Z0-9_:]*`). Sadly, delimiting with `{}` as these already mark the boundaries of the special
rendering... Note that these values can be prepare with javascript in the theme by using a [calculatedTag](calculatedTags.md#calculating-tags-with-javascript)
Note that these values can be prepare with javascript in the theme by using
a [calculatedTag](calculatedTags.md#calculating-tags-with-javascript)
name | default | description name | default | description
------ | --------- | ------------- ------ | --------- | -------------
tags_to_apply | _undefined_ | A specification of the tags to apply tags_to_apply | _undefined_ | A specification of the tags to apply
message | _undefined_ | The text to show to the contributor message | _undefined_ | The text to show to the contributor
image | _undefined_ | An image to show to the contributor on the button image | _undefined_ | An image to show to the contributor on the button
id_of_object_to_apply_this_one | _undefined_ | If specified, applies the the tags onto _ id_of_object_to_apply_this_one | _undefined_ | If specified, applies the the tags onto _another_ object. The id will be read from properties[id_of_object_to_apply_this_one] of the selected object. The tags are still calculated based on the tags of the _selected_ element
another_ object. The id will be read from properties[id_of_object_to_apply_this_one] of the selected object. The tags are still calculated based on the tags of the _
selected_ element
#### Example usage #### Example usage
`{tag_apply(survey_date:=$_now:date, Surveyed today!)}` Generated from UI/SpecialVisualisations.ts `{tag_apply(survey_date:=$_now:date, Surveyed today!)}` Generated from UI/SpecialVisualisations.ts

View file

@ -543,129 +543,129 @@
}, },
{ {
"key": "planned:amenity", "key": "planned:amenity",
"description": "Layer 'Charging stations' shows planned:amenity=&construction:amenity=&disused:amenity=&operational_status=&amenity=charging_station with a fixed text, namely 'This charging station works' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Charging stations') Picking this answer will delete the key planned:amenity.", "description": "Layer 'Charging stations' shows planned:amenity=&construction:amenity=&disused:amenity=&operational_status=broken&amenity=charging_station with a fixed text, namely 'This charging station works' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Charging stations') Picking this answer will delete the key planned:amenity.",
"value": "" "value": ""
}, },
{ {
"key": "construction:amenity", "key": "construction:amenity",
"description": "Layer 'Charging stations' shows planned:amenity=&construction:amenity=&disused:amenity=&operational_status=&amenity=charging_station with a fixed text, namely 'This charging station works' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Charging stations') Picking this answer will delete the key construction:amenity.", "description": "Layer 'Charging stations' shows planned:amenity=&construction:amenity=&disused:amenity=&operational_status=broken&amenity=charging_station with a fixed text, namely 'This charging station works' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Charging stations') Picking this answer will delete the key construction:amenity.",
"value": "" "value": ""
}, },
{ {
"key": "disused:amenity", "key": "disused:amenity",
"description": "Layer 'Charging stations' shows planned:amenity=&construction:amenity=&disused:amenity=&operational_status=&amenity=charging_station with a fixed text, namely 'This charging station works' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Charging stations') Picking this answer will delete the key disused:amenity.", "description": "Layer 'Charging stations' shows planned:amenity=&construction:amenity=&disused:amenity=&operational_status=broken&amenity=charging_station with a fixed text, namely 'This charging station works' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Charging stations') Picking this answer will delete the key disused:amenity.",
"value": "" "value": ""
}, },
{ {
"key": "operational_status", "key": "operational_status",
"description": "Layer 'Charging stations' shows planned:amenity=&construction:amenity=&disused:amenity=&operational_status=&amenity=charging_station with a fixed text, namely 'This charging station works' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Charging stations') Picking this answer will delete the key operational_status.", "description": "Layer 'Charging stations' shows planned:amenity=&construction:amenity=&disused:amenity=&operational_status=broken&amenity=charging_station with a fixed text, namely 'This charging station works' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Charging stations')",
"value": ""
},
{
"key": "amenity",
"description": "Layer 'Charging stations' shows planned:amenity=&construction:amenity=&disused:amenity=&operational_status=&amenity=charging_station with a fixed text, namely 'This charging station works' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Charging stations')",
"value": "charging_station"
},
{
"key": "planned:amenity",
"description": "Layer 'Charging stations' shows planned:amenity=&construction:amenity=&disused:amenity=&operational_status=broken&amenity=charging_station with a fixed text, namely 'This charging station is broken' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Charging stations') Picking this answer will delete the key planned:amenity.",
"value": ""
},
{
"key": "construction:amenity",
"description": "Layer 'Charging stations' shows planned:amenity=&construction:amenity=&disused:amenity=&operational_status=broken&amenity=charging_station with a fixed text, namely 'This charging station is broken' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Charging stations') Picking this answer will delete the key construction:amenity.",
"value": ""
},
{
"key": "disused:amenity",
"description": "Layer 'Charging stations' shows planned:amenity=&construction:amenity=&disused:amenity=&operational_status=broken&amenity=charging_station with a fixed text, namely 'This charging station is broken' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Charging stations') Picking this answer will delete the key disused:amenity.",
"value": ""
},
{
"key": "operational_status",
"description": "Layer 'Charging stations' shows planned:amenity=&construction:amenity=&disused:amenity=&operational_status=broken&amenity=charging_station with a fixed text, namely 'This charging station is broken' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Charging stations')",
"value": "broken" "value": "broken"
}, },
{ {
"key": "amenity", "key": "amenity",
"description": "Layer 'Charging stations' shows planned:amenity=&construction:amenity=&disused:amenity=&operational_status=broken&amenity=charging_station with a fixed text, namely 'This charging station is broken' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Charging stations')", "description": "Layer 'Charging stations' shows planned:amenity=&construction:amenity=&disused:amenity=&operational_status=broken&amenity=charging_station with a fixed text, namely 'This charging station works' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Charging stations')",
"value": "charging_station" "value": "charging_station"
}, },
{ {
"key": "planned:amenity", "key": "planned:amenity",
"description": "Layer 'Charging stations' shows planned:amenity=charging_station&construction:amenity=&disused:amenity=&operational_status=&amenity= with a fixed text, namely 'A charging station is planned here' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Charging stations')", "description": "Layer 'Charging stations' shows planned:amenity=charging_station&construction:amenity=&disused:amenity=&operational_status=&amenity= with a fixed text, namely 'This charging station is broken' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Charging stations')",
"value": "charging_station" "value": "charging_station"
}, },
{ {
"key": "construction:amenity", "key": "construction:amenity",
"description": "Layer 'Charging stations' shows planned:amenity=charging_station&construction:amenity=&disused:amenity=&operational_status=&amenity= with a fixed text, namely 'A charging station is planned here' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Charging stations') Picking this answer will delete the key construction:amenity.", "description": "Layer 'Charging stations' shows planned:amenity=charging_station&construction:amenity=&disused:amenity=&operational_status=&amenity= with a fixed text, namely 'This charging station is broken' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Charging stations') Picking this answer will delete the key construction:amenity.",
"value": "" "value": ""
}, },
{ {
"key": "disused:amenity", "key": "disused:amenity",
"description": "Layer 'Charging stations' shows planned:amenity=charging_station&construction:amenity=&disused:amenity=&operational_status=&amenity= with a fixed text, namely 'A charging station is planned here' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Charging stations') Picking this answer will delete the key disused:amenity.", "description": "Layer 'Charging stations' shows planned:amenity=charging_station&construction:amenity=&disused:amenity=&operational_status=&amenity= with a fixed text, namely 'This charging station is broken' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Charging stations') Picking this answer will delete the key disused:amenity.",
"value": "" "value": ""
}, },
{ {
"key": "operational_status", "key": "operational_status",
"description": "Layer 'Charging stations' shows planned:amenity=charging_station&construction:amenity=&disused:amenity=&operational_status=&amenity= with a fixed text, namely 'A charging station is planned here' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Charging stations') Picking this answer will delete the key operational_status.", "description": "Layer 'Charging stations' shows planned:amenity=charging_station&construction:amenity=&disused:amenity=&operational_status=&amenity= with a fixed text, namely 'This charging station is broken' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Charging stations') Picking this answer will delete the key operational_status.",
"value": "" "value": ""
}, },
{ {
"key": "amenity", "key": "amenity",
"description": "Layer 'Charging stations' shows planned:amenity=charging_station&construction:amenity=&disused:amenity=&operational_status=&amenity= with a fixed text, namely 'A charging station is planned here' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Charging stations') Picking this answer will delete the key amenity.", "description": "Layer 'Charging stations' shows planned:amenity=charging_station&construction:amenity=&disused:amenity=&operational_status=&amenity= with a fixed text, namely 'This charging station is broken' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Charging stations') Picking this answer will delete the key amenity.",
"value": "" "value": ""
}, },
{ {
"key": "planned:amenity", "key": "planned:amenity",
"description": "Layer 'Charging stations' shows planned:amenity=&construction:amenity=charging_station&disused:amenity=&operational_status=&amenity= with a fixed text, namely 'A charging station is constructed here' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Charging stations') Picking this answer will delete the key planned:amenity.", "description": "Layer 'Charging stations' shows planned:amenity=&construction:amenity=charging_station&disused:amenity=&operational_status=&amenity= with a fixed text, namely 'A charging station is planned here' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Charging stations') Picking this answer will delete the key planned:amenity.",
"value": "" "value": ""
}, },
{ {
"key": "construction:amenity", "key": "construction:amenity",
"description": "Layer 'Charging stations' shows planned:amenity=&construction:amenity=charging_station&disused:amenity=&operational_status=&amenity= with a fixed text, namely 'A charging station is constructed here' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Charging stations')", "description": "Layer 'Charging stations' shows planned:amenity=&construction:amenity=charging_station&disused:amenity=&operational_status=&amenity= with a fixed text, namely 'A charging station is planned here' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Charging stations')",
"value": "charging_station" "value": "charging_station"
}, },
{ {
"key": "disused:amenity", "key": "disused:amenity",
"description": "Layer 'Charging stations' shows planned:amenity=&construction:amenity=charging_station&disused:amenity=&operational_status=&amenity= with a fixed text, namely 'A charging station is constructed here' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Charging stations') Picking this answer will delete the key disused:amenity.", "description": "Layer 'Charging stations' shows planned:amenity=&construction:amenity=charging_station&disused:amenity=&operational_status=&amenity= with a fixed text, namely 'A charging station is planned here' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Charging stations') Picking this answer will delete the key disused:amenity.",
"value": "" "value": ""
}, },
{ {
"key": "operational_status", "key": "operational_status",
"description": "Layer 'Charging stations' shows planned:amenity=&construction:amenity=charging_station&disused:amenity=&operational_status=&amenity= with a fixed text, namely 'A charging station is constructed here' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Charging stations') Picking this answer will delete the key operational_status.", "description": "Layer 'Charging stations' shows planned:amenity=&construction:amenity=charging_station&disused:amenity=&operational_status=&amenity= with a fixed text, namely 'A charging station is planned here' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Charging stations') Picking this answer will delete the key operational_status.",
"value": "" "value": ""
}, },
{ {
"key": "amenity", "key": "amenity",
"description": "Layer 'Charging stations' shows planned:amenity=&construction:amenity=charging_station&disused:amenity=&operational_status=&amenity= with a fixed text, namely 'A charging station is constructed here' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Charging stations') Picking this answer will delete the key amenity.", "description": "Layer 'Charging stations' shows planned:amenity=&construction:amenity=charging_station&disused:amenity=&operational_status=&amenity= with a fixed text, namely 'A charging station is planned here' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Charging stations') Picking this answer will delete the key amenity.",
"value": "" "value": ""
}, },
{ {
"key": "planned:amenity", "key": "planned:amenity",
"description": "Layer 'Charging stations' shows planned:amenity=&construction:amenity=&disused:amenity=charging_station&operational_status=&amenity= with a fixed text, namely 'This charging station has beed permanently disabled and is not in use anymore but is still visible' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Charging stations') Picking this answer will delete the key planned:amenity.", "description": "Layer 'Charging stations' shows planned:amenity=&construction:amenity=&disused:amenity=charging_station&operational_status=&amenity= with a fixed text, namely 'A charging station is constructed here' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Charging stations') Picking this answer will delete the key planned:amenity.",
"value": "" "value": ""
}, },
{ {
"key": "construction:amenity", "key": "construction:amenity",
"description": "Layer 'Charging stations' shows planned:amenity=&construction:amenity=&disused:amenity=charging_station&operational_status=&amenity= with a fixed text, namely 'This charging station has beed permanently disabled and is not in use anymore but is still visible' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Charging stations') Picking this answer will delete the key construction:amenity.", "description": "Layer 'Charging stations' shows planned:amenity=&construction:amenity=&disused:amenity=charging_station&operational_status=&amenity= with a fixed text, namely 'A charging station is constructed here' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Charging stations') Picking this answer will delete the key construction:amenity.",
"value": "" "value": ""
}, },
{ {
"key": "disused:amenity", "key": "disused:amenity",
"description": "Layer 'Charging stations' shows planned:amenity=&construction:amenity=&disused:amenity=charging_station&operational_status=&amenity= with a fixed text, namely 'This charging station has beed permanently disabled and is not in use anymore but is still visible' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Charging stations')", "description": "Layer 'Charging stations' shows planned:amenity=&construction:amenity=&disused:amenity=charging_station&operational_status=&amenity= with a fixed text, namely 'A charging station is constructed here' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Charging stations')",
"value": "charging_station" "value": "charging_station"
}, },
{ {
"key": "operational_status", "key": "operational_status",
"description": "Layer 'Charging stations' shows planned:amenity=&construction:amenity=&disused:amenity=charging_station&operational_status=&amenity= with a fixed text, namely 'This charging station has beed permanently disabled and is not in use anymore but is still visible' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Charging stations') Picking this answer will delete the key operational_status.", "description": "Layer 'Charging stations' shows planned:amenity=&construction:amenity=&disused:amenity=charging_station&operational_status=&amenity= with a fixed text, namely 'A charging station is constructed here' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Charging stations') Picking this answer will delete the key operational_status.",
"value": "" "value": ""
}, },
{ {
"key": "amenity", "key": "amenity",
"description": "Layer 'Charging stations' shows planned:amenity=&construction:amenity=&disused:amenity=charging_station&operational_status=&amenity= with a fixed text, namely 'This charging station has beed permanently disabled and is not in use anymore but is still visible' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Charging stations') Picking this answer will delete the key amenity.", "description": "Layer 'Charging stations' shows planned:amenity=&construction:amenity=&disused:amenity=charging_station&operational_status=&amenity= with a fixed text, namely 'A charging station is constructed here' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Charging stations') Picking this answer will delete the key amenity.",
"value": "" "value": ""
}, },
{
"key": "planned:amenity",
"description": "Layer 'Charging stations' shows planned:amenity=&construction:amenity=&disused:amenity=&operational_status=&amenity=charging_station with a fixed text, namely 'This charging station has beed permanently disabled and is not in use anymore but is still visible' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Charging stations') Picking this answer will delete the key planned:amenity.",
"value": ""
},
{
"key": "construction:amenity",
"description": "Layer 'Charging stations' shows planned:amenity=&construction:amenity=&disused:amenity=&operational_status=&amenity=charging_station with a fixed text, namely 'This charging station has beed permanently disabled and is not in use anymore but is still visible' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Charging stations') Picking this answer will delete the key construction:amenity.",
"value": ""
},
{
"key": "disused:amenity",
"description": "Layer 'Charging stations' shows planned:amenity=&construction:amenity=&disused:amenity=&operational_status=&amenity=charging_station with a fixed text, namely 'This charging station has beed permanently disabled and is not in use anymore but is still visible' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Charging stations') Picking this answer will delete the key disused:amenity.",
"value": ""
},
{
"key": "operational_status",
"description": "Layer 'Charging stations' shows planned:amenity=&construction:amenity=&disused:amenity=&operational_status=&amenity=charging_station with a fixed text, namely 'This charging station has beed permanently disabled and is not in use anymore but is still visible' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Charging stations') Picking this answer will delete the key operational_status.",
"value": ""
},
{
"key": "amenity",
"description": "Layer 'Charging stations' shows planned:amenity=&construction:amenity=&disused:amenity=&operational_status=&amenity=charging_station with a fixed text, namely 'This charging station has beed permanently disabled and is not in use anymore but is still visible' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Charging stations')",
"value": "charging_station"
},
{ {
"key": "parking:fee", "key": "parking:fee",
"description": "Layer 'Charging stations' shows parking:fee=no with a fixed text, namely 'No additional parking cost while charging' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Charging stations')", "description": "Layer 'Charging stations' shows parking:fee=no with a fixed text, namely 'No additional parking cost while charging' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Charging stations')",

View file

@ -600,7 +600,7 @@
}, },
{ {
"key": "cycle_barrier:type", "key": "cycle_barrier:type",
"description": "Layer 'Barriers' shows cycle_barrier:type=double with a fixed text, namely 'Double, two barriers behind each other <img src='./assets/themes/cycle_infra/Cycle_barrier_double.png' style='width:8em'>' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Bicycle infrastructure')", "description": "Layer 'Barriers' shows cycle_barrier:type=double with a fixed text, namely 'Double, two barriers behind each other <img src='./assets/themes/cycle_infra/Cycle_barrier_double.svg' style='width:8em'>' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Bicycle infrastructure')",
"value": "double" "value": "double"
}, },
{ {

View file

@ -966,12 +966,12 @@
}, },
{ {
"key": "location", "key": "location",
"description": "Layer 'Bike parking' shows location=underground with a fixed text, namely 'Underground parking' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Cyclofix - an open map for cyclists')", "description": "Layer 'Bike parking' shows location=underground with a fixed text, namely 'Surface level parking' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Cyclofix - an open map for cyclists')",
"value": "underground" "value": "underground"
}, },
{ {
"key": "location", "key": "location",
"description": "Layer 'Bike parking' shows location=surface with a fixed text, namely 'Surface level parking' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Cyclofix - an open map for cyclists')", "description": "Layer 'Bike parking' shows location=surface with a fixed text, namely 'Rooftop parking' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Cyclofix - an open map for cyclists')",
"value": "surface" "value": "surface"
}, },
{ {

View file

@ -76,16 +76,6 @@
"description": "Layer 'Restaurants and fast food' shows payment:cards=yes with a fixed text, namely 'Payment cards are accepted here' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Restaurants and fast food')", "description": "Layer 'Restaurants and fast food' shows payment:cards=yes with a fixed text, namely 'Payment cards are accepted here' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Restaurants and fast food')",
"value": "yes" "value": "yes"
}, },
{
"key": "payment:app",
"description": "Layer 'Restaurants and fast food' shows payment:app=yes with a fixed text, namely 'Payment is done using a dedicated app' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Restaurants and fast food')",
"value": "yes"
},
{
"key": "payment:membership_card",
"description": "Layer 'Restaurants and fast food' shows payment:membership_card=yes with a fixed text, namely 'Payment is done using a membership card' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Restaurants and fast food')",
"value": "yes"
},
{ {
"key": "wheelchair", "key": "wheelchair",
"description": "Layer 'Restaurants and fast food' shows wheelchair=designated with a fixed text, namely 'This place is specially adapted for wheelchair users' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Restaurants and fast food')", "description": "Layer 'Restaurants and fast food' shows wheelchair=designated with a fixed text, namely 'This place is specially adapted for wheelchair users' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Restaurants and fast food')",

View file

@ -81,16 +81,6 @@
"description": "Layer 'Fries shop' shows payment:cards=yes with a fixed text, namely 'Payment cards are accepted here' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Friturenkaart')", "description": "Layer 'Fries shop' shows payment:cards=yes with a fixed text, namely 'Payment cards are accepted here' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Friturenkaart')",
"value": "yes" "value": "yes"
}, },
{
"key": "payment:app",
"description": "Layer 'Fries shop' shows payment:app=yes with a fixed text, namely 'Payment is done using a dedicated app' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Friturenkaart')",
"value": "yes"
},
{
"key": "payment:membership_card",
"description": "Layer 'Fries shop' shows payment:membership_card=yes with a fixed text, namely 'Payment is done using a membership card' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Friturenkaart')",
"value": "yes"
},
{ {
"key": "wheelchair", "key": "wheelchair",
"description": "Layer 'Fries shop' shows wheelchair=designated with a fixed text, namely 'This place is specially adapted for wheelchair users' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Friturenkaart')", "description": "Layer 'Fries shop' shows wheelchair=designated with a fixed text, namely 'This place is specially adapted for wheelchair users' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Friturenkaart')",
@ -406,16 +396,6 @@
"description": "Layer 'Restaurants and fast food' shows payment:cards=yes with a fixed text, namely 'Payment cards are accepted here' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Friturenkaart')", "description": "Layer 'Restaurants and fast food' shows payment:cards=yes with a fixed text, namely 'Payment cards are accepted here' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Friturenkaart')",
"value": "yes" "value": "yes"
}, },
{
"key": "payment:app",
"description": "Layer 'Restaurants and fast food' shows payment:app=yes with a fixed text, namely 'Payment is done using a dedicated app' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Friturenkaart')",
"value": "yes"
},
{
"key": "payment:membership_card",
"description": "Layer 'Restaurants and fast food' shows payment:membership_card=yes with a fixed text, namely 'Payment is done using a membership card' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Friturenkaart')",
"value": "yes"
},
{ {
"key": "wheelchair", "key": "wheelchair",
"description": "Layer 'Restaurants and fast food' shows wheelchair=designated with a fixed text, namely 'This place is specially adapted for wheelchair users' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Friturenkaart')", "description": "Layer 'Restaurants and fast food' shows wheelchair=designated with a fixed text, namely 'This place is specially adapted for wheelchair users' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Friturenkaart')",

View file

@ -76,16 +76,6 @@
"description": "Layer 'Observation towers' shows payment:cards=yes with a fixed text, namely 'Payment cards are accepted here' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Observation towers')", "description": "Layer 'Observation towers' shows payment:cards=yes with a fixed text, namely 'Payment cards are accepted here' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Observation towers')",
"value": "yes" "value": "yes"
}, },
{
"key": "payment:app",
"description": "Layer 'Observation towers' shows payment:app=yes with a fixed text, namely 'Payment is done using a dedicated app' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Observation towers')",
"value": "yes"
},
{
"key": "payment:membership_card",
"description": "Layer 'Observation towers' shows payment:membership_card=yes with a fixed text, namely 'Payment is done using a membership card' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Observation towers')",
"value": "yes"
},
{ {
"key": "wheelchair", "key": "wheelchair",
"description": "Layer 'Observation towers' shows wheelchair=designated with a fixed text, namely 'This place is specially adapted for wheelchair users' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Observation towers')", "description": "Layer 'Observation towers' shows wheelchair=designated with a fixed text, namely 'This place is specially adapted for wheelchair users' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Observation towers')",

View file

@ -60,6 +60,35 @@
"description": "Layer 'Toilets' shows access=public with a fixed text, namely 'Public access' (in the MapComplete.osm.be theme 'Open Toilet Map')", "description": "Layer 'Toilets' shows access=public with a fixed text, namely 'Public access' (in the MapComplete.osm.be theme 'Open Toilet Map')",
"value": "public" "value": "public"
}, },
{
"key": "access",
"description": "Layer 'Toilets' shows and asks freeform values for key 'access' (in the MapComplete.osm.be theme 'Open Toilet Map')"
},
{
"key": "access",
"description": "Layer 'Toilets' shows access=yes with a fixed text, namely 'Public access' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Open Toilet Map')",
"value": "yes"
},
{
"key": "access",
"description": "Layer 'Toilets' shows access=customers with a fixed text, namely 'Only access to customers' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Open Toilet Map')",
"value": "customers"
},
{
"key": "access",
"description": "Layer 'Toilets' 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 Toilet Map')",
"value": "no"
},
{
"key": "access",
"description": "Layer 'Toilets' shows access=key with a fixed text, namely 'Accessible, but one has to ask a key to enter' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Open Toilet Map')",
"value": "key"
},
{
"key": "access",
"description": "Layer 'Toilets' shows access=public with a fixed text, namely 'Public access' (in the MapComplete.osm.be theme 'Open Toilet Map')",
"value": "public"
},
{ {
"key": "fee", "key": "fee",
"description": "Layer 'Toilets' shows fee=yes with a fixed text, namely 'These are paid toilets' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Open Toilet Map')", "description": "Layer 'Toilets' shows fee=yes with a fixed text, namely 'These are paid toilets' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Open Toilet Map')",
@ -150,7 +179,7 @@
}, },
{ {
"key": "toilets:paper_supplied", "key": "toilets:paper_supplied",
"description": "Layer 'Toilets' shows toilets:paper_supplied=yes with a fixed text, namely 'Toilet paper is equipped with toilet paper' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Open Toilet Map')", "description": "Layer 'Toilets' shows toilets:paper_supplied=yes with a fixed text, namely 'This toilet is equipped with toilet paper' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Open Toilet Map')",
"value": "yes" "value": "yes"
}, },
{ {

View file

@ -1,3 +1,4 @@
URL-parameters and URL-hash URL-parameters and URL-hash
============================ ============================
@ -8,8 +9,8 @@ What is a URL parameter?
URL-parameters are extra parts of the URL used to set the state. URL-parameters are extra parts of the URL used to set the state.
For example, if the url is `https://mapcomplete.osm.be/cyclofix?lat=51.0&lon=4.3&z=5&test=true#node/1234`, the For example, if the url is `https://mapcomplete.osm.be/cyclofix?lat=51.0&lon=4.3&z=5&test=true#node/1234`,
URL-parameters are stated in the part between the `?` and the `#`. There are multiple, all separated by `&`, namely: the URL-parameters are stated in the part between the `?` and the `#`. There are multiple, all separated by `&`, namely:
- The url-parameter `lat` is `51.0` in this instance - The url-parameter `lat` is `51.0` in this instance
- The url-parameter `lon` is `4.3` in this instance - The url-parameter `lon` is `4.3` in this instance
@ -19,145 +20,139 @@ URL-parameters are stated in the part between the `?` and the `#`. There are mul
Finally, the URL-hash is the part after the `#`. It is `node/1234` in this case. Finally, the URL-hash is the part after the `#`. It is `node/1234` in this case.
fs-userbadge fs-userbadge
-------------- --------------
Disables/Enables the user information pill (userbadge) at the top left. Disabling this disables logging in and thus Disables/Enables the user information pill (userbadge) at the top left. Disabling this disables logging in and thus disables editing all together, effectively putting MapComplete into read-only mode. The default value is _true_
disables editing all together, effectively putting MapComplete into read-only mode. The default value is _true_
fs-search fs-search
----------- -----------
Disables/Enables the search bar The default value is _true_ Disables/Enables the search bar The default value is _true_
fs-background fs-background
--------------- ---------------
Disables/Enables the background layer control The default value is _true_ Disables/Enables the background layer control The default value is _true_
fs-filter fs-filter
----------- -----------
Disables/Enables the filter The default value is _true_ Disables/Enables the filter The default value is _true_
fs-add-new fs-add-new
------------ ------------
Disables/Enables the 'add new feature'-popup. (A theme without presets might not have it in the first place) The default Disables/Enables the 'add new feature'-popup. (A theme without presets might not have it in the first place) The default value is _true_
value is _true_
fs-welcome-message fs-welcome-message
-------------------- --------------------
Disables/enables the help menu or welcome message The default value is _true_ Disables/enables the help menu or welcome message The default value is _true_
fs-iframe-popout fs-iframe-popout
------------------ ------------------
Disables/Enables the iframe-popout button. If in iframe mode and the welcome message is hidden, a popout button to the Disables/Enables the iframe-popout button. If in iframe mode and the welcome message is hidden, a popout button to the full mapcomplete instance is shown instead (unless disabled with this switch) The default value is _true_
full mapcomplete instance is shown instead (unless disabled with this switch) The default value is _true_
fs-more-quests fs-more-quests
---------------- ----------------
Disables/Enables the 'More Quests'-tab in the welcome message The default value is _true_ Disables/Enables the 'More Quests'-tab in the welcome message The default value is _true_
fs-share-screen fs-share-screen
----------------- -----------------
Disables/Enables the 'Share-screen'-tab in the welcome message The default value is _true_ Disables/Enables the 'Share-screen'-tab in the welcome message The default value is _true_
fs-geolocation fs-geolocation
---------------- ----------------
Disables/Enables the geolocation button The default value is _true_ Disables/Enables the geolocation button The default value is _true_
fs-all-questions fs-all-questions
------------------ ------------------
Always show all questions The default value is _false_ Always show all questions The default value is _false_
fs-export fs-export
----------- -----------
Enable the export as GeoJSON and CSV button The default value is _false_ Enable the export as GeoJSON and CSV button The default value is _false_
fs-pdf fs-pdf
-------- --------
Enable the PDF download button The default value is _false_ Enable the PDF download button The default value is _false_
backend backend
--------- ---------
The OSM backend to use - can be used to redirect mapcomplete to the testing backend when using 'osm-test' The default The OSM backend to use - can be used to redirect mapcomplete to the testing backend when using 'osm-test' The default value is _osm_
value is _osm_
test test
------ ------
If true, 'dryrun' mode is activated. The app will behave as normal, except that changes to OSM will be printed onto the If true, 'dryrun' mode is activated. The app will behave as normal, except that changes to OSM will be printed onto the console instead of actually uploaded to osm.org The default value is _false_
console instead of actually uploaded to osm.org The default value is _false_
debug debug
------- -------
If true, shows some extra debugging help such as all the available tags on every object The default value is _false_ If true, shows some extra debugging help such as all the available tags on every object The default value is _false_
fake-user fake-user
----------- -----------
If true, 'dryrun' mode is activated and a fake user account is loaded The default value is _false_ If true, 'dryrun' mode is activated and a fake user account is loaded The default value is _false_
overpassUrl overpassUrl
------------- -------------
Point mapcomplete to a different overpass-instance. Example: https://overpass-api.de/api/interpreter The default value Point mapcomplete to a different overpass-instance. Example: https://overpass-api.de/api/interpreter The default value is _https://overpass-api.de/api/interpreter,https://overpass.kumi.systems/api/interpreter,https://overpass.openstreetmap.ru/cgi/interpreter_
is _https://overpass-api.de/api/interpreter,https://overpass.kumi.systems/api/interpreter,https://overpass.openstreetmap.ru/cgi/interpreter_
overpassTimeout overpassTimeout
----------------- -----------------
Set a different timeout (in seconds) for queries in overpass The default value is _30_ Set a different timeout (in seconds) for queries in overpass The default value is _30_
overpassMaxZoom overpassMaxZoom
----------------- -----------------
point to switch between OSM-api and overpass The default value is _17_ point to switch between OSM-api and overpass The default value is _17_
osmApiTileSize osmApiTileSize
---------------- ----------------
Tilesize when the OSM-API is used to fetch data within a BBOX The default value is _18_ Tilesize when the OSM-API is used to fetch data within a BBOX The default value is _18_
background background
------------ ------------
The id of the background layer to start with The default value is _osm_ The id of the background layer to start with The default value is _osm_
layer-<layer-id> layer-<layer-id>
------------------ ------------------
Wether or not the layer with id <layer-id> is shown The default value is _true_ Generated from QueryParameters Wether or not the layer with id <layer-id> is shown The default value is _true_ Generated from QueryParameters