<div dir="auto"><div dir="auto"><br></div><div class="gmail_quote" dir="auto"><div dir="ltr" class="gmail_attr">On Sat, Mar 29, 2025, 2:20 AM Trygve Aspenes via MapServer-users <<a href="mailto:mapserver-users@lists.osgeo.org" target="_blank" rel="noreferrer">mapserver-users@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">Hi all<br>
<br>
I have a Layer with a CLASS STYLE like this<br>
CLASS<br>
NAME "Name of class"<br>
GROUP "groupname"<br>
EXPRESSION ('[var]' >= '0' and '[var]' < '33')<br>
STYLE<br>
SYMBOL [symbol_name]<br>
COLOR "some color"<br>
END<br>
END<br>
<br>
This work fine when requesting GetMap as I get the symbol_name from my <br>
postgis.<br>
<br>
However, when requesting GetLegendGraphics the legend only shows the <br>
name of the class, and not the symbol. I think this is because mapserver <br>
for getlegendgraphics don't have any value for the attribute <br>
symbol_name. If I turn on debugging a request with getlegendgraphics <br>
don't do any queries to the postgis, as expected because <br>
getlegendgraphics request don't contain all the info needed to make a <br>
query to the postgis.<br>
<br>
In documentation for SYMBOL here <br>
<a href="https://mapserver.org/mapfile/style.html#style" rel="noreferrer noreferrer noreferrer" target="_blank">https://mapserver.org/mapfile/style.html#style</a> (almost at the bottom) <br>
the default value of symbol number 0 is only used when a SYMBOL is given <br>
as an integer.<br>
<br>
So, is there a way I can set default value for SYMBOL when this is given <br>
as an attribute to make the symbol show for getlegendgraphics requests?<br>
<br>
Trygve Aspenes<br></blockquote></div><div dir="auto"><br></div><div dir="auto">How many symbol_name do you have?</div><div dir="auto">Could you use KEYIMAGE?</div><div dir="auto"><br></div><div data-smartmail="gmail_signature"><div dir="ltr">Richard W. Greenwood<br><a href="http://www.greenwoodmap.com" target="_blank">www.greenwoodmap.com</a></div></div></div>