mapcomplete/Docs/URL_Parameters.md

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

506 lines
13 KiB
Markdown
Raw Normal View History

2023-02-12 23:08:57 +01:00
[//]: # (WARNING: this file is automatically generated. Please find the sources at the bottom and edit those sources)
2022-02-14 04:59:49 +01:00
2024-05-07 00:41:59 +02:00
URL-parameters and URL-hash
=============================
This document gives an overview of which URL-parameters can be used to influence MapComplete.
2024-05-07 00:41:59 +02:00
## Table of contents
1. [ What is a URL parameter? ](#-what-is-a-url-parameter-)
- [Possible hashes to open a menu](#possible-hashes-to-open-a-menu)
2. [ language ](#-language-)
3. [ fs-translation-mode ](#-fs-translation-mode-)
4. [ fake-user ](#-fake-user-)
5. [ fs-enable-login ](#-fs-enable-login-)
6. [ fs-search ](#-fs-search-)
7. [ fs-background ](#-fs-background-)
8. [ fs-filter ](#-fs-filter-)
9. [ fs-welcome-message ](#-fs-welcome-message-)
10. [ fs-community-index ](#-fs-community-index-)
11. [ fs-iframe-popout ](#-fs-iframe-popout-)
2024-06-19 00:08:40 +02:00
12. [ fs-homepage-link ](#-fs-homepage-link-)
2024-05-07 00:41:59 +02:00
13. [ fs-share-screen ](#-fs-share-screen-)
14. [ fs-geolocation ](#-fs-geolocation-)
15. [ fs-all-questions ](#-fs-all-questions-)
16. [ fs-export ](#-fs-export-)
17. [ test ](#-test-)
18. [ debug ](#-debug-)
19. [ moreprivacy ](#-moreprivacy-)
20. [ overpassUrl ](#-overpassurl-)
21. [ overpassTimeout ](#-overpasstimeout-)
22. [ overpassMaxZoom ](#-overpassmaxzoom-)
23. [ osmApiTileSize ](#-osmapitilesize-)
24. [ background ](#-background-)
25. [ fs-layers-enabled ](#-fs-layers-enabled-)
26. [ z ](#-z-)
27. [ lat ](#-lat-)
28. [ lon ](#-lon-)
29. [ oauth_token ](#-oauth_token-)
30. [ layer-public_bookcase ](#-layer-public_bookcase-)
31. [ filter-public_bookcase-kid-books ](#-filter-public_bookcase-kid-books-)
32. [ filter-public_bookcase-adult-books ](#-filter-public_bookcase-adult-books-)
33. [ filter-public_bookcase-inside ](#-filter-public_bookcase-inside-)
34. [ filter-public_bookcase-has_image ](#-filter-public_bookcase-has_image-)
35. [ layer-note_import_public_bookcase ](#-layer-note_import_public_bookcase-)
36. [ mode ](#-mode-)
37. [ layer-<layer-id> ](#-layer-<layer-id>-)
2024-05-07 00:41:59 +02:00
What is a URL parameter?
--------------------------
"URL-parameters are extra parts of the URL used to set the state.
2024-05-07 00:41:59 +02:00
For example, if the url is `https://mapcomplete.org/cyclofix?lat=51.0&lon=4.3&z=5&test=true#node/1234`, 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 `lon` is `4.3` in this instance
- The url-parameter `z` is `5` in this instance
- The url-parameter `test` is `true` in this instance
Finally, the URL-hash is the part after the `#`. It is `node/1234` in this case.
2023-08-24 12:22:45 +02:00
The URL-hash can contain multiple values:
2024-05-07 00:41:59 +02:00
- The id of the currently selected object, e.g. `node/1234`
- The currently opened menu view
- The base64-encoded JSON-file specifying a custom theme (only when loading)
2023-08-24 12:22:45 +02:00
### Possible hashes to open a menu
2024-05-07 00:41:59 +02:00
2023-08-24 12:22:45 +02:00
The possible hashes are:
2024-05-07 00:41:59 +02:00
2023-12-19 22:08:00 +01:00
`menu:about`,`menu:settings`,`menu:favourites`,`menu:community`,`menu:privacy`,`menu:advanced`
2023-08-24 12:22:45 +02:00
2023-12-21 01:46:18 +01:00
`theme-menu:intro`,`theme-menu:download`,`theme-menu:copyright`,`theme-menu:share`
2023-08-24 12:22:45 +02:00
2021-11-08 02:36:01 +01:00
2024-05-07 00:41:59 +02:00
language
----------
2023-07-16 02:45:57 +02:00
2024-05-07 00:41:59 +02:00
The language to display MapComplete in.
The user display language is determined in the following order:
1. Use the language as set by the URL-parameter `language` (following ISO 639-1 | ex. `language=nl`). This will _disable_ setting the language by the user
2. If the user did log in and did set their language before with MapComplete, use this language. This language selection is synchronized accross devices using the openstreetmap.org user preferences.
3. If the user visited MapComplete before and did change their language manually, this changed language will be saved in local storage. Use the language from local storage
4. Use the navigator-language (if available)
5. Use English
Note that this URL-parameter is not added to the URL-bar by default.
Note that the _loading_ screen will always use the navigator language.
2023-07-16 02:50:02 +02:00
Translations are never complete. If a translation in a certain language is missing, English is used as fallback.
2023-07-27 12:50:46 +02:00
This documentation is defined in the source code at [Locale.ts](/src/UI/i18n/Locale.ts#L35)
2024-05-07 00:41:59 +02:00
No default value set
2023-07-16 02:45:57 +02:00
2024-05-07 00:41:59 +02:00
fs-translation-mode
---------------------
2022-04-03 03:49:09 +02:00
2024-05-07 00:41:59 +02:00
If set, will show a translation button next to every string.
2024-05-07 00:41:59 +02:00
This documentation is defined in the source code at [Locale.ts](/src/UI/i18n/Locale.ts#L78)
2024-05-07 00:41:59 +02:00
The default value is _false_
2022-04-03 03:49:09 +02:00
2024-05-07 00:41:59 +02:00
fake-user
-----------
If true, 'dryrun' mode is activated and a fake user account is loaded
2024-06-24 13:11:35 +02:00
This documentation is defined in the source code at [FeatureSwitchState.ts](/src/Logic/State/FeatureSwitchState.ts#L37)
2024-05-07 00:41:59 +02:00
The default value is _false_
fs-enable-login
-----------------
Disables/Enables logging in and thus disables editing all together. This effectively puts MapComplete into read-only mode.
2022-06-19 22:13:38 +02:00
This documentation is defined in the source code at [FeatureSwitchState.ts](/src/Logic/State/FeatureSwitchState.ts#L99)
2024-05-07 00:41:59 +02:00
The default value is _true_
fs-search
-----------
Disables/Enables the search bar
This documentation is defined in the source code at [FeatureSwitchState.ts](/src/Logic/State/FeatureSwitchState.ts#L114)
2024-05-07 00:41:59 +02:00
The default value is _true_
fs-background
2024-04-28 03:46:56 +02:00
---------------
2022-06-19 22:13:38 +02:00
2024-06-24 13:11:35 +02:00
Disables/Enables the background layer control where a user can enable e.g. aerial imagery
This documentation is defined in the source code at [FeatureSwitchState.ts](/src/Logic/State/FeatureSwitchState.ts#L119)
2024-05-07 00:41:59 +02:00
The default value is _true_
2022-06-19 22:13:38 +02:00
2024-05-07 00:41:59 +02:00
fs-filter
-----------
2024-06-24 13:11:35 +02:00
Disables/Enables the filter view where a user can enable/disable MapComplete-layers or filter for certain properties
2022-06-19 22:13:38 +02:00
This documentation is defined in the source code at [FeatureSwitchState.ts](/src/Logic/State/FeatureSwitchState.ts#L125)
2022-06-19 22:13:38 +02:00
2024-05-07 00:41:59 +02:00
The default value is _true_
2022-06-19 22:13:38 +02:00
2024-05-07 00:41:59 +02:00
fs-welcome-message
--------------------
2022-06-19 22:13:38 +02:00
2024-05-07 00:41:59 +02:00
Disables/enables the help menu or welcome message
This documentation is defined in the source code at [FeatureSwitchState.ts](/src/Logic/State/FeatureSwitchState.ts#L131)
2024-05-07 00:41:59 +02:00
The default value is _true_
2022-06-19 22:13:38 +02:00
2024-05-07 00:41:59 +02:00
fs-community-index
--------------------
Disables/enables the button to get in touch with the community
This documentation is defined in the source code at [FeatureSwitchState.ts](/src/Logic/State/FeatureSwitchState.ts#L136)
2024-05-07 00:41:59 +02:00
The default value is _true_
2022-06-19 22:13:38 +02:00
2024-05-07 00:41:59 +02:00
fs-iframe-popout
2024-04-28 03:46:56 +02:00
------------------
2022-06-19 22:13:38 +02:00
2024-05-07 00:41:59 +02:00
Disables/Enables the extraLink button. By default, 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 or another extraLink button is enabled)
This documentation is defined in the source code at [FeatureSwitchState.ts](/src/Logic/State/FeatureSwitchState.ts#L141)
2024-05-07 00:41:59 +02:00
The default value is _true_
2023-03-08 19:17:03 +01:00
2024-05-07 00:41:59 +02:00
2024-06-19 00:08:40 +02:00
fs-homepage-link
------------------
2022-06-19 22:13:38 +02:00
2024-06-19 00:08:40 +02:00
Disables/Enables the various links which go back to the index page with the theme overview
This documentation is defined in the source code at [FeatureSwitchState.ts](/src/Logic/State/FeatureSwitchState.ts#L146)
2024-05-07 00:41:59 +02:00
The default value is _true_
2022-06-19 22:13:38 +02:00
2024-05-07 00:41:59 +02:00
fs-share-screen
-----------------
2024-05-07 00:41:59 +02:00
Disables/Enables the 'Share-screen'-tab in the welcome message
2022-06-19 22:13:38 +02:00
This documentation is defined in the source code at [FeatureSwitchState.ts](/src/Logic/State/FeatureSwitchState.ts#L151)
2022-06-19 22:13:38 +02:00
2024-05-07 00:41:59 +02:00
The default value is _true_
2022-06-19 22:13:38 +02:00
2024-05-07 00:41:59 +02:00
fs-geolocation
----------------
2022-06-19 22:13:38 +02:00
2024-05-07 00:41:59 +02:00
Disables/Enables the geolocation button
This documentation is defined in the source code at [FeatureSwitchState.ts](/src/Logic/State/FeatureSwitchState.ts#L156)
2024-05-07 00:41:59 +02:00
The default value is _true_
2022-06-19 22:13:38 +02:00
2024-05-07 00:41:59 +02:00
fs-all-questions
------------------
2024-05-07 00:41:59 +02:00
Always show all questions
2022-06-19 22:13:38 +02:00
This documentation is defined in the source code at [FeatureSwitchState.ts](/src/Logic/State/FeatureSwitchState.ts#L161)
2022-06-19 22:13:38 +02:00
2024-05-07 00:41:59 +02:00
The default value is _false_
2022-06-19 22:13:38 +02:00
2024-05-07 00:41:59 +02:00
fs-export
-----------
2022-06-19 22:13:38 +02:00
2024-05-07 00:41:59 +02:00
Enable the export as GeoJSON and CSV button
This documentation is defined in the source code at [FeatureSwitchState.ts](/src/Logic/State/FeatureSwitchState.ts#L167)
2024-05-07 00:41:59 +02:00
The default value is _true_
2022-06-19 22:13:38 +02:00
2024-05-07 00:41:59 +02:00
test
------
2024-05-07 00:41:59 +02:00
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
2022-06-19 22:13:38 +02:00
This documentation is defined in the source code at [FeatureSwitchState.ts](/src/Logic/State/FeatureSwitchState.ts#L181)
2022-06-19 22:13:38 +02:00
2024-05-07 00:41:59 +02:00
The default value is _false_
2022-06-19 22:13:38 +02:00
2024-05-07 00:41:59 +02:00
debug
-------
2022-06-19 22:13:38 +02:00
2024-05-07 00:41:59 +02:00
If true, shows some extra debugging help such as all the available tags on every object
This documentation is defined in the source code at [FeatureSwitchState.ts](/src/Logic/State/FeatureSwitchState.ts#L187)
2024-05-07 00:41:59 +02:00
The default value is _false_
2022-06-19 22:13:38 +02:00
2024-05-07 00:41:59 +02:00
moreprivacy
-------------
2024-05-07 00:41:59 +02:00
If true, the location distance indication will not be written to the changeset and other privacy enhancing measures might be taken.
2022-06-19 22:13:38 +02:00
This documentation is defined in the source code at [FeatureSwitchState.ts](/src/Logic/State/FeatureSwitchState.ts#L193)
2022-06-19 22:13:38 +02:00
2024-05-07 00:41:59 +02:00
The default value is _false_
2022-06-19 22:13:38 +02:00
2024-05-07 00:41:59 +02:00
overpassUrl
-------------
2022-06-19 22:13:38 +02:00
2024-05-07 00:41:59 +02:00
Point mapcomplete to a different overpass-instance. Example: https://overpass-api.de/api/interpreter
This documentation is defined in the source code at [FeatureSwitchState.ts](/src/Logic/State/FeatureSwitchState.ts#L199)
2024-05-07 00:41:59 +02:00
The default value is _https://overpass-api.de/api/interpreter,https://overpass.kumi.systems/api/interpreter,https://overpass.openstreetmap.ru/cgi/interpreter_
2022-06-19 22:13:38 +02:00
2023-12-21 01:46:18 +01:00
2024-05-07 00:41:59 +02:00
overpassTimeout
-----------------
Set a different timeout (in seconds) for queries in overpass
This documentation is defined in the source code at [FeatureSwitchState.ts](/src/Logic/State/FeatureSwitchState.ts#L210)
2024-05-07 00:41:59 +02:00
The default value is _30_
overpassMaxZoom
-----------------
point to switch between OSM-api and overpass
This documentation is defined in the source code at [FeatureSwitchState.ts](/src/Logic/State/FeatureSwitchState.ts#L218)
2024-05-07 00:41:59 +02:00
The default value is _16_
osmApiTileSize
----------------
Tilesize when the OSM-API is used to fetch data within a BBOX
2023-12-21 01:46:18 +01:00
This documentation is defined in the source code at [FeatureSwitchState.ts](/src/Logic/State/FeatureSwitchState.ts#L226)
2023-12-21 01:46:18 +01:00
2024-05-07 00:41:59 +02:00
The default value is _17_
background
------------
The id of the background layer to start with
This documentation is defined in the source code at [FeatureSwitchState.ts](/src/Logic/State/FeatureSwitchState.ts#L233)
2024-05-07 00:41:59 +02:00
No default value set
fs-layers-enabled
-------------------
If set to false, all layers will be disabled - except the explicitly enabled layers
This documentation is defined in the source code at [FeatureSwitchState.ts](/src/Logic/State/FeatureSwitchState.ts#L239)
The default value is _true_
2024-05-07 00:41:59 +02:00
z
2024-04-28 03:46:56 +02:00
---
2023-12-21 01:46:18 +01:00
2024-05-07 00:41:59 +02:00
The initial/current zoom level
2023-12-21 01:46:18 +01:00
2024-06-19 00:08:40 +02:00
This documentation is defined in the source code at [InitialMapPositioning.ts](/src/Logic/Actors/InitialMapPositioning.ts#L37)
2023-12-21 01:46:18 +01:00
2024-05-07 00:41:59 +02:00
The default value is _1_
2023-12-21 01:46:18 +01:00
2024-05-07 00:41:59 +02:00
lat
-----
The initial/current latitude
2023-12-21 01:46:18 +01:00
2024-06-19 00:08:40 +02:00
This documentation is defined in the source code at [InitialMapPositioning.ts](/src/Logic/Actors/InitialMapPositioning.ts#L37)
2023-12-21 01:46:18 +01:00
2024-05-07 00:41:59 +02:00
The default value is _0_
2023-12-21 01:46:18 +01:00
2024-05-07 00:41:59 +02:00
lon
-----
The initial/current longitude of the app
2024-06-19 00:08:40 +02:00
This documentation is defined in the source code at [InitialMapPositioning.ts](/src/Logic/Actors/InitialMapPositioning.ts#L37)
2024-05-07 00:41:59 +02:00
The default value is _0_
oauth_token
-------------
Used to complete the login
2023-12-21 01:46:18 +01:00
This documentation is defined in the source code at [ThemeViewState.ts](/src/Models/ThemeViewState.ts#L174)
2023-12-21 01:46:18 +01:00
2024-05-07 00:41:59 +02:00
No default value set
2023-12-21 01:46:18 +01:00
2024-05-07 00:41:59 +02:00
layer-public_bookcase
-----------------------
Whether or not layer public_bookcase is shown
2023-12-21 01:46:18 +01:00
This documentation is defined in the source code at [FilteredLayer.ts](/src/Models/FilteredLayer.ts#L110)
2023-12-21 01:46:18 +01:00
2024-05-07 00:41:59 +02:00
The default value is _true_
2023-12-21 01:46:18 +01:00
2024-05-07 00:41:59 +02:00
filter-public_bookcase-kid-books
----------------------------------
State of filter kid-books
2023-12-21 01:46:18 +01:00
This documentation is defined in the source code at [FilterConfig.ts](/src/Models/ThemeConfig/FilterConfig.ts#L161)
2024-05-07 00:41:59 +02:00
The default value is _false_
2023-12-21 01:46:18 +01:00
2024-05-07 00:41:59 +02:00
filter-public_bookcase-adult-books
------------------------------------
State of filter adult-books
2023-12-21 01:46:18 +01:00
This documentation is defined in the source code at [FilterConfig.ts](/src/Models/ThemeConfig/FilterConfig.ts#L161)
2024-05-07 00:41:59 +02:00
The default value is _false_
2023-12-21 01:46:18 +01:00
2024-05-07 00:41:59 +02:00
filter-public_bookcase-inside
-------------------------------
2023-12-21 01:46:18 +01:00
2024-05-07 00:41:59 +02:00
State of filter inside
2023-12-21 01:46:18 +01:00
This documentation is defined in the source code at [FilterConfig.ts](/src/Models/ThemeConfig/FilterConfig.ts#L161)
2024-05-07 00:41:59 +02:00
The default value is _0_
2023-12-21 01:46:18 +01:00
2024-05-07 00:41:59 +02:00
filter-public_bookcase-has_image
2023-12-21 01:46:18 +01:00
----------------------------------
2024-05-07 00:41:59 +02:00
State of filter has_image
2023-12-21 01:46:18 +01:00
This documentation is defined in the source code at [FilterConfig.ts](/src/Models/ThemeConfig/FilterConfig.ts#L161)
2024-05-07 00:41:59 +02:00
The default value is _0_
2023-12-21 01:46:18 +01:00
2024-05-07 00:41:59 +02:00
layer-note_import_public_bookcase
-----------------------------------
Whether or not layer note_import_public_bookcase is shown
2023-12-21 01:46:18 +01:00
This documentation is defined in the source code at [FilteredLayer.ts](/src/Models/FilteredLayer.ts#L110)
2023-12-21 01:46:18 +01:00
2024-05-07 00:41:59 +02:00
The default value is _true_
2023-12-21 01:46:18 +01:00
2024-05-07 00:41:59 +02:00
mode
------
2023-12-21 01:46:18 +01:00
2024-05-07 00:41:59 +02:00
The mode the application starts in, e.g. 'map', 'dashboard' or 'statistics'
2023-12-21 01:46:18 +01:00
2024-06-18 21:11:42 +02:00
This documentation is defined in the source code at [generateDocs.ts](ervdvn/git/MapComplete/scripts/generateDocs.ts#L439)
2024-05-07 00:41:59 +02:00
The default value is _map_
layer-&lt;layer-id&gt;
------------------------
2023-12-21 01:46:18 +01:00
2024-05-07 00:41:59 +02:00
Wether or not the layer with id <layer-id> is shown
This documentation is defined in the source code at [QueryParameterDocumentation.ts](/src/UI/QueryParameterDocumentation.ts#L59)
2024-05-07 00:41:59 +02:00
The default value is _true_
2021-11-08 02:36:01 +01:00
2023-07-20 13:28:38 +02:00
This document is autogenerated from [src/Logic/Web/QueryParameters.ts](https://github.com/pietervdvn/MapComplete/blob/develop/src/Logic/Web/QueryParameters.ts), [src/UI/QueryParameterDocumentation.ts](https://github.com/pietervdvn/MapComplete/blob/develop/src/UI/QueryParameterDocumentation.ts)