qgis / qwc2-demo-app

QWC2 demo application
Other
240 stars 149 forks source link

External WMS as URL params error when no url encoding #547

Closed cazitouni closed 2 months ago

cazitouni commented 2 months ago

When passing an external wms as an url parameters using l=, it returns an error if the external layer is not url encoded.

For example, if I use the layer described in the documentation :

wms:https://wms.geo.admin.ch/?#ch.are.bauzonen

It'll return the following error :

Impossible de trouver les couches suivantes: wms:https://wms.geo.admin.ch/?.

But if I url encode it like :

wms%3Ahttps%3A%2F%2Fwms.geo.admin.ch%2F%3F%23ch.are.bauzonen

It'll work no problem.

I would like to know if it's a normal behavior or a bug.

Thanks in advance for your answer, Kind regards, Clément.

manisandro commented 2 months ago

You definitely need to url encode the value.