mapcomplete/Docs/BuiltinLayers.md
2022-02-28 17:16:38 +01:00

18 KiB

Special and other useful layers

Table of contents

  1. Special and other useful layers
  2. Priviliged layers
  3. gps_location
  1. gps_location_history
  1. home_location
  1. gps_track
  1. type_node
  1. note
  1. import_candidate
  1. conflation
  1. left_right_style
  1. split_point
  1. current_view
  1. matchpoint
  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

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 returned by the browser.

  • This layer is included automatically in every theme. This layer might contain no points
  • This layer cannot be toggled in the filter view. 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

Go to the source code

Basic tags for this layer

Elements must have the all of following tags to be shown on this layer:

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 included automatically in every theme. This layer might contain no points
  • This layer cannot be toggled in the filter view. 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
  • Not rendered on the map by default. If you want to rendering this on the map, override mapRenderings

Go to the source code

Basic tags for this layer

Elements must have the all of following tags to be shown on this layer:

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 included automatically in every theme. This layer might contain no points
  • This layer cannot be toggled in the filter view. 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

Go to the source code

Basic tags for this layer

Elements must have the all of following tags to be shown on this layer:

Supported attributes

gps_track

Meta layer showing the previous locations of the user as single line. Add this to your theme and override the icon to change the appearance of the current location.

  • 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

Go to the source code

Basic tags for this layer

Elements must have the all of following tags to be shown on this layer:

Supported attributes

Privacy notice

This tagrendering has no question and is thus read-only

export_as_gpx

This tagrendering has no question and is thus read-only

export_as_geojson

This tagrendering has no question and is thus read-only

minimap

This tagrendering has no question and is thus read-only

delete

This tagrendering has no question and is thus read-only

type_node

This is a priviliged meta_layer which exports every point in OSM. This only works if zoomed below the point that the full tile is loaded (and not loaded via Overpass). Note that this point will also contain a property parent_ways which contains all the ways this node is part of as a list. This is mainly used for extremely specialized themes, which do advanced conflations. Expert use only.

  • Not rendered on the map by default. If you want to rendering this on the map, override mapRenderings

Go to the source code

Basic tags for this layer

Elements must have the all of following tags to be shown on this layer:

  • id~^node/.*$

Supported attributes

note

This layer shows notes on OpenStreetMap. Having this layer in your theme will trigger the 'add new note' functionality in the 'addNewPoint'-popup (or if your theme has no presets, it'll enable adding notes)

  • This layer is loaded from an external source, namely https://api.openstreetmap.org/api/0.6/notes.json?limit=10000&closed=7&bbox={x_min},{y_min},{x_max},{y_max}

Go to the source code

Basic tags for this layer

Elements must have the all of following tags to be shown on this layer:

  • id~^..*$

Supported attributes

conversation

This tagrendering has no question and is thus read-only

add_image

This tagrendering has no question and is thus read-only

comment

This tagrendering has no question and is thus read-only

report-contributor

This tagrendering has no question and is thus read-only

report-note

This tagrendering has no question and is thus read-only

import_candidate

Layer used in the importHelper

  • Not visible in the layer selection by default. If you want to make this layer toggable, override name

Go to the source code

Basic tags for this layer

Elements must have the all of following tags to be shown on this layer:

Supported attributes

all_tags

This tagrendering has no question and is thus read-only

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 can not be included in a theme. It is solely used by special renderings showing a minimap with custom data.

Go to the source code

Basic tags for this layer

Elements must have the all of following tags to be shown on this layer:

Supported attributes

left_right_style

Special meta-style which will show one single line, either on the left or on the right depending on the id. This is used in the small popups with left_right roads. Cannot be included in a theme

  • This layer can not be included in a theme. It is solely used by special renderings showing a minimap with custom data.

Go to the source code

Basic tags for this layer

Elements must have the all of following tags to be shown on this layer:

Supported attributes

split_point

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

  • This layer can not be included in a theme. It is solely used by special renderings showing a minimap with custom data.

Go to the source code

Basic tags for this layer

Elements must have the all of following tags to be shown on this layer:

Supported attributes

current_view

A meta-layer which contains one single feature, namely the BBOX 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 can not be included in a theme. It is solely used by special renderings showing a minimap with custom data.

Go to the source code

Basic tags for this layer

Elements must have the all of following tags to be shown on this layer:

Supported attributes

matchpoint

The default rendering for a locationInput which snaps onto another object

  • This layer can not be included in a theme. It is solely used by special renderings showing a minimap with custom data.

Go to the source code

Basic tags for this layer

Elements must have the all of following tags to be shown on this layer:

Supported attributes

Normal layers

The following layers are included in MapComplete:

This document is autogenerated from Customizations/AllKnownLayouts.ts