Reputation: 1
How can I remove/disable root layer in WMS service (workspace) where multiple layers are available?
Geoserver allows the user to remove/disable root layer from WMS service in which there is only one layer (this layer is root instead then).
(See 'Root layer in Capabilities' section)
This works fine when you have one layer (screen from QGIS and GetCapabilities response)
But it does not work when you add more layers to the same workspace
Is there any option to remove/disable root layer in WMS service (workspace) serving more than 1 layer?
I've tried also witch modifying specific workspace 'root layer' settings (disabled option 'Always include Root Layer in Capabilities' and cleaned 'title' and 'abstract' field) but with no result..
I'm working on Geoserver ver 2.23.2 installed on remote linux server (Ubuntu 22.04.1)
Upvotes: 0
Views: 266
Reputation: 10976
As far as I know there is only one possible setting in the GeoServer WMS to control top level elements in the capabilities, which is in the WMS Services page, from the manual:
It is also possible to set the flag
Always include Root Layer in capabilities
. This is checked by default, but can be unset so that the root layer is included in capabilities only when there is NOT already a single top level Layer element. This can be useful to allow compatibility with some WMS clients that are not happy with the two or more layer tree levels. This default setting can be overridden at the layer or request level.
If that doesn't solve the issue, you either need to ask for a GeoServer enhancement or try to get the client fixed.
Upvotes: 0