Skip to main content
Replaced incorrect title word and made introduction more clear
Source Link

In a WMS GetCapabilities requestresponse, is <Layer> allowed multiple times directly within <Capability>?

I'm using ODC OWS to serve rasters from our datacube via WMS. I configured the layers hierarchically but not with a single root and this displays perfectly fine in QGIS:

QGIS screenshot

Then I wanted to use the same WMS in a web app with OpenLayers, so I used its WMSCapabilities class to read the GetCapabilities request. Unexpectedly, only the last group of layers was displayed there, as the top-most Layer property is an object, not an array:

JS console screenshot

(Further down in the hierarchy, there are Layers that are arrays, so in principle this concept is known there.)

Is this a bug in OpenLayers?

In other words: Is this layout a valid GetCapabilities response?

<WMS_Capabilities version="1.3.0">
<Service>...</Service>
<Capability>
  <Request>...</Request>
  <Exception>...</Exception>
  <Layer>...</Layer>
  <Layer>...</Layer>
</Capability>
</WMS_Capabilities>

In a WMS GetCapabilities request, is <Layer> allowed multiple times directly within <Capability>?

I'm using ODC OWS to serve rasters from our datacube via WMS. I configured the layers hierarchically and this displays perfectly fine in QGIS:

QGIS screenshot

Then I wanted to use the same WMS in a web app with OpenLayers, so I used its WMSCapabilities class to read the GetCapabilities request. Unexpectedly, only the last group of layers was displayed there, as the top-most Layer property is an object, not an array:

JS console screenshot

(Further down in the hierarchy, there are Layers that are arrays, so in principle this concept is known there.)

Is this a bug in OpenLayers?

In other words: Is this layout a valid GetCapabilities response?

<WMS_Capabilities version="1.3.0">
<Service>...</Service>
<Capability>
  <Request>...</Request>
  <Exception>...</Exception>
  <Layer>...</Layer>
  <Layer>...</Layer>
</Capability>
</WMS_Capabilities>

In a WMS GetCapabilities response, is <Layer> allowed multiple times directly within <Capability>?

I'm using ODC OWS to serve rasters from our datacube via WMS. I configured the layers hierarchically but not with a single root and this displays perfectly fine in QGIS:

QGIS screenshot

Then I wanted to use the same WMS in a web app with OpenLayers, so I used its WMSCapabilities class to read the GetCapabilities request. Unexpectedly, only the last group of layers was displayed there, as the top-most Layer property is an object, not an array:

JS console screenshot

(Further down in the hierarchy, there are Layers that are arrays, so in principle this concept is known there.)

Is this a bug in OpenLayers?

In other words: Is this layout a valid GetCapabilities response?

<WMS_Capabilities version="1.3.0">
<Service>...</Service>
<Capability>
  <Request>...</Request>
  <Exception>...</Exception>
  <Layer>...</Layer>
  <Layer>...</Layer>
</Capability>
</WMS_Capabilities>
Became Hot Network Question
Added minimal example
Source Link

I'm using ODC OWS to serve rasters from our datacube via WMS. I configured the layers hierarchically and this displays perfectly fine in QGIS:

QGIS screenshot

Then I wanted to use the same WMS in a web app with OpenLayers, so I used its WMSCapabilities class to read the GetCapabilities request. Unexpectedly, only the last group of layers was displayed there, as the top-most Layer property is an object, not an array:

JS console screenshot

(Further down in the hierarchy, there are Layers that are arrays, so in principle this concept is known there.)

Is this a bug in OpenLayers?

In other words: Is this layout a valid GetCapabilities response?

<WMS_Capabilities version="1.3.0">
<Service>...</Service>
<Capability>
  <Request>...</Request>
  <Exception>...</Exception>
  <Layer>...</Layer>
  <Layer>...</Layer>
</Capability>
</WMS_Capabilities>

I'm using ODC OWS to serve rasters from our datacube via WMS. I configured the layers hierarchically and this displays perfectly fine in QGIS:

QGIS screenshot

Then I wanted to use the same WMS in a web app with OpenLayers, so I used its WMSCapabilities class to read the GetCapabilities request. Unexpectedly, only the last group of layers was displayed there, as the top-most Layer property is an object, not an array:

JS console screenshot

(Further down in the hierarchy, there are Layers that are arrays, so in principle this concept is known there.)

Is this a bug in OpenLayers?

I'm using ODC OWS to serve rasters from our datacube via WMS. I configured the layers hierarchically and this displays perfectly fine in QGIS:

QGIS screenshot

Then I wanted to use the same WMS in a web app with OpenLayers, so I used its WMSCapabilities class to read the GetCapabilities request. Unexpectedly, only the last group of layers was displayed there, as the top-most Layer property is an object, not an array:

JS console screenshot

(Further down in the hierarchy, there are Layers that are arrays, so in principle this concept is known there.)

Is this a bug in OpenLayers?

In other words: Is this layout a valid GetCapabilities response?

<WMS_Capabilities version="1.3.0">
<Service>...</Service>
<Capability>
  <Request>...</Request>
  <Exception>...</Exception>
  <Layer>...</Layer>
  <Layer>...</Layer>
</Capability>
</WMS_Capabilities>
Source Link

In a WMS GetCapabilities request, is <Layer> allowed multiple times directly within <Capability>?

I'm using ODC OWS to serve rasters from our datacube via WMS. I configured the layers hierarchically and this displays perfectly fine in QGIS:

QGIS screenshot

Then I wanted to use the same WMS in a web app with OpenLayers, so I used its WMSCapabilities class to read the GetCapabilities request. Unexpectedly, only the last group of layers was displayed there, as the top-most Layer property is an object, not an array:

JS console screenshot

(Further down in the hierarchy, there are Layers that are arrays, so in principle this concept is known there.)

Is this a bug in OpenLayers?