Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #1219: some issues in CSW catalog parsing of WMS services #1293

Merged
merged 1 commit into from
Nov 25, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions web/client/utils/CatalogUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*/

const assign = require('object-assign');
const {head, isArray} = require('lodash');
const {head, isArray, isString} = require('lodash');
const urlUtil = require('url');

const getWMSBBox = (record) => {
Expand Down Expand Up @@ -83,7 +83,7 @@ const converters = {
});
}

if (wms) {
if (wms && wms.name) {
let absolute = (wms.value.indexOf("http") === 0);
if (!absolute) {
assign({}, wms, {value: options.catalogURL + "/" + wms.value} );
Expand All @@ -108,11 +108,11 @@ const converters = {

// setup the final record object
return {
title: dc.title,
description: dc.abstract,
identifier: dc.identifier,
title: isString(dc.title) && dc.title || '',
description: isString(dc.abstract) && dc.abstract || '',
identifier: isString(dc.identifier) && dc.identifier || '',
thumbnail: thumbURL,
tags: dc.subject,
tags: isString(dc.subject) && dc.subject || '',
boundingBox: record.boundingBox,
references: references
};
Expand Down