3liz / lizmap-web-client

Transfer a QGIS project on a server, Lizmap is providing the web interface to browse it
https://www.lizmap.com
Mozilla Public License 2.0
260 stars 143 forks source link

[Question]: Is there a way to configure WMS version for third party WMS layers? #4972

Open RaineEkman opened 2 days ago

RaineEkman commented 2 days ago

What is the question? (in English)

In my project there is a layer configured using the "Get images directly from WMS Server" checkbox. It won't show in the web client, and I can see in my browser dev tools that WMS 1.3.0 is tried. However, when I try manually any of the WMS 1.3.0 URLs I can see, I get this, indicating that the server doesn't support WMS 1.3.0:

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE ServiceExceptionReport SYSTEM "http://schemas.opengis.net/wms/1.1.1/exception_1_1_1.dtd">
<ServiceExceptionReport version="1.1.1">
 <ServiceException>Unsupported WMS version</ServiceException>
</ServiceExceptionReport>

QGIS Desktop loads the layer fine, and checking it I can see that the URLs are WMS 1.1.1. I can't find a way in the Lizmap plugin to configure the version as 1.1.1. Should this even be possible or is only 1.3.0 supported?

Versions, safeguards, check summary etc

Server startup: qgisserver 1.9.3rc0 (build 202411110425, commit feca61f) QGIS 3.34.12-Prizren 'Prizren' (eeb6af36386) QGIS code revision eeb6af36386 Qt version 5.15.13 Python version 3.12.3 GDAL/OGR version 3.8.4 PROJ version 9.4.0 EPSG Registry database version v11.004 (2024-02-24) GEOS version 3.12.1-CAPI-1.18.1 SQLite version 3.45.1 OS Ubuntu 24.04.1 LTS

Plugin: Versions :

List of Lizmap Web Client modules :
* Version Lizmap Web Client 3.8 needed
List of safeguards :
* Mode : normal
* Allow parent folder : no
* Prevent other drive : yes
* Prevent PG service : yes
* Prevent PG Auth DB : yes
* Force PG user&pass : yes
* Prevent ECW : yes

Check Lizmap plugin

Operating system

Windows 11

Browsers

Microsoft Edge

Browsers version

Microsoft Edge Version 130.0.2849.80 (Official build) (64-bit)

Relevant log output

Lizmap Web Client application error log file: empty
Gustry commented 2 days ago

Can you check in your QGS file all occurences of the URL of your WMS to see if the VERSION is included in it ?

Gustry commented 2 days ago

Well, there are a few area where 1.3.0 is hardcoded : https://github.com/search?q=repo%3A3liz%2Flizmap-web-client%201.3.0&type=code

RaineEkman commented 1 day ago

Can you check in your QGS file all occurences of the URL of your WMS to see if the VERSION is included in it ?

I tweaked the server settings in QGIS:

The version number went into both copies of the URL in the .qgs file. Now I get URLs with double version numbers in the web client: https://<redacted>/TeklaOGCWeb/WMS.ashx?VERSION=1.1.1&REQUEST=GetMap&SERVICE=WMS&VERSION=1.3.0&FORMAT=image%2Fpng&STYLES=&TRANSPARENT=true&LAYERS=<redacted>&DPI=135&TILED=true&WIDTH=384&HEIGHT=384&CRS=EPSG%3A3067&BBOX=<redacted>

Some hardcoded version number should probably be replaced by something more flexible/smarter.

Gustry commented 14 hours ago

It's not just the version number in the HTTP call, but mainly parameters and response that should bec checked.