[Qgis-user] QGIS Server - GetLegendGraphics request confusion
Jakob Miksch
jakob.miksch at siticom.de
Tue Oct 17 09:36:02 PDT 2023
Hi,
thanks for your responses. I was relying on the LTR docs before.
I also noticed that GetLegendGraphic also accepts the parameter LAYER (singular) and not only LAYERS (plural), but this was not documented. I opened a PR for this: server: add "LAYER" to allowed parameters for GetLegendGraphic by JakobMiksch · Pull Request #8561 · qgis/QGIS-Documentation (github.com)<https://github.com/qgis/QGIS-Documentation/pull/8561/files>
The usage of LAYERS (plural) in QGIS Server also confused me, since GeoServer, MapServer and so on use the parameter LAYER (singular).
Best regards,
Jakob
Jakob Miksch
Consultant
+49 170 9036956
siticom.online
Von: Etienne Trimaille <etienne.trimaille at gmail.com>
Gesendet: Dienstag, 17. Oktober 2023 10:07
An: Alessandro Pasotti <apasotti at gmail.com>
Cc: Jakob Miksch <jakob.miksch at siticom.de>; qgis-user at lists.osgeo.org
Betreff: Re: [Qgis-user] QGIS Server - GetLegendGraphics request confusion
SECURITY WARNING: This email is from an external source - be careful of attachments and links. Please report suspicious emails to soc at siticom.de<mailto:soc at siticom.de>
Hi,
The documentation was updated a few months ago to follow the OGC specifications.
https://docs.qgis.org/3.28/en/docs/server_manual/services/wms.html#getlegendgraphics
versus
https://docs.qgis.org/testing/en/docs/server_manual/services/wms.html#getlegendgraphic
Le mar. 17 oct. 2023 à 09:27, Alessandro Pasotti via QGIS-User <qgis-user at lists.osgeo.org<mailto:qgis-user at lists.osgeo.org>> a écrit :
Hi,
QGIS server actually accepts both requests:
else if ( QSTR_COMPARE( req, "GetLegendGraphic" ) || QSTR_COMPARE( req, "GetLegendGraphics" ) )
On Mon, Oct 16, 2023 at 6:20 PM Jakob Miksch via QGIS-User <qgis-user at lists.osgeo.org<mailto:qgis-user at lists.osgeo.org>> wrote:
Hi everyone!
I have a QGIS Server running. Requesting the legend of a layer works fine as explained in the docs: 3.2. Web Map Service (WMS) — QGIS Documentation documentation<https://docs.qgis.org/3.28/en/docs/server_manual/services/wms.html#getlegendgraphics>
However, I noticed that in QGIS Server the request must be called “GetLegendGraphics” with a trailing “s”, whereas GeoServer (GetLegendGraphic — GeoServer 2.25.x User Manual<https://docs.geoserver.org/latest/en/user/services/wms/get_legend_graphic/index.html>), MapServer (WMS Server — MapServer 8.0.1 documentation<https://mapserver.org/de/ogc/wms_server.html#getlegendgraphic-request>), deegree and OpenLayers (OpenLayers v8.1.0 API - Class: ImageWMS<https://openlayers.org/en/latest/apidoc/module-ol_source_ImageWMS-ImageWMS.html#getLegendUrl>) expect the request to be called “GetLegendGraphic” WITHOUT the trailing “s”.
Is there a reason why QGIS Server provides legends differently compared to other established geospatial software?
Best regards,
Jakob
[cid:image001.png at 01DA0128.558637B0]
Jakob Miksch
Consultant
+49 170 9036956
siticom.online
siticom GmbH • Werner-von-Siemens-Straße 2-6 • 76646 Bruchsal • Deutschland
Geschäftsführer: Jürgen Hatzipantelis, Stefan Höltken
Sitz der Gesellschaft: Weiterstadt • Amtsgericht Darmstadt • HRB 9276
Umsatzsteuer-ID Nr.: DE 197 925 589
_______________________________________________
QGIS-User mailing list
QGIS-User at lists.osgeo.org<mailto:QGIS-User at lists.osgeo.org>
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
--
Alessandro Pasotti
QCooperative: www.qcooperative.net<https://www.qcooperative.net>
ItOpen: www.itopen.it<http://www.itopen.it>
_______________________________________________
QGIS-User mailing list
QGIS-User at lists.osgeo.org<mailto:QGIS-User at lists.osgeo.org>
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20231017/44908c72/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 14960 bytes
Desc: image001.png
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20231017/44908c72/attachment.png>
More information about the QGIS-User
mailing list