Merge pull request #11502 from jbelien/wmscapabilities/singlelayer

Fix issue with WMS Capabilities containing a single layer
This commit is contained in:
Andreas Hocevar
2020-09-10 19:27:18 +02:00
committed by GitHub
3 changed files with 190 additions and 1 deletions

View File

@@ -407,7 +407,13 @@ function readException(node, objectStack) {
* @return {Object|undefined} Layer object.
*/
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;
}
/**