<div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small"><br></div><div class="gmail_extra"><br><div class="gmail_quote">2015-08-03 15:55 GMT+02:00 Rahkonen Jukka (MML) <span dir="ltr"><<a href="mailto:jukka.rahkonen@maanmittauslaitos.fi" target="_blank">jukka.rahkonen@maanmittauslaitos.fi</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
<br>
I am not sure if HTML legends really work with WMS. The demo site that is mentioned in the html legend manual page must support html legends.<br>
<a href="http://demo.mapserver.org/cgi-bin/mapserv?map=%2Fosgeo%2Fmapserver%2Fitasca_legend%2Fmap%2Fitasca1.map&layers=all&zoomsize=2&zoomdir=1&map_size=600+400" rel="noreferrer" target="_blank">http://demo.mapserver.org/cgi-bin/mapserv?map=%2Fosgeo%2Fmapserver%2Fitasca_legend%2Fmap%2Fitasca1.map&layers=all&zoomsize=2&zoomdir=1&map_size=600+400</a><br>
<br>
However, I could not find any way for reading the html legend through WMS. Format image/png does work for me<br>
<a href="http://demo.mapserver.org/cgi-bin/mapserv?map=%2Fosgeo%2Fmapserver%2Fitasca_legend%2Fmap%2Fitasca1.map&service=wms&version=1.1.1&request=getlegendgraphic&layer=ctyrdln3&format=image/png" rel="noreferrer" target="_blank">http://demo.mapserver.org/cgi-bin/mapserv?map=%2Fosgeo%2Fmapserver%2Fitasca_legend%2Fmap%2Fitasca1.map&service=wms&version=1.1.1&request=getlegendgraphic&layer=ctyrdln3&format=image/png</a><br>
<br>
The site is advertising these formats for GetLegendGraphic, notice that html does not appear on the list even the service itself does support html legends if  they are read with native Mapserver methods:<br>
<br>
<GetLegendGraphic><br>
      <Format>image/gif</Format><br>
      <Format>image/png</Format><br>
      <Format>image/png; mode=24bit</Format><br>
      <Format>image/jpeg</Format><br>
      <Format>image/vnd.wap.wbmp</Format><br>
<br>
I also tested the effect of adding this WEB object metadata item into some of our Mapserver 7.0 RC1 services:<br>
"wms_getlegendgraphic_formatlist" "text/html"<br></blockquote><div><br></div><div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">​The WMS request is the same my webapp (geomoose) is actually doing and which "fails" in returning html legend​.</div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
This change does not have any effect on the advertised GetLegendGraphic formats of our server. They are always<br>
<br>
<Format>image/png</Format><br>
<Format>image/jpeg</Format><br>
<Format>image/gif</Format><br>
<Format>image/png; mode=8bit</Format><br>
<br>
However, if I use "wms_getlegendgraphic_formatlist" "image/jpeg" then I can't read the legend as image/png even it does still show in GetCapabilities. So this setting works with the image formats as described in the documentation but there is a bug because the setting does not reflect to GetCapabilities.<br>
<br>
When it comes to top posting, I always top post but I also try to include some useful information into my mails for compensating the irritation. And I know that bottom posting is irritating at least as many people as top posting. I apologize also that my mail program does poor job with quoting previous mails.<br></blockquote><div><br></div><div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">​I am not irritated, it's just a matter of logic and top posting simply doesn't work for conversation sequencing.</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">;-)​</div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Regards,<br>
<div class="HOEnZb"><div class="h5"><br>
-Jukka Rahkonen-<br><br>
</div></div></blockquote></div><br></div></div>