<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:Helvetica;
        panose-1:2 11 6 4 2 2 2 2 2 4;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
span.gmailsignatureprefix
        {mso-style-name:gmail_signature_prefix;}
span.E-MailFormatvorlage21
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;
        mso-ligatures:none;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="DE" link="blue" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">Hi, <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">thanks for your responses. I was relying on the LTR docs before.
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">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:
</span><a href="https://github.com/qgis/QGIS-Documentation/pull/8561/files"><span lang="EN-US">server: add "LAYER" to allowed parameters for GetLegendGraphic by JakobMiksch · Pull Request #8561 · qgis/QGIS-Documentation (github.com)</span></a><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span lang="EN-US">The usage of LAYERS (plural) in QGIS Server also confused me, since GeoServer, MapServer and so on use the parameter LAYER (singular).<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Best regards,<br>
Jakob</span><span lang="EN-US" style="mso-fareast-language:EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<table class="MsoTableGrid" cellspacing="0" cellpadding="0" border="0" style="border-width: medium; border-style: none; border-color: initial; width: 660px;"><tbody><tr style="height: 79.15pt;"><td valign="middle" width="531" style="height: 79.15pt; width: 397.9pt;"><p class="MsoNormal" style="margin: 0cm 0cm 0pt 3.65pt; font-size: 10pt; line-height: normal;"><span style="font-size: 10pt; color: rgb(0, 159, 227);"><span style="font-weight: bolder; font-size: 10pt;"><span style="font-size: 10pt;"><span style="color: rgb(3, 151, 255);"><span style="font-family: Helvetica;"><span style="font-size: 11pt;">Jakob</span></span></span><span style="color: rgb(3, 151, 255); font-family: Helvetica;"><span style="font-size: 11pt;"> Miksch</span></span></span></span></span><span style="font-size: 10pt; font-family: Helvetica;"><span style="font-size: 10pt;"><span style="color: rgb(3, 151, 255);"><br style="font-size: 10pt;"></span></span></span><span style="font-size: 10pt;"><font color="#000000" style="font-size: 10pt; font-family: Helvetica;"><span style="font-weight: bolder;">Consultant</span></font><br style="font-size: 10pt; font-family: Helvetica;"><br style="font-size: 10pt; font-family: Helvetica;"><span style="font-family: Helvetica;">+49 170 9036956<br>siticom.online</span><span style="font-size: 10pt;"></span><span style="font-size: 10pt;"><span style="font-size: 10pt;"><span style="font-size: 10pt;"></span></span></span></span></p></td></tr></tbody></table><p><br></p><div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b>Von:</b> Etienne Trimaille <etienne.trimaille@gmail.com> <br>
<b>Gesendet:</b> Dienstag, 17. Oktober 2023 10:07<br>
<b>An:</b> Alessandro Pasotti <apasotti@gmail.com><br>
<b>Cc:</b> Jakob Miksch <jakob.miksch@siticom.de>; qgis-user@lists.osgeo.org<br>
<b>Betreff:</b> Re: [Qgis-user] QGIS Server - GetLegendGraphics request confusion<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" align="left" width="100%" style="width:100.0%">
<tbody>
<tr>
<td style="background:#FFB900;padding:5.0pt 2.0pt 5.0pt 2.0pt">
<p class="MsoNormal" style="mso-element:frame;mso-element-frame-hspace:2.25pt;mso-element-wrap:around;mso-element-anchor-vertical:paragraph;mso-element-anchor-horizontal:column;mso-height-rule:exactly">
<span style="color:black"> </span><o:p></o:p></p>
</td>
<td width="100%" style="width:100.0%;background:#FFF8E5;padding:5.0pt 4.0pt 5.0pt 12.0pt">
<div>
<p class="MsoNormal" style="mso-element:frame;mso-element-frame-hspace:2.25pt;mso-element-wrap:around;mso-element-anchor-vertical:paragraph;mso-element-anchor-horizontal:column;mso-height-rule:exactly">
<b><span style="color:#222222">SECURITY WARNING:</span></b><span style="color:#222222"> This email is from an external source - be careful of attachments and links. Please report suspicious emails to
<a href="mailto:soc@siticom.de">soc@siticom.de</a> <o:p></o:p></span></p>
</div>
</td>
</tr>
</tbody>
</table>
<p> <o:p></o:p></p>
<div>
<div>
<div>
<p class="MsoNormal">Hi,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">The documentation was updated a few months ago to follow the OGC specifications.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><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><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">versus<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><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><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">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 :<o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<div>
<div>
<p class="MsoNormal">Hi,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">QGIS server actually accepts both requests:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">else if ( QSTR_COMPARE( req, "GetLegendGraphic" ) || QSTR_COMPARE( req, "GetLegendGraphics" ) )<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">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:<o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<div>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Hi everyone!<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><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><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><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”. </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US">Is there a reason why QGIS Server provides legends differently compared to other established geospatial software?<br>
<br>
Best regards,</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US">Jakob</span><o:p></o:p></p>
</div>
<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" width="660" style="width:495.0pt;border-color:initial">
<tbody>
<tr style="height:79.15pt">
<td width="245" valign="bottom" style="width:183.9pt;padding:0cm 0cm 0cm 0cm;height:79.15pt">
<p class="MsoNormal" style="mso-margin-top-alt:auto"><a name="m_-2441184969528843388_m_-84856348341961"></a><span style="font-size:10.0pt;font-family:"Helvetica",sans-serif"> <br>
 <img border="0" width="198" height="91" style="width:2.0625in;height:.9479in" id="m_-2441184969528843388m_-84856348341961995380.veaxdfz7gks" src="cid:image001.png@01DA0128.558637B0"><o:p></o:p></span></p>
</td>
<td width="531" style="width:397.9pt;padding:0cm 0cm 0cm 0cm;height:79.15pt">
<p class="MsoNormal" style="margin-left:3.65pt"><b><span style="font-family:"Helvetica",sans-serif;color:#0397FF">Jakob Miksch</span></b><span style="font-family:"Helvetica",sans-serif;color:#0397FF"><br>
</span><b><span style="font-size:10.0pt;font-family:"Helvetica",sans-serif;color:black">Consultant</span></b><b><span style="font-size:10.0pt;font-family:"Helvetica",sans-serif"><br>
</span></b><span style="font-size:10.0pt;font-family:"Helvetica",sans-serif"><br>
+49 170 9036956<br>
<span style="color:black">siticom.online</span><o:p></o:p></span></p>
</td>
</tr>
<tr style="height:36.05pt">
<td width="245" valign="bottom" style="width:183.9pt;padding:0cm 5.4pt 0cm 5.4pt;height:36.05pt">
</td>
<td style="padding:0cm 0cm 0cm 3.75pt;height:36.05pt">
<p class="MsoNormal"><span style="font-size:6.0pt;font-family:"Helvetica",sans-serif">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><span style="font-family:"Helvetica",sans-serif"><o:p></o:p></span></p>
</td>
</tr>
</tbody>
</table>
<p><o:p> </o:p></p>
</div>
<p class="MsoNormal">_______________________________________________<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" target="_blank">
https://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" target="_blank">
https://lists.osgeo.org/mailman/listinfo/qgis-user</a><o:p></o:p></p>
</div>
</blockquote>
</div>
<p class="MsoNormal"><br clear="all">
<br>
<span class="gmailsignatureprefix">-- </span><o:p></o:p></p>
<div>
<div>
<div>
<p class="MsoNormal">Alessandro Pasotti<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">QCooperative:  <a href="https://www.qcooperative.net" target="_blank">
www.qcooperative.net</a><o:p></o:p></p>
</div>
<p class="MsoNormal">ItOpen:   <a href="http://www.itopen.it" target="_blank">www.itopen.it</a><o:p></o:p></p>
</div>
</div>
<p class="MsoNormal">_______________________________________________<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" target="_blank">
https://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" target="_blank">
https://lists.osgeo.org/mailman/listinfo/qgis-user</a><o:p></o:p></p>
</blockquote>
</div>
</div>
</div>
</body>
</html>