Problem
Problem Summary
I want the response of all the MapServer WMS GetCapabilities requests to not show queryable="1"
in the root layers XML node.
Status Quo
The GetCapabilities response looks like this:
<Layer queryable="1">
<Name>[value of MAP>NAME]</Name>
<Layer queryable="1" opaque="0" cascaded="0">
<Name>[value of MAP>LAYER>NAME]</Name>
The mapfile looks something like this:
MAP
NAME 'SERVICE_NAME'
STATUS ON
SIZE 500 500
UNITS meters
SYMBOLSET '/PATH/TO/SYMBOLS'
FONTSET '/PATH/TO/FONTSET'
MAXSIZE 20000
EXTENT 2513000 5401999 2604000 5501999
PROJECTION
"init=epsg:31466"
END
SHAPEPATH '/PATH/TO/SHAPE/DATA'
OUTPUTFORMAT
NAME png
DRIVER 'AGG/PNG'
MIMETYPE 'image/png'
IMAGEMODE RGBA
EXTENSION 'png'
TRANSPARENT ON
END
LEGEND
IMAGECOLOR 255 255 255
STATUS ON
TRANSPARENT ON
KEYSIZE 18 12
LABEL
TYPE BITMAP
SIZE MEDIUM
COLOR 0 0 89
END
END
WEB
// ...
METADATA
// ...
END
END
// Now the layers
END
Desired State
The response should look like this:
<Layer>
<Name>[value of MAP>NAME]</Name>
<Layer queryable="1" opaque="0" cascaded="0">
<Name>[value of MAP>LAYER>NAME]</Name>
Additional Context
- Debian Buster
- MapServer v7.2.2
<!-- MapServer version 7.2.2 OUTPUT=PNG OUTPUT=JPEG OUTPUT=KML SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=CAIRO SUPPORTS=SVG_SYMBOLS SUPPORTS=RSVG SUPPORTS=ICONV SUPPORTS=FRIBIDI SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=SOS_SERVER SUPPORTS=FASTCGI SUPPORTS=THREADS SUPPORTS=GEOS SUPPORTS=PBF INPUT=JPEG INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE -->
Question
How can I disable the queryable
attribute as default for root layers?
My research
When I tried to find the options in the documentation all I found was "To be queryable, each mapfile LAYER must have a TEMPLATE defined, or each CLASS within the LAYER must have a TEMPLATE defined." Introduction to MapServer. This does however not mention how to influence the behaviour of the root layer.
This behavior seems to have changed from the version used in Debian Stretch to v7.2.2. I would usually not care, but I have follow up problems due to this attribute and they did not exist in the previous version.
NAME ''
.'wms_rootlayer_name' ''
as described in WMS Server Docs. The docs are generally talking about the root layer though and not espacially about the queryable attribute. The result is as I wanted it in my Question, the layer is still listed, but the queryable attribute is gone.