Skip to content

Commit

Permalink
Enforce external layer type "wms", add fallbacks for featureInfoUrl a…
Browse files Browse the repository at this point in the history
…nd queryLayers
  • Loading branch information
manisandro committed Feb 19, 2020
1 parent 486e4af commit b0b37cd
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions utils/ThemeUtils.js
Expand Up @@ -82,8 +82,12 @@ const ThemeUtils = {
featureInfoUrl: theme.featureInfoUrl,
infoFormats: theme.infoFormats,
externalLayers: theme.externalLayers.reduce((res, cur) => {
res[cur.internalLayer] = assign({}, themes.externalLayers.find(entry => entry.name === cur.name));
res[cur.internalLayer].uuid = uuid.v4();
res[cur.internalLayer] = assign({}, themes.externalLayers.find(entry => entry.name === cur.name), {
uuid: uuid.v4(),
type: "wms"
});
res[cur.internalLayer].featureInfoUrl = res[cur.internalLayer].featureInfoUrl || res[cur.internalLayer].url;
res[cur.internalLayer].queryLayers = res[cur.internalLayer].queryLayers || res[cur.internalLayer].params.LAYERS.split(",");
return res;
}, {})
};
Expand Down

0 comments on commit b0b37cd

Please sign in to comment.