6.6 KiB
URL-parameters and URL-hash
Table of contents
- What is a URL parameter?
- language
- fs-translation-mode
- backend
- fake-user
- fs-userbadge
- fs-search
- fs-background
- fs-filter
- fs-add-new
- fs-welcome-message
- fs-community-index
- fs-iframe-popout
- fs-more-quests
- fs-share-screen
- fs-geolocation
- fs-all-questions
- fs-export
- test
- debug
- overpassUrl
- overpassTimeout
- overpassMaxZoom
- osmApiTileSize
- background
- layer-<layer-id>
This document gives an overview of which URL-parameters can be used to influence MapComplete.
What is a URL parameter?
"URL-parameters are extra parts of the URL used to set the state.
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
is51.0
in this instance - The url-parameter
lon
is4.3
in this instance - The url-parameter
z
is5
in this instance - The url-parameter
test
istrue
in this instance
Finally, the URL-hash is the part after the #
. It is node/1234
in this case.
language
The language to display MapComplete in. The user display language is determined in the following order:
- 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.
- Use the language as set by the URL-parameter
language
. This will disable saving the language to localStorage in case a non-logged-in user changes their language - 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
- Use the navigator-language (if available)
- 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.
Translations are never complete. If a translation in a certain language is missing, English is used as fallback. No default value set
fs-translation-mode
If set, will show a translation button next to every string. The default value is false
backend
The OSM backend to use - can be used to redirect mapcomplete to the testing backend when using 'osm-test' The default value is osm
fake-user
If true, 'dryrun' mode is activated and a fake user account is loaded The default value is false
fs-userbadge
Disables/Enables the user information pill (userbadge) at the top left. Disabling this disables logging in and thus disables editing all together, effectively putting MapComplete into read-only mode. The default value is true
fs-search
Disables/Enables the search bar The default value is true
fs-background
Disables/Enables the background layer control The default value is true
fs-filter
Disables/Enables the filter view The default value is true
fs-add-new
Disables/Enables the 'add new feature'-popup. (A theme without presets might not have it in the first place) The default value is true
fs-welcome-message
Disables/enables the help menu or welcome message The default value is true
fs-community-index
Disables/enables the button to get in touch with the community The default value is true
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) The default value is true
fs-more-quests
Disables/Enables the 'More Quests'-tab in the welcome message The default value is true
fs-share-screen
Disables/Enables the 'Share-screen'-tab in the welcome message The default value is true
fs-geolocation
Disables/Enables the geolocation button The default value is true
fs-all-questions
Always show all questions The default value is false
fs-export
Enable the export as GeoJSON and CSV button The default value is true
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 The default value is false
debug
If true, shows some extra debugging help such as all the available tags on every object The default value is false
overpassUrl
Point mapcomplete to a different overpass-instance. Example: https://overpass-api.de/api/interpreter The default value is https://overpass-api.de/api/interpreter,https://overpass.kumi.systems/api/interpreter,https://overpass.openstreetmap.ru/cgi/interpreter
overpassTimeout
Set a different timeout (in seconds) for queries in overpass The default value is 30
overpassMaxZoom
point to switch between OSM-api and overpass The default value is 16
osmApiTileSize
Tilesize when the OSM-API is used to fetch data within a BBOX The default value is 17
background
The id of the background layer to start with The default value is osm
layer-<layer-id>
Wether or not the layer with id is shown The default value is true
This document is autogenerated from src/Logic/Web/QueryParameters.ts, src/UI/QueryParameterDocumentation.ts