[mapserver-users] Named WMS styles - CLASSGROUP and GROUP

lars.schylberg at blixtmail.se lars.schylberg at blixtmail.se
Fri May 29 07:15:27 PDT 2015


Thanks for the input Andreas,

Yes, your aproach works and might be  part of the solution.  I think that You are right about that WMS styles  are intended be used with LAYER.GROUP.

What makes me wonder is the statement in the INSPIRE section of Mapserver manual about the root layer.

http://mapserver.org/ogc/inspire.html#style-section-for-root-layer-and-possibly-existing-group-layers
-----

The following method is implemented to support (customizable) style sections in the root layer:

 - use wms_style_name in the WEB.METADATA section to add a style section to the root layer
 - use wms_style_title to override the style title (optional)
 - use wms_style_legendurl_* to override width, heigth, format and href of the legendURL (optional)
and possibly existing group layers:

 - use wms_group_style_name in the first corresponding LAYER.METADATAsection to add a style section to the group layer----
Is that only valid when INSPIRE support has been activated?
Or could this be achieved with regular mapserver conf.  

When  I specify "wms_style_name" "grey" or "color" in the WEB.METADATA section it seems to accept that I have a root level style but it is not using it.
But I can only specify one.

Specifying wms_group_style_name in LAYER.METADATA seems to do nothing. So I have no way to specify the other possible style.

I have tried both with Mapserver 6.4.1 and 7.0beta.  I have also tried both WMS 1.1.1 and 1.3.0.
My real use case is 150 - 300 layers and 3-7 groups.

Thanks again,

Lars Schylberg

-----Originalmeddelande----- 
> Från: "Eichner, Andreas - SID" <Andreas.Eichner at sid.sachsen.de> 
> Till: lars.schylberg at blixtmail.se, mapserver-users at lists.osgeo.org 
> Datum: 2015-05-29 10:51 
> Ämne: AW: [mapserver-users] Named WMS styles - CLASSGROUP and GROUP 
> 
> Have you tried using GROUP "ST" instead of wms_layer_group metadata? This seems to be the intended way to create a named group that can be requested. There seems to be no way to declare styles at group (or root) level. Requesting the group "ST" with style "grey" or "color" works but clients might be confused if the capabilities advertise a style at each leaf layer but none at group level.
> 
> Changing your mapfile to
> 
> LAYER
>      NAME "circle"
>      GROUP "ST"
>      METADATA
>           # "wms_layer_group" "/ST/circles"
> ...
> 
> LAYER
>      NAME "square"
>      GROUP "ST"
>      METADATA
>           # "wms_layer_group" "/ST/squares"
> 
> At least allows requesting the group "ST" with style color or grey:
>      "...&layers=ST&styles=grey&..." or "...&layers=ST&styles=color&..."
> and requesting each single leaf layer:
>      "...&layers=circle,square&styles=color,grey&..."
> 
> HTH
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20150529/22b50100/attachment.html>


More information about the mapserver-users mailing list