[mapserver-users] Hiding the layers contained in a group from the WMS GetCapabilities

Alexandre Saunier alexandre.saunier at camptocamp.com
Thu Oct 20 02:52:19 PDT 2011


Hello,

I would like that only the groups appear in my WMS GetCapabilities
response, not the layers they contain, with Mapserver 6.0.0.

I have tried to add the following metadata:
"wms_enable_request" "!GetCapabilities"
in the layer definition. For instance:

LAYER
  NAME "layer1"
  GROUP "foobar"
  TYPE polygon
  METADATA
    "wms_title" "layer1"
    "wms_group_title" "foobar"
    "wms_enable_request" "!GetCapabilities"
  END
END

It works correctly (*) but when all the layers are removed from the
GetCapabilities, the parent group disappears as well.
Is there a way to keep the group visible in the GetCapabilities even
when all its layers are hidden?

Thanks,
Alexandre

(*) Actually I have noticed weird behaviours when only some of the
group layers are marked "hidden". There's already a ticket about that
issue:
http://trac.osgeo.org/mapserver/ticket/3931



More information about the MapServer-users mailing list