qgis / qwc2-demo-app

QWC2 demo application
Other
241 stars 154 forks source link

External layers are always loaded as active #467

Closed danceb closed 1 year ago

danceb commented 1 year ago

If I open an URL, where external layers are set as inactive with "!", the layers are loaded as active anyway. This works correctly within the demo, but not in my case. I did a fresh pull of the qwc2 and the qwc2-demo-app, but it doesn't changed. What could be the reason for this?

Non-working example: https://kartenportal.jena.de/?l=wms%3Ahttps%3A%2F%2Fmap.jena.de%2Fows%2Fkartenportal%3F%23Ortsteile!&bl=stadtplan&t=kartenportal_kartenportal&c=680999%2C5644001&s=62500

Working example: http://qwc2.sourcepole.ch/?l=wms%3Ahttps%3A%2F%2Fmap.jena.de%2Fows%2Fkartenportal%3F%23Ortsteile!&bl=mapnik&t=qwc_demo&c=1291116%2C6608436&s=200000

manisandro commented 1 year ago

Importing https://kartenportal.jena.de/themes.json into my local qwc2-demo-app it seems to work correctly?

danceb commented 1 year ago

It should not have to do something with the themes and is only related to layers, which are not part of the current theme and are added in addition via the layer import function. These layers are always loaded as active. And yes, it works in the qwc2-demo-app, see the example links above, where I added a WMS layer from our qgis server to your app. So this is not an issue within the demo-app. There it works correctly. I just have no idea where to search for this issue in my application.

danceb commented 1 year ago

I did some more testing. Unlike your case it does not work with a fresh cloned demo app and the master qwc2 in my case. But with the 2023-lts branches of both, the qwc2-app and the qwc2 it actually works! So I tried different commits to find the one, where this issue came from. It is https://github.com/qgis/qwc2/commit/b2aa417b05c1b2068566d65209c174c29e74a4c9 which solved https://github.com/qgis/qwc2-demo-app/issues/453. After this commit the loading of inactive external layers does not work anymore.

manisandro commented 1 year ago

Thanks, should be fixed in the latest qwc2 submodule.