<div dir="ltr"><div>Hi,<br></div><div>The documentation was updated a few months ago to follow the OGC specifications.</div><div><a href="https://docs.qgis.org/3.28/en/docs/server_manual/services/wms.html#getlegendgraphics">https://docs.qgis.org/3.28/en/docs/server_manual/services/wms.html#getlegendgraphics</a></div><div>versus<br></div><div><a href="https://docs.qgis.org/testing/en/docs/server_manual/services/wms.html#getlegendgraphic">https://docs.qgis.org/testing/en/docs/server_manual/services/wms.html#getlegendgraphic</a></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le mar. 17 oct. 2023 à 09:27, Alessandro Pasotti via QGIS-User <<a href="mailto:qgis-user@lists.osgeo.org">qgis-user@lists.osgeo.org</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Hi,</div><div><br></div><div>QGIS server actually accepts both requests:</div><div><br></div><div>else if ( QSTR_COMPARE( req, "GetLegendGraphic" ) || QSTR_COMPARE( req, "GetLegendGraphics" ) )</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Oct 16, 2023 at 6:20 PM Jakob Miksch via QGIS-User <<a href="mailto:qgis-user@lists.osgeo.org" target="_blank">qgis-user@lists.osgeo.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>





<div lang="DE">
<div>
<p class="MsoNormal">Hi everyone!<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><span lang="EN-US">I have a QGIS Server running. Requesting the legend of a layer works fine as explained in the docs:
</span><a href="https://docs.qgis.org/3.28/en/docs/server_manual/services/wms.html#getlegendgraphics" target="_blank"><span lang="EN-US">3.2. Web Map Service (WMS) — QGIS Documentation documentation</span></a><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">However, I noticed that in QGIS Server the request must be called “GetLegendGraphics” with a trailing “s”, whereas GeoServer (</span><a href="https://docs.geoserver.org/latest/en/user/services/wms/get_legend_graphic/index.html" target="_blank"><span lang="EN-US">GetLegendGraphic
 — GeoServer 2.25.x User Manual</span></a><span lang="EN-US">), MapServer (</span><a href="https://mapserver.org/de/ogc/wms_server.html#getlegendgraphic-request" target="_blank"><span lang="EN-US">WMS Server — MapServer 8.0.1 documentation</span></a><span lang="EN-US">), deegree
 and OpenLayers (</span><a href="https://openlayers.org/en/latest/apidoc/module-ol_source_ImageWMS-ImageWMS.html#getLegendUrl" target="_blank"><span lang="EN-US">OpenLayers v8.1.0 API - Class: ImageWMS</span></a><span lang="EN-US">) expect the request to be called “GetLegendGraphic”
 WITHOUT the trailing “s”. <u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">Is there a reason why QGIS Server provides legends differently compared to other established geospatial software?<br>
<br>
Best regards,<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">Jakob<u></u><u></u></span></p>
</div>
<table style="border-width:medium;border-style:none;border-color:initial;font-family:Helvetica;width:660px" cellspacing="0" cellpadding="0" border="0"><tbody><tr style="height:79.15pt"><td style="height:79.15pt;width:183.9pt" width="150" valign="bottom"><p class="MsoNormal" style="margin-bottom:0pt;font-size:10pt;line-height:normal"><a id="m_-2441184969528843388m_-8485634834196199538_Hlk528656578" name="m_-2441184969528843388_m_-8485634834196199538__Hlk528656578"><span style="font-size:10.5pt"></span></a> <br> <img src="cid:18b3c87a24663216a6f1" id="m_-2441184969528843388m_-84856348341961995380.veaxdfz7gks" style="font-size: 1rem; width: 198px; height: 91px;" width="198" height="91" border="0"><br></p><p class="MsoNormal" style="margin-bottom:0pt;font-size:10pt;line-height:normal"><span style="font-size:8pt"></span></p><span style="font-size:10.5pt"></span><span style="font-size:10pt"><span style="font-size:10pt"></span><span style="font-size:10pt"></span></span></td><td style="height:79.15pt;width:397.9pt;text-align:left" width="531" valign="middle"><p class="MsoNormal" style="margin:0cm 0cm 0pt 3.65pt;font-size:10pt;line-height:normal"><span style="font-size:10pt"><span style="font-weight:bolder;font-size:10pt"><span style="font-size:10pt;color:rgb(0,159,227)"><span style="color:rgb(3,151,255)"><span style="font-size:11pt">Jakob Miksch</span></span></span></span></span><span style="font-size:10pt"><span style="font-size:10pt"><span style="color:rgb(3,151,255)"><span style="font-size:11pt"><br style="font-size:11pt"></span></span></span></span><span style="font-size:10pt"><span style="font-weight:bolder"><font style="font-size:10pt" color="#000000">Consultant</font><br style="font-size:10pt"></span><br style="font-size:10pt"></span><span style="font-size:13.3333px">+49 170 9036956<br><font color="#00B0F0"><span style="font-size:10pt;color:rgb(0,0,0)">siticom.online</span></font></span></p></td></tr><tr style="height:36.05pt"><td colspan="1" style="height:36.05pt;width:183.9pt;padding:0cm 5.4pt" width="776" valign="bottom"><p style="font-size:8pt;text-align:justify"><span style="font-size:8pt"><span style="font-size:8pt;color:rgb(0,176,240)"><br><br></span></span></p></td><td style="padding:0px 0px 0px 5px;line-height:1"><span style="font-size:6pt">siticom GmbH • Werner-von-Siemens-Straße 2-6 • 76646 Bruchsal • Deutschland<br>Geschäftsführer: Jürgen Hatzipantelis, Stefan Höltken<br>Sitz der Gesellschaft: Weiterstadt • Amtsgericht Darmstadt • HRB 9276<br>Umsatzsteuer-ID Nr.: DE 197 925 589</span></td></tr></tbody></table><p><br></p>


<p style="font-size:10pt;font-family:Arial"></p><span style="font-size:10pt;font-family:Arial"><span style="font-family:Arial"><span style="font-family:Arial">
<div style="font-family:Arial">
<span style="font-family:Arial">
    <p style="font-size:10pt;font-family:Arial"></p></span></div></span></span></span></div>

_______________________________________________<br>
QGIS-User mailing list<br>
<a href="mailto:QGIS-User@lists.osgeo.org" target="_blank">QGIS-User@lists.osgeo.org</a><br>
List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
</div></blockquote></div><br clear="all"><br><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div>Alessandro Pasotti</div><div>QCooperative:  <a href="https://www.qcooperative.net" target="_blank">www.qcooperative.net</a><br></div>ItOpen:   <a href="http://www.itopen.it" target="_blank">www.itopen.it</a></div></div>
_______________________________________________<br>
QGIS-User mailing list<br>
<a href="mailto:QGIS-User@lists.osgeo.org" target="_blank">QGIS-User@lists.osgeo.org</a><br>
List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
</blockquote></div>