mapcomplete/Docs/URL_Parameters.md

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

483 lines
12 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
URL-parameters and URL-hash
2021-11-30 22:45:25 +01:00
=============================
2022-02-14 04:59:49 +01:00
## Table of contents
2021-11-30 22:45:25 +01:00
2021-11-30 22:50:48 +01:00
1. [URL-parameters and URL-hash](#url-parameters-and-url-hash)
2022-02-14 04:59:49 +01:00
- [What is a URL parameter?](#what-is-a-url-parameter)
2023-07-16 02:45:57 +02:00
- [language](#language)
2022-04-03 03:49:09 +02:00
- [fs-translation-mode](#fs-translation-mode)
2023-06-11 23:12:03 +02:00
- [fake-user](#fake-user)
2023-08-24 12:22:45 +02:00
- [fs-enable-login](#fs-enable-login)
2022-06-19 22:13:38 +02:00
- [fs-search](#fs-search)
- [fs-background](#fs-background)
- [fs-filter](#fs-filter)
- [fs-welcome-message](#fs-welcome-message)
2023-03-08 19:17:03 +01:00
- [fs-community-index](#fs-community-index)
2022-06-19 22:13:38 +02:00
- [fs-iframe-popout](#fs-iframe-popout)
- [fs-more-quests](#fs-more-quests)
- [fs-share-screen](#fs-share-screen)
- [fs-geolocation](#fs-geolocation)
- [fs-all-questions](#fs-all-questions)
- [fs-export](#fs-export)
- [test](#test)
- [debug](#debug)
- [overpassUrl](#overpassurl)
- [overpassTimeout](#overpasstimeout)
- [overpassMaxZoom](#overpassmaxzoom)
- [osmApiTileSize](#osmapitilesize)
- [background](#background)
2023-12-21 01:46:18 +01:00
- [z](#z)
- [lat](#lat)
- [lon](#lon)
- [oauth_token](#oauth_token)
- [layer-public_bookcase](#layer-public_bookcase)
- [filter-public_bookcase-kid-books](#filter-public_bookcase-kid-books)
- [filter-public_bookcase-adult-books](#filter-public_bookcase-adult-books)
- [filter-public_bookcase-inside](#filter-public_bookcase-inside)
- [filter-public_bookcase-has_image](#filter-public_bookcase-has_image)
- [layer-note_import_public_bookcase](#layer-note_import_public_bookcase)
- [mode](#mode)
2022-06-19 22:13:38 +02:00
- [layer-<layer-id>](#layer-&ltlayer-id>)
2022-02-14 04:59:49 +01:00
This document gives an overview of which URL-parameters can be used to influence MapComplete.
2021-11-30 22:45:25 +01:00
2022-02-14 04:59:49 +01:00
What is a URL parameter?
2021-11-30 22:45:25 +01:00
--------------------------
"URL-parameters are extra parts of the URL used to set the state.
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:
2022-02-14 04:59:49 +01:00
- 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:
- 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)
### Possible hashes to open a menu
The possible hashes are:
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
2023-07-16 02:45:57 +02:00
language
----------
The language to display MapComplete in.
The user display language is determined in the following order:
2023-07-20 13:28:38 +02:00
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.
2023-07-20 13:28:38 +02:00
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
2023-07-16 02:45:57 +02:00
2023-07-16 02:50:02 +02:00
Note that this URL-parameter is not added to the URL-bar by default.
2023-07-20 13:28:38 +02:00
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)
No default value set
2023-07-16 02:45:57 +02:00
2023-06-11 23:12:03 +02:00
fs-translation-mode
---------------------
2022-04-03 03:49:09 +02:00
If set, will show a translation button next to every string.
2023-12-21 01:46:18 +01:00
This documentation is defined in the source code at [Locale.ts](/src/UI/i18n/Locale.ts#L79)
The default value is _false_
2022-04-03 03:49:09 +02:00
2023-06-11 23:12:03 +02:00
fake-user
-----------
2022-06-19 22:13:38 +02:00
If true, 'dryrun' mode is activated and a fake user account is loaded
2023-10-11 04:34:57 +02:00
This documentation is defined in the source code at [FeatureSwitchState.ts](/src/Logic/State/FeatureSwitchState.ts#L33)
The default value is _false_
2022-06-19 22:13:38 +02:00
2023-08-24 12:22:45 +02:00
fs-enable-login
-----------------
2022-06-19 22:13:38 +02:00
2023-08-24 12:22:45 +02:00
Disables/Enables logging in and thus disables editing all together. This effectively puts MapComplete into read-only mode.
2023-10-11 04:34:57 +02:00
This documentation is defined in the source code at [FeatureSwitchState.ts](/src/Logic/State/FeatureSwitchState.ts#L73)
The default value is _true_
2022-06-19 22:13:38 +02:00
fs-search
-----------
Disables/Enables the search bar
2023-10-30 16:32:43 +01:00
This documentation is defined in the source code at [FeatureSwitchState.ts](/src/Logic/State/FeatureSwitchState.ts#L88)
The default value is _true_
2022-06-19 22:13:38 +02:00
fs-background
---------------
Disables/Enables the background layer control
2023-10-30 16:32:43 +01:00
This documentation is defined in the source code at [FeatureSwitchState.ts](/src/Logic/State/FeatureSwitchState.ts#L93)
The default value is _true_
2022-06-19 22:13:38 +02:00
fs-filter
-----------
Disables/Enables the filter view
2023-10-30 16:32:43 +01:00
This documentation is defined in the source code at [FeatureSwitchState.ts](/src/Logic/State/FeatureSwitchState.ts#L99)
The default value is _true_
2022-06-19 22:13:38 +02:00
fs-welcome-message
--------------------
Disables/enables the help menu or welcome message
2023-10-30 16:32:43 +01:00
This documentation is defined in the source code at [FeatureSwitchState.ts](/src/Logic/State/FeatureSwitchState.ts#L105)
The default value is _true_
2022-06-19 22:13:38 +02:00
2023-03-08 19:17:03 +01:00
fs-community-index
--------------------
Disables/enables the button to get in touch with the community
2023-10-30 16:32:43 +01:00
This documentation is defined in the source code at [FeatureSwitchState.ts](/src/Logic/State/FeatureSwitchState.ts#L110)
The default value is _true_
2023-03-08 19:17:03 +01:00
2022-06-19 22:13:38 +02:00
fs-iframe-popout
------------------
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)
2023-10-30 16:32:43 +01:00
This documentation is defined in the source code at [FeatureSwitchState.ts](/src/Logic/State/FeatureSwitchState.ts#L115)
The default value is _true_
2022-06-19 22:13:38 +02:00
fs-more-quests
----------------
Disables/Enables the 'More Quests'-tab in the welcome message
2023-10-30 16:32:43 +01:00
This documentation is defined in the source code at [FeatureSwitchState.ts](/src/Logic/State/FeatureSwitchState.ts#L120)
The default value is _true_
2022-06-19 22:13:38 +02:00
fs-share-screen
-----------------
Disables/Enables the 'Share-screen'-tab in the welcome message
2023-10-30 16:32:43 +01:00
This documentation is defined in the source code at [FeatureSwitchState.ts](/src/Logic/State/FeatureSwitchState.ts#L125)
The default value is _true_
2022-06-19 22:13:38 +02:00
fs-geolocation
----------------
Disables/Enables the geolocation button
2023-10-30 16:32:43 +01:00
This documentation is defined in the source code at [FeatureSwitchState.ts](/src/Logic/State/FeatureSwitchState.ts#L130)
The default value is _true_
2022-06-19 22:13:38 +02:00
fs-all-questions
------------------
Always show all questions
2023-10-30 16:32:43 +01:00
This documentation is defined in the source code at [FeatureSwitchState.ts](/src/Logic/State/FeatureSwitchState.ts#L135)
The default value is _false_
2022-06-19 22:13:38 +02:00
fs-export
-----------
Enable the export as GeoJSON and CSV button
2023-10-30 16:32:43 +01:00
This documentation is defined in the source code at [FeatureSwitchState.ts](/src/Logic/State/FeatureSwitchState.ts#L141)
The default value is _true_
2022-06-19 22:13:38 +02:00
test
------
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
2023-10-30 16:32:43 +01:00
This documentation is defined in the source code at [FeatureSwitchState.ts](/src/Logic/State/FeatureSwitchState.ts#L155)
The default value is _false_
2022-06-19 22:13:38 +02:00
debug
-------
If true, shows some extra debugging help such as all the available tags on every object
2023-10-30 16:32:43 +01:00
This documentation is defined in the source code at [FeatureSwitchState.ts](/src/Logic/State/FeatureSwitchState.ts#L161)
The default value is _false_
2022-06-19 22:13:38 +02:00
overpassUrl
-------------
Point mapcomplete to a different overpass-instance. Example: https://overpass-api.de/api/interpreter
2023-10-30 16:32:43 +01:00
This documentation is defined in the source code at [FeatureSwitchState.ts](/src/Logic/State/FeatureSwitchState.ts#L167)
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
overpassTimeout
-----------------
Set a different timeout (in seconds) for queries in overpass
2023-10-30 16:32:43 +01:00
This documentation is defined in the source code at [FeatureSwitchState.ts](/src/Logic/State/FeatureSwitchState.ts#L178)
The default value is _30_
2022-06-19 22:13:38 +02:00
overpassMaxZoom
-----------------
point to switch between OSM-api and overpass
2023-10-30 16:32:43 +01:00
This documentation is defined in the source code at [FeatureSwitchState.ts](/src/Logic/State/FeatureSwitchState.ts#L186)
The default value is _16_
2022-06-19 22:13:38 +02:00
osmApiTileSize
----------------
Tilesize when the OSM-API is used to fetch data within a BBOX
2023-10-30 16:32:43 +01:00
This documentation is defined in the source code at [FeatureSwitchState.ts](/src/Logic/State/FeatureSwitchState.ts#L194)
The default value is _17_
2022-06-19 22:13:38 +02:00
background
------------
The id of the background layer to start with
2023-10-30 16:32:43 +01:00
This documentation is defined in the source code at [FeatureSwitchState.ts](/src/Logic/State/FeatureSwitchState.ts#L201)
2023-09-28 23:50:27 +02:00
No default value set
2022-06-19 22:13:38 +02:00
2023-12-21 01:46:18 +01:00
z
---
The initial/current zoom level
2024-02-12 12:52:28 +01:00
This documentation is defined in the source code at [InitialMapPositioning.ts](/src/Logic/Actors/InitialMapPositioning.ts#L28)
2023-12-21 01:46:18 +01:00
The default value is _1_
lat
-----
The initial/current latitude
2024-02-12 12:52:28 +01:00
This documentation is defined in the source code at [InitialMapPositioning.ts](/src/Logic/Actors/InitialMapPositioning.ts#L28)
2023-12-21 01:46:18 +01:00
The default value is _0_
lon
-----
The initial/current longitude of the app
2024-02-12 12:52:28 +01:00
This documentation is defined in the source code at [InitialMapPositioning.ts](/src/Logic/Actors/InitialMapPositioning.ts#L28)
2023-12-21 01:46:18 +01:00
The default value is _0_
oauth_token
-------------
Used to complete the login
2024-03-13 00:00:29 +01:00
This documentation is defined in the source code at [ThemeViewState.ts](/src/Models/ThemeViewState.ts#L171)
2023-12-21 01:46:18 +01:00
No default value set
layer-public_bookcase
-----------------------
Whether or not layer public_bookcase is shown
This documentation is defined in the source code at [FilteredLayer.ts](/src/Models/FilteredLayer.ts#L106)
The default value is _true_
filter-public_bookcase-kid-books
----------------------------------
State of filter kid-books
This documentation is defined in the source code at [FilterConfig.ts](/src/Models/ThemeConfig/FilterConfig.ts#L161)
The default value is _false_
filter-public_bookcase-adult-books
------------------------------------
State of filter adult-books
This documentation is defined in the source code at [FilterConfig.ts](/src/Models/ThemeConfig/FilterConfig.ts#L161)
The default value is _false_
filter-public_bookcase-inside
-------------------------------
State of filter inside
This documentation is defined in the source code at [FilterConfig.ts](/src/Models/ThemeConfig/FilterConfig.ts#L161)
The default value is _0_
filter-public_bookcase-has_image
----------------------------------
State of filter has_image
This documentation is defined in the source code at [FilterConfig.ts](/src/Models/ThemeConfig/FilterConfig.ts#L161)
The default value is _0_
layer-note_import_public_bookcase
-----------------------------------
Whether or not layer note_import_public_bookcase is shown
This documentation is defined in the source code at [FilteredLayer.ts](/src/Models/FilteredLayer.ts#L106)
The default value is _true_
mode
------
The mode the application starts in, e.g. 'map', 'dashboard' or 'statistics'
2024-03-13 00:00:29 +01:00
This documentation is defined in the source code at [generateDocs.ts](ervdvn/git/MapComplete/scripts/generateDocs.ts#L422)
2023-12-21 01:46:18 +01:00
The default value is _map_
2022-06-19 22:13:38 +02:00
layer-<layer-id>
------------------------
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)
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)