Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WMS parent layer added via QGIS Browser doesn't use default style #45192

Closed
2 tasks done
pathmapper opened this issue Sep 22, 2021 · 2 comments · Fixed by #45209
Closed
2 tasks done

WMS parent layer added via QGIS Browser doesn't use default style #45192

pathmapper opened this issue Sep 22, 2021 · 2 comments · Fixed by #45209
Assignees
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! QGIS Browser WMS data provider

Comments

@pathmapper
Copy link
Contributor

What is the bug or the crash?

WMS parent layer added via QGIS Browser doesn't use default style.

Steps to reproduce the issue

  1. In QGIS Browser, add the following WMS connection: https://alkisservices.krzn.de/WMS_ALKIS_viersen/ALKIS
  2. Open the debug panel to observe the network requests
  3. Add layer Viersen Amtliche Basiskarte 1:2500 via drag and drop to the layers widget
  4. Inspect the GetMap URL, it contains parameter STYLES=gelb but it should be STYLES=

Versions

QGIS version 3.21.0-Master QGIS code revision 8af1fae
Qt version 5.12.8
Python version 3.8.10
GDAL/OGR version 3.0.4
PROJ version 6.3.1
EPSG Registry database version v9.8.6 (2020-01-22)
Compiled against GEOS 3.8.0-CAPI-1.13.1 Running against GEOS 3.8.0-CAPI-1.13.1
SQLite version 3.31.1
PostgreSQL client version 12.8 (Ubuntu 12.8-0ubuntu0.20.04.1)
SpatiaLite version 4.3.0a
QWT version 6.1.4
QScintilla2 version 2.11.2
OS version Ubuntu 20.04.3 LTS
Active Python plugins sagaprovidergrassproviderMetaSearchprocessingdb_manager

Supported QGIS version

  • I'm running a supported QGIS version according to the roadmap.

New profile

  • I tried with a new QGIS profile

Additional context

From the WMS 1.3.0 spec:

7.3.3.4 STYLES

[...]
A client may request the default Style using a null value (as in “STYLES=”).
[...]
If the server advertises several styles for a layer, and the client sends a request for the default style, the choice of
which style to use as default is at the discretion of the server. The ordering of styles in the service metadata does
not indicate which is the default.

From https://alkisservices.krzn.de/WMS_ALKIS_viersen/ALKIS?SERVICE=WMS&REQUEST=GetCapabilities :

image

@pathmapper pathmapper added the Bug Either a bug report, or a bug fix. Let's hope for the latter! label Sep 22, 2021
@elpaso elpaso self-assigned this Sep 22, 2021
@elpaso
Copy link
Contributor

elpaso commented Sep 22, 2021

I think I can fix this, but there is still a different behavior between the browser and the data source manager dialog: in the dialog you have an individual entry for each style while in the browser there isn't. But I guess that it would be a different issue, probably a feature request.

@pathmapper
Copy link
Contributor Author

Just tried the fix, works great, thanks @elpaso 🎉

I guess that it would be a different issue, probably a feature request

I think so too.

domi4484 pushed a commit to domi4484/QGIS that referenced this issue Sep 23, 2021
espinafre pushed a commit to espinafre/QGIS that referenced this issue Sep 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! QGIS Browser WMS data provider
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants