[mapserver-users] Setting wms_getlegendgraphic_formatlist does not alter GetCapabilities
Rahkonen Jukka (MML)
jukka.rahkonen at maanmittauslaitos.fi
Mon Aug 3 07:57:45 PDT 2015
Hi,
It seems that setting the WEB metadata object "wms_getlegendgraphic_formatlist" as described in http://mapserver.org/ogc/wms_server.html does not change the list of advertised GetLegendGraphic formats in GetCapabilities.
For example, if I set that only image/jpeg is supported my GetCapabilities is still showing the default list which is
<Format>image/png</Format>
<Format>image/jpeg</Format>
<Format>image/gif</Format>
<Format>image/png; mode=8bit</Format>
Setting works as supposed for me and GetLegendGraphic succeeds only with image/jpeg but clients can't know that other formats do nor work because they are still advertised. . The "LegendURL" elements are not changed to suit the wms_getlegendgraphic_formatlist but the default image/png format is still advertised for all the layers in this way:
LegendURL width="95" height="21"><Format>image/png</Format><OnlineResource xlink:type="simple" xlink:href="http://server.fi/cgi-bin/test?version=1.3.0&service=WMS&request=GetLegendGraphic&sld_version=1.1.0&layer=test_layer&format=image/png&STYLE=default"/>
I think that LegendURL should take the first format from the wms_getlegendgraphic_formatlist if it is set.
I have only Mapserver 7.0 RC installed and It would be nice if someone who runs released 7.0 could confirm the issue before I make a bug report. Testing is easy: by just adding into any properly configured WMS mapfile this line into MAP-WEB level:
"wms_getlegendgraphic_formatlist" "image/jpeg"
and then check the GetCapabilities.
-Jukka Rahkonen-
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20150803/bb97a952/attachment.htm>
More information about the MapServer-users
mailing list