qgis / qwc2-demo-app

QWC2 demo application
Other
240 stars 149 forks source link

styles of multi style layers are not initially loaded in qwc2 app #527

Closed danceb closed 4 months ago

danceb commented 4 months ago

While starting the qwc2 app with yarn start the themes.json is configured properly and the styles are listed there. But in the map the layers could not be rendered, as the STYLES parameter within the getMap request looks something like:

STYLES=name,name,

I think, the app does not know, which style should be loaded by default (the first one?).

If I am applying a style manually in the respective layer by clicking its entry the map is rendered correctly afterwards.

manisandro commented 4 months ago

The themesConfig scripts have

layerEntry.style = layerEntry.styles.default ? 'default' : (Object.keys(layerEntry)[0] ?? '');

I.e. the default layer style is default is such a style exists, otherwise the first available entry, if any, or empty. What does your themes.json look like? Does it have sane values for style and styles?

danceb commented 4 months ago

I have tried it with some other WMS as theme and there it works. So I have to find the issue in the QGIS project itself or the repsective configuration.