Skip to content
Permalink
Browse files

OWS Service / do not break on id/metadata match when looking up layer

Sometimes several Layer objects can be pointed to the same metadata record,
as such breaking right after a Metadata URL match would mean we might be
looking at the wrong Layer object.
  • Loading branch information
jahow authored and fxprunayre committed Jan 14, 2020
1 parent 82a87d4 commit e2e0a21fb4c543b2f3d6018287b936050b21975a
Showing with 5 additions and 3 deletions.
  1. +5 −3 web-ui/src/main/resources/catalog/components/common/ows/OWSService.js
@@ -468,22 +468,25 @@
}

//either names match or non namespaced names
// note: these matches are put at the beginning of the needles array
if (name == capName || nameNoNamespace == capNameNoNamespace) {
layers[i].nameToUse = capName;
if (capObj.version) {
layers[i].version = capObj.version;
}
needles.push(layers[i]);
needles.unshift(layers[i]);
break capabilityLayers;
}

//check dataset identifer match
// note: these matches are put at the end of the needles array
// because they are lower priority than the layername matches
// and the loop is not stopping after them
if (uuid != null) {
if (angular.isArray(layers[i].Identifier)) {
for (var c = 0; c < layers[i].Identifier.length; c++) {
if (layers[i].Identifier[c] == uuid) {
needles.push(layers[i]);
break capabilityLayers;
}
}
}
@@ -493,7 +496,6 @@
if (mdu && mdu.OnlineResource &&
mdu.OnlineResource.indexOf(uuid) > 0) {
needles.push(layers[i]);
break capabilityLayers;
}
}
}

0 comments on commit e2e0a21

Please sign in to comment.
You can’t perform that action at this time.