Update WMSCapabilities.js
Fix issue when there only one single layer.
This commit is contained in:
@@ -407,7 +407,13 @@ function readException(node, objectStack) {
|
|||||||
* @return {Object|undefined} Layer object.
|
* @return {Object|undefined} Layer object.
|
||||||
*/
|
*/
|
||||||
function readCapabilityLayer(node, objectStack) {
|
function readCapabilityLayer(node, objectStack) {
|
||||||
return pushParseAndPop({}, LAYER_PARSERS, node, objectStack);
|
const layerObject = pushParseAndPop({}, LAYER_PARSERS, node, objectStack);
|
||||||
|
|
||||||
|
if (layerObject.Layer === undefined) {
|
||||||
|
return Object.assign(layerObject, readLayer(node, objectStack));
|
||||||
|
}
|
||||||
|
|
||||||
|
return layerObject;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user