Closed Patatekes closed 8 months ago
I missed this in a similar way, recently. I thought it would be nice, if the layer tree is opened automatically when a map theme is loaded. So the user can see directly which layers are loaded within the theme. Maybe there is a way to find a general solution for all plugins to open them while loading a theme explicitly or on startup of the whole application? Would be a nice feature!
Hi,
You can set a parameter called startupTask
in your config.json
file.
For instance, you would like that the plugin LayerTree
is shown when application starts.
...
"startupTask": {"key": "LayerTree"}
...
You should be able to do the same thing with one of the existing plugins (ThemeSwitcher
, MapLegend
, ...).
Documentation (https://qwc-services.github.io/configuration/ViewerConfiguration/#global-settings) says:
startupTask | Task to automatically aktivate on application start, in the format {key: " |
---|
It is effective for the whole application, I think it is not implemented for theme loading.
Regards
Even this issue is closed, I came around another thing regarding this: As the startupTask
is a global configuration parameter, it is not possible at the moment to set these only for desktop or mobile view, right?
The problem here is, that you want to have a tidy mobile interface if possible, and a plugin which covers the whole screen at startup isn't the best thing for that ...
So the best thing would be, to get the change to set this only for desktop view ...
I see two options:
"startupTask": {"mobile": null, "desktop": "FooBar"}
mobile
and desktop
blocks for device-specific configurations, in case there are other settings for which it might be interesting to differentiate.
Hello,
I've been trying for a while to automaticly open the MapLegend when my application starts. This would be nice, since i know most users are to stupid/lazy to open it.
Regards, Johannes