[mapserver-users] Multiple styles in a MapServer WMS Service
Wright, Simon M.
smw at ceh.ac.uk
Tue Jun 7 00:25:41 PDT 2016
Hi Jeff
Many thanks for your reply and the code snippet which I can get to work and display multiple styles in the WMS GetCapabilities document.
However, I'm trying to use the wms_style and wms_style_[style_name]_legendurl_width, _height, _format, and _href syntax to define multiple legends as outlined on the MapServer WMS Server documentation - http://mapserver.org/ogc/wms_server.html - to define multiple styles for pre-generated legend images (specified with the _legendurl_href).
In the layer section of my .map file I have the following parameters defined:
"wms_style" "default"
"wms_style_default_legendurl_width" "226"
"wms_style_default_legendurl_height" "431"
"wms_style_default_legendurl_format" "image/png"
"wms_style_default_legendurl_href" "http://eidc.ceh.ac.uk/administration-folder/tools/wms/987544e0-22d8-11e4-8c21-0800200c9a66/legends/LCM2007_DomTar.png"
"wms_style" "inspire_common:DEFAULT"
"wms_style_inspire_common:DEFAULT_legendurl_width" "226"
"wms_style_inspire_common:DEFAULT_legendurl_height" "431"
"wms_style_inspire_common:DEFAULT_legendurl_format" "image/png"
"wms_style_inspire_common:DEFAULT_legendurl_href" "http://eidc.ceh.ac.uk/administration-folder/tools/wms/987544e0-22d8-11e4-8c21-0800200c9a66/legends/LCM2007_DomTar.png"
However, the GetCapabilities document created by MapServer 7.0.1 only lists one <Style>. Furthermore, it seems that the <Style> given in the GetCapabilities document is the last one specified in the MapServer .map file, in the example .map file code above the inspire_common:DEFAULT style. If I switch the order of the definition of the styles then the default <Style> is listed in the GetCapabilities document.
Should defining the CLASSGROUP and CLASS syntax allow more than one style to be defined in the GetCapabilities, or is this not needed and there is potentially a bug in MapServer for the definition of multiple styles for a WMS?
Many thanks for your help, best wishes, Simon.
________________________________
This message (and any attachments) is for the recipient only. NERC is subject to the Freedom of Information Act 2000 and the contents of this email and any reply you make may be disclosed by NERC unless it is exempt from release under the Act. Any material supplied to NERC may be stored in an electronic records management system.
________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20160607/766f2375/attachment.htm>
More information about the MapServer-users
mailing list