mapcomplete/Docs/BuiltinLayers.md

236 lines
5.6 KiB
Markdown
Raw Normal View History

2021-11-08 02:36:01 +01:00
Special and other useful 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](#gps_location)
- [home_location](#home_location)
2021-11-08 14:18:45 +01:00
- [gps_track](#gps_track)
2021-11-08 02:36:01 +01:00
- [type_node](#type_node)
- [conflation](#conflation)
- [left_right_style](#left_right_style)
### gps_location
2021-11-08 14:18:45 +01:00
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](https://developer.mozilla.org/en-US/docs/Web/API/GeolocationCoordinates) returned by the browser.
[Go to the source code](../assets/layers/gps_location/gps_location.json)
- **This layer is included automatically in every theme. This layer might contain no points**
- Not clickable by default. If you import this layer in your theme, override `title` to make this clickable
- Not visible in the layer selection by default. If you want to make this layer toggable, override `name`
2021-11-08 02:36:01 +01:00
### home_location
2021-11-08 14:18:45 +01:00
Meta layer showing the home location of the user. The home location can be set in the [profile settings](https://www.openstreetmap.org/profile/edit) of OpenStreetMap.
[Go to the source code](../assets/layers/home_location/home_location.json)
- **This layer is included automatically in every theme. This layer might contain no points**
- Not clickable by default. If you import this layer in your theme, override `title` to make this clickable
- Not visible in the layer selection by default. If you want to make this layer toggable, override `name`
### gps_track
Meta layer showing the previou locations of the user. Add this to your theme and override the icon to change the appearance of the current location.
[Go to the source code](../assets/layers/gps_track/gps_track.json)
- **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`
2021-11-08 02:36:01 +01:00
### type_node
2021-11-08 14:18:45 +01:00
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.
[Go to the source code](../assets/layers/type_node/type_node.json)
- Not rendered on the map by default. If you want to rendering this on the map, override `mapRenderings`
2021-11-08 02:36:01 +01:00
### conflation
2021-11-08 14:18:45 +01:00
If the import-button is set to conflate two ways, a preview is shown. This layer defines how this preview is rendered. This layer cannot be included in a theme.
[Go to the source code](../assets/layers/conflation/conflation.json)
- This layer can **not** be included in a theme. It is solely used by [special renderings](SpecialRenderings.md) showing a minimap with custom data.
2021-11-08 02:36:01 +01:00
### left_right_style
2021-11-08 14:18:45 +01:00
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
[Go to the source code](../assets/layers/left_right_style/left_right_style.json)
- This layer can **not** be included in a theme. It is solely used by [special renderings](SpecialRenderings.md) showing a minimap with custom data.
2021-11-08 02:36:01 +01:00
Frequently reused layers
==========================
The following layers are used by at least 2 mapcomplete themes and might be interesting for your custom theme too
- [bicycle_library](#bicycle_library)
- [drinking_water](#drinking_water)
- [food](#food)
- [map](#map)
- [all_streets](#all_streets)
### bicycle_library
2021-11-08 14:18:45 +01:00
A facility where bicycles can be lent for longer period of times
[Go to the source code](../assets/layers/bicycle_library/bicycle_library.json)
2021-11-08 02:36:01 +01:00
#### Themes using this layer
2021-11-08 14:18:45 +01:00
2021-11-08 02:36:01 +01:00
- [bicyclelib](https://mapcomplete.osm.be/bicyclelib)
- [cyclofix](https://mapcomplete.osm.be/cyclofix)
### drinking_water
2021-11-08 14:18:45 +01:00
[Go to the source code](../assets/layers/drinking_water/drinking_water.json)
2021-11-08 02:36:01 +01:00
#### Themes using this layer
2021-11-08 14:18:45 +01:00
2021-11-08 02:36:01 +01:00
- [cyclofix](https://mapcomplete.osm.be/cyclofix)
- [drinking_water](https://mapcomplete.osm.be/drinking_water)
- [nature](https://mapcomplete.osm.be/nature)
### food
2021-11-08 14:18:45 +01:00
[Go to the source code](../assets/layers/food/food.json)
2021-11-08 02:36:01 +01:00
#### Themes using this layer
2021-11-08 14:18:45 +01:00
2021-11-08 02:36:01 +01:00
- [food](https://mapcomplete.osm.be/food)
- [fritures](https://mapcomplete.osm.be/fritures)
### map
2021-11-08 14:18:45 +01:00
A map, meant for tourists which is permanently installed in the public space
[Go to the source code](../assets/layers/map/map.json)
2021-11-08 02:36:01 +01:00
#### Themes using this layer
2021-11-08 14:18:45 +01:00
2021-11-08 02:36:01 +01:00
- [maps](https://mapcomplete.osm.be/maps)
- [nature](https://mapcomplete.osm.be/nature)
### all_streets
2021-11-08 14:18:45 +01:00
[Go to the source code](../assets/layers/all_streets/all_streets.json)
2021-11-08 02:36:01 +01:00
- Not rendered on the map by default. If you want to rendering this on the map, override `mapRenderings`
2021-11-08 14:18:45 +01:00
2021-11-08 02:36:01 +01:00
#### Themes using this layer
2021-11-08 14:18:45 +01:00
2021-11-08 02:36:01 +01:00
- [cyclestreets](https://mapcomplete.osm.be/cyclestreets)
- [street_lighting](https://mapcomplete.osm.be/street_lighting)
This document is autogenerated from AllKnownLayers.ts