Parameterized calls
Overview
The following aspects of an app can be controlled by a URL parameter:
Aspect | Parameter | Sample | Details |
---|---|---|---|
Language |
|
|
|
Theme |
|
|
|
Viewmode |
|
|
|
Center |
|
|
|
Scale |
|
|
|
Rotation |
|
|
|
Camera |
|
|
|
Basemap |
|
|
|
Layers |
|
|
|
SRS |
|
|
|
Search |
|
|
To use multiple parameters at once, you can combine them with &
, for example …/index.html?lang=en&theme=everlasting
.
To display the parameters permanently in the address bar of the browser, add the bundle parameter-url to your app.
The parameters are updated with each relevant interaction with the app.
|
Language (lang)
You can use de
for German and en
for English.
If no language parameter is set, the language parameter is added, according to the browsers language setting.
Additional languages can be added (for more details, see mapapps-custom-nls on GitHub )
Sample: https://<yourserver>/mapapps/resources/apps/myapp/index.html?lang=en
Theme (theme)
A specific theme can be loaded directly on startup. This theme has to be available in the app by adding the according theme bundle.
Sample: https://<yourserver>/mapapps/resources/apps/myapp/index.html?theme=autumn
Viewmode (vm)
The viemode of the map’s view (2D or 3D).
Sample: https://<yourserver>/mapapps/resources/apps/myapp/index.html?vm=3D
Center (c)
The center of the map’s view. By default the srs of the current map is used.
Sample: https://<yourserver>/mapapps/resources/apps/myapp/index.html?c=12345,12345
Scale (s)
The scale of the map’s view.
This parameter must be used in combination center
.
Sample: https://<yourserver>/mapapps/resources/apps/myapp/index.html?s=12345
Rotation (r)
The rotation of the map’s view.
Chosse a value between 0
and 360
.
Sample: https://<yourserver>/mapapps/resources/apps/myapp/index.html?r=45
Camera (cam)
The camera of the scene’s view. This only applies if viewmode is 3D.
Sample: https://<yourserver>/mapapps/resources/apps/myapp/index.html?cam=12345,12345,12345,90,45,55
Basemap (bm)
The ID of the selected basemap. The ID must be available in the app’s configuration or in a domain bundle used inside the app. Otherwise the parameter does not affect the app.
Sample: https://<yourserver>/mapapps/resources/apps/myapp/index.html?bm=streets
Layers (l)
IDs of layers to be set visible/invisible and set the transparency different from the initial app configuration. This means that only the visibility of layers appearing in the URL is changed. The visibility of other layers remain untouched. The transparency of layers can be controlled via this parameter, too.
Sample: https://<yourserver>/mapapps/resources/apps/myapp/index.html?l=<id1>,<id2>
For more details, see the bundle docu .
SRS (srs)
The target Spatial Reference System. If given, the SRS is switched before the values of center and camera are interpreted.
Sample: https://<yourserver>/mapapps/resources/apps/myapp/index.html?srs=<wkid>
Search (q)
A search is performed when the app starts.
Use the additional source
parameter to specify the ID of a specific topic if multiple search topics are available.
Sample: https://<yourserver>/mapapps/resources/apps/myapp/index.html?q=berlin&source=myStoreId
.
If a popup is defined for the corresponding search topic, it is displayed after the search.
For more details, see the bundle docu .