mapcomplete/Docs/URL_Parameters.md

54 lines
1.7 KiB
Markdown
Raw Normal View History

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)
2022-04-03 03:49:09 +02:00
- [language](#language)
- [fs-translation-mode](#fs-translation-mode)
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.
2022-02-14 04:59:49 +01:00
For example, if the url is `https://mapcomplete.osm.be/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.
2021-11-08 02:36:01 +01:00
2022-04-03 03:49:09 +02:00
language
----------
The language to display mapcomplete in. Will be ignored in case a logged-in-user did set their language before. If the specified language does not exist, it will default to the first language in the theme. No default value set
fs-translation-mode
---------------------
2022-06-04 16:56:15 +02:00
If set, will show a translation button next to every string. The default value is _false_
2021-11-08 02:36:01 +01:00
2022-02-15 00:11:11 +01:00
This document is autogenerated from [Logic/Web/QueryParameters.ts](https://github.com/pietervdvn/MapComplete/blob/develop/Logic/Web/QueryParameters.ts), [UI/QueryParameterDocumentation.ts](https://github.com/pietervdvn/MapComplete/blob/develop/UI/QueryParameterDocumentation.ts)