mapcomplete/Docs/BuiltinLayers.md

41 KiB

Special and other useful layers

Table of contents

  1. Special and other useful layers
  2. Priviliged layers
  3. selected_element
  1. gps_location
  1. gps_location_history
  1. home_location
  1. gps_track
  1. range
  1. last_click
  1. conflation
  1. split_point
  1. split_road
  1. current_view
  1. import_candidate
  1. usersettings
  1. Normal layers

MapComplete has a few data layers available in the theme which have special properties through builtin-hooks. Furthermore, there are some normal layers (which are built from normal Theme-config files) but are so general that they get a mention here.

Priviliged layers

selected_element

Highlights the currently selected element. Override this layer to have different colors

  • This layer is shown at zoomlevel 0 and higher
  • This layer is included automatically in every theme. This layer might contain no points
  • Elements don't have a title set and cannot be toggled nor will they show up in the dashboard. If you import this layer in your theme, override title to make this toggleable.
  • Not visible in the layer selection by default. If you want to make this layer toggable, override name

This is a special layer - data is not sourced from OpenStreetMap

Supported attributes

gps_location

Meta layer showing the current location of the user. Add this to your theme and override the icon to change the appearance of the current location. The object will always have id=gps and will have all the properties included in the Coordinates-object (except latitude and longitude) returned by the browser, such as speed, altitude, heading, ....

  • This layer is shown at zoomlevel 0 and higher
  • This layer is included automatically in every theme. This layer might contain no points
  • Elements don't have a title set and cannot be toggled nor will they show up in the dashboard. If you import this layer in your theme, override title to make this toggleable.
  • Not visible in the layer selection by default. If you want to make this layer toggable, override name

This is a special layer - data is not sourced from OpenStreetMap

Supported attributes

gps_location_history

Meta layer which contains the previous locations of the user as single points. This is mainly for technical reasons, e.g. to keep match the distance to the modified object

  • This layer is shown at zoomlevel 1 and higher
  • This layer is included automatically in every theme. This layer might contain no points
  • This layer is not visible by default and must be enabled in the filter by the user.
  • Elements don't have a title set and cannot be toggled nor will they show up in the dashboard. If you import this layer in your theme, override title to make this toggleable.
  • This layer is not visible by default and the visibility cannot be toggled, effectively resulting in a fully hidden layer. This can be useful, e.g. to calculate some metatags. If you want to render this layer (e.g. for debugging), enable it by setting the URL-parameter layer-=true
  • Not visible in the layer selection by default. If you want to make this layer toggable, override name

This is a special layer - data is not sourced from OpenStreetMap

Supported attributes

home_location

Meta layer showing the home location of the user. The home location can be set in the profile settings of OpenStreetMap.

  • This layer is shown at zoomlevel 0 and higher
  • This layer is included automatically in every theme. This layer might contain no points
  • Elements don't have a title set and cannot be toggled nor will they show up in the dashboard. If you import this layer in your theme, override title to make this toggleable.
  • Not visible in the layer selection by default. If you want to make this layer toggable, override name

This is a special layer - data is not sourced from OpenStreetMap

Supported attributes

gps_track

Meta layer showing the previous locations of the user as single line with controls, e.g. to erase, upload or download this track. Add this to your theme and override the maprendering to change the appearance of the travelled track.

  • This layer is shown at zoomlevel 0 and higher
  • This layer is included automatically in every theme. This layer might contain no points
  • This layer is not visible by default and must be enabled in the filter by the user.
  • Not rendered on the map by default. If you want to rendering this on the map, override mapRenderings

This is a special layer - data is not sourced from OpenStreetMap

Supported attributes

Privacy notice

This tagrendering has no question and is thus read-only

export_as_gpx

Shows a button to export this feature as GPX. Especially useful for route relations

This tagrendering has no question and is thus read-only

export_as_geojson

Shows a button to export this feature as geojson. Especially useful for debugging or using this in other programs

This tagrendering has no question and is thus read-only

upload_to_osm

This tagrendering has no question and is thus read-only

minimap

Shows a small map with the feature. Added by default to every popup

This tagrendering has no question and is thus read-only

delete

This tagrendering has no question and is thus read-only

range

Meta-layer, simply showing a bbox in red

  • This layer is shown at zoomlevel 0 and higher
  • This layer is included automatically in every theme. This layer might contain no points
  • This layer is not visible by default and must be enabled in the filter by the user.
  • Elements don't have a title set and cannot be toggled nor will they show up in the dashboard. If you import this layer in your theme, override title to make this toggleable.
  • This layer is not visible by default and the visibility cannot be toggled, effectively resulting in a fully hidden layer. This can be useful, e.g. to calculate some metatags. If you want to render this layer (e.g. for debugging), enable it by setting the URL-parameter layer-=true
  • Not visible in the layer selection by default. If you want to make this layer toggable, override name
  • Not rendered on the map by default. If you want to rendering this on the map, override mapRenderings

This is a special layer - data is not sourced from OpenStreetMap

Supported attributes

last_click

This layer defines how to render the 'last click'-location. By default, it will show a marker with the possibility to add a new point (if there are some presets) and/or to add a new note (if the 'note' layer attribute is set). If none are possible, this layer won't show up

  • This layer is shown at zoomlevel 0 and higher
  • This layer is included automatically in every theme. This layer might contain no points
  • Not visible in the layer selection by default. If you want to make this layer toggable, override name

This is a special layer - data is not sourced from OpenStreetMap

Supported attributes

add_new

This tagrendering has no question and is thus read-only

This tagrendering is only visible in the popup if the following condition is met: <a href='https://wiki.openstreetmap.org/wiki/Key:has_presets' target='_blank'>has_presets</a>=<a href='https://wiki.openstreetmap.org/wiki/Tag:has_presets%3Dyes' target='_blank'>yes</a>

add_note

This tagrendering has no question and is thus read-only

This tagrendering is only visible in the popup if the following condition is met: <a href='https://wiki.openstreetmap.org/wiki/Key:has_note_layer' target='_blank'>has_note_layer</a>=<a href='https://wiki.openstreetmap.org/wiki/Tag:has_note_layer%3Dyes' target='_blank'>yes</a>

Filters

id question osmTags
action.0 only_if_action_is_possible has_note_layer=yes | has_presets=yes

conflation

If the import-button moves OSM points, the imported way points or conflates, a preview is shown. This layer defines how this preview is rendered. This layer cannot be included in a theme.

  • This layer is shown at zoomlevel 1 and higher
  • This layer can not be included in a theme. It is solely used by special renderings showing a minimap with custom data.

This is a special layer - data is not sourced from OpenStreetMap

Supported attributes

split_point

Layer rendering the little scissors for the minimap in the 'splitRoadWizard'

  • This layer is shown at zoomlevel 1 and higher
  • This layer can not be included in a theme. It is solely used by special renderings showing a minimap with custom data.

This is a special layer - data is not sourced from OpenStreetMap

Supported attributes

split_road

Layer rendering the way to split in the 'splitRoadWizard'. This one is used instead of the variable rendering by the themes themselves, as they might not always be very visible

  • This layer is shown at zoomlevel 1 and higher
  • This layer can not be included in a theme. It is solely used by special renderings showing a minimap with custom data.

This is a special layer - data is not sourced from OpenStreetMap

Supported attributes

current_view

A meta-layer which contains one single feature, namely the bounding box of the current map view. This can be used to trigger special actions. If a popup is defined for this layer, this popup will be accessible via an extra button on screen.

The icon on the button is the default icon of the layer, but can be customized by detecting 'button=yes'.

  • This layer is shown at zoomlevel 0 and higher
  • This layer can not be included in a theme. It is solely used by special renderings showing a minimap with custom data.

Themes using this layer

This is a special layer - data is not sourced from OpenStreetMap

Supported attributes

import_candidate

Layer used as template in the importHelper

  • This layer is shown at zoomlevel 0 and higher
  • This layer can not be included in a theme. It is solely used by special renderings showing a minimap with custom data.

This is a special layer - data is not sourced from OpenStreetMap

Supported attributes

all_tags

This tagrendering has no question and is thus read-only

usersettings

A special layer which is not meant to be shown on a map, but which is used to set user settings

  • This layer is shown at zoomlevel 0 and higher
  • This layer can not be included in a theme. It is solely used by special renderings showing a minimap with custom data.

This is a special layer - data is not sourced from OpenStreetMap

Supported attributes

Warning:

this quick overview is incomplete

attribute type values which are supported by this layer
__url_parameter_initialized:language Multiple choice yes
mapcomplete-preferred-background-layer Multiple choice osm photo map
mapcomplete-pictures-license Multiple choice CC0 [CC-BY 4.0](https://wiki.openstreetmap.org/wiki/Tag:mapcomplete-pictures-license%3DCC-BY 4.0) [CC-BY-SA 4.0](https://wiki.openstreetmap.org/wiki/Tag:mapcomplete-pictures-license%3DCC-BY-SA 4.0)
mapcomplete-show_tags Multiple choice no yes full
mapcomplete-show-all-questions Multiple choice true false
mapcomplete-show_crosshair Multiple choice yes no
mapcomplete-fixate-north Multiple choice yes
mapcomplete-translation-mode Multiple choice false true mobile
mapcomplete-translation-mode Multiple choice yes
_translation_percentage Multiple choice 100
mapcomplete-show_debug Multiple choice yes no

profile

This tagrendering has no question and is thus read-only

language_picker

This tagrendering has no question and is thus read-only

inbox

This tagrendering has no question and is thus read-only

  • {link(Open your inbox,&LBRACE_backend&RBRACE/messages/inbox,,)} corresponds with _unreadMessages=0
  • {link(You have &LBRACE_unreadMessages&RBRACE
    Open your inbox,&LBRACE_backend&RBRACE/messages/inbox,,)}
    corresponds with _unreadMessages>0

This tagrendering has no question and is thus read-only

logout

This tagrendering has no question and is thus read-only

background-layer-readonly

This tagrendering has no question and is thus read-only

This tagrendering is only visible in the popup if the following condition is met: _theme:backgroundLayer!= & _theme:backgroundLayer~.+ & mapcomplete-preferred-background-layer~.+

background-layer

The question is What background layer should be shown by default?

  • Use the default background layer corresponds with mapcomplete-preferred-background-layer=
  • Use OpenStreetMap-carto as default layer corresponds with mapcomplete-preferred-background-layer=osm
  • Use aerial imagery as default background corresponds with mapcomplete-preferred-background-layer=photo
  • Use a non-openstreetmap based map as default background corresponds with mapcomplete-preferred-background-layer=map
  • Use the current background layer ({__current_background}) as default background corresponds with mapcomplete-preferred-background-layer=
  • Use background layer {mapcomplete-preferred-background-layer} as default background corresponds with mapcomplete-preferred-background-layer~.+
  • This option cannot be chosen as answer

picture-license

This question is not meant to be placed on an OpenStreetMap-element; however it is used in the user information panel to ask which license the user wants

The question is Under what license do you want to publish your pictures?

  • Pictures you take will be licensed with CC0 and added to the public domain. This means that everyone can use your pictures for any purpose. This is the default choice. corresponds with mapcomplete-pictures-license=
  • This option cannot be chosen as answer
  • Pictures you take will be licensed with CC0 and added to the public domain. This means that everyone can use your pictures for any purpose. corresponds with mapcomplete-pictures-license=CC0
  • Pictures you take will be licensed with CC-BY 4.0 which requires everyone using your picture that they have to attribute you corresponds with mapcomplete-pictures-license=CC-BY 4.0
  • Pictures you take will be licensed with CC-BY-SA 4.0 which means that everyone using your picture must attribute you and that derivatives of your picture must be reshared with the same license. corresponds with mapcomplete-pictures-license=CC-BY-SA 4.0

show_tags

The question is Show the raw OpenStreetMap-tags?

  • Never show the tags. corresponds with mapcomplete-show_tags=no
  • Show the tags that will be applied once I have made {__userjourney_tagsVisibleAt} changesets corresponds with mapcomplete-show_tags=
  • Show the tags that will be applied when making a change corresponds with mapcomplete-show_tags=yes
  • Show the tags that will be applied when making a change and show the tags table on every feature corresponds with mapcomplete-show_tags=full

all-questions-at-once

The question is Should questions for unknown data fields appear one-by-one or together?

show_crosshair

The question is Should a crosshair be shown in the center of the display?

  • Show a crosshair in the center of the map (when zoomed in above level 17) corresponds with mapcomplete-show_crosshair=yes
  • Do not show a crosshair in the center of the map corresponds with mapcomplete-show_crosshair=no
  • Do not show a crosshair in the center of the map corresponds with mapcomplete-show_crosshair=
  • This option cannot be chosen as answer

fixate-north

The question is Should north always be up?

  • Allow to rotate the map corresponds with mapcomplete-fixate-north=
  • Always keep north pointing up corresponds with mapcomplete-fixate-north=yes

mangrove-keys

This tagrendering has no question and is thus read-only

translations-title

This tagrendering has no question and is thus read-only

translation-mode

The question is Do you want to help translating MapComplete?

translation-help

This tagrendering has no question and is thus read-only

translation-completeness

This tagrendering has no question and is thus read-only

This tagrendering is only visible in the popup if the following condition is met: <a href='https://wiki.openstreetmap.org/wiki/Key:mapcomplete-translation-mode' target='_blank'>mapcomplete-translation-mode</a>=<a href='https://wiki.openstreetmap.org/wiki/Tag:mapcomplete-translation-mode%3Dyes' target='_blank'>yes</a> | <a href='https://wiki.openstreetmap.org/wiki/Key:mapcomplete-translation-mode' target='_blank'>mapcomplete-translation-mode</a>=<a href='https://wiki.openstreetmap.org/wiki/Tag:mapcomplete-translation-mode%3Dtrue' target='_blank'>true</a> | <a href='https://wiki.openstreetmap.org/wiki/Key:mapcomplete-translation-mode' target='_blank'>mapcomplete-translation-mode</a>=<a href='https://wiki.openstreetmap.org/wiki/Tag:mapcomplete-translation-mode%3Dmobile' target='_blank'>mobile</a>

This tagrendering has no question and is thus read-only

This tagrendering is only visible in the popup if the following condition is met: (<a href='https://wiki.openstreetmap.org/wiki/Key:mapcomplete-translation-mode' target='_blank'>mapcomplete-translation-mode</a>=<a href='https://wiki.openstreetmap.org/wiki/Tag:mapcomplete-translation-mode%3Dtrue' target='_blank'>true</a> | <a href='https://wiki.openstreetmap.org/wiki/Key:mapcomplete-translation-mode' target='_blank'>mapcomplete-translation-mode</a>=<a href='https://wiki.openstreetmap.org/wiki/Tag:mapcomplete-translation-mode%3Dmobile' target='_blank'>mobile</a>) & _translation_links~.+

verified-mastodon

This tagrendering has no question and is thus read-only

  • A link to your Mastodon-profile has been been found: {_mastodon_link} corresponds with _mastodon_link~.+
  • We found a link to what looks to be a mastodon account, but it is unverified. Edit your profile description and place the following there: &lta href="{_mastodon_candidate}" rel="me"&gtMastodon&lt/a&gt corresponds with _mastodon_candidate~.+

cscount-thanks

This tagrendering has no question and is thus read-only

  • You have made changes on {_csCount} different occasions! That is awesome! corresponds with _csCount>0

translation-thanks

This tagrendering has no question and is thus read-only

  • You have contributed to translating MapComplete! That's awesome! corresponds with _translation_contributions>0

contributor-thanks

This tagrendering has no question and is thus read-only

  • You have contributed code to MapComplete with {_code_contributions} commits! That's awesome! corresponds with _code_contributions>0
  • This option cannot be chosen as answer

show_debug

The question is Show user settings debug info?

debug-gps

This tagrendering has no question and is thus read-only

This tagrendering is only visible in the popup if the following condition is met: <a href='https://wiki.openstreetmap.org/wiki/Key:mapcomplete-show_debug' target='_blank'>mapcomplete-show_debug</a>=<a href='https://wiki.openstreetmap.org/wiki/Tag:mapcomplete-show_debug%3Dyes' target='_blank'>yes</a>

debug

This tagrendering has no question and is thus read-only

This tagrendering is only visible in the popup if the following condition is met: <a href='https://wiki.openstreetmap.org/wiki/Key:mapcomplete-show_debug' target='_blank'>mapcomplete-show_debug</a>=<a href='https://wiki.openstreetmap.org/wiki/Tag:mapcomplete-show_debug%3Dyes' target='_blank'>yes</a>

Normal layers

The following layers are included in MapComplete:

This document is autogenerated from src/Customizations/AllKnownLayouts.ts