Skip to content
Draft
Show file tree
Hide file tree
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: 10 additions & 2 deletions web/client/api/CSW.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import urlUtil from 'url';

import { get, head, last, template, isNil, castArray, isEmpty } from 'lodash';
import { get, head, last, template, isNil, castArray, isEmpty, isArray } from 'lodash';
import assign from 'object-assign';
import xml2js from 'xml2js';
import axios from '../libs/ajax';
Expand Down Expand Up @@ -454,7 +454,15 @@ const getBboxFor3DLayersToRecords = async(result)=> {
let { records } = result;
if (records?.length) {
let records3DPromisesForCapabilities = records.map((rec)=>{
if (rec?.dc?.format === THREE_D_TILES) {
if (castArray(rec?.dc?.format).includes(THREE_D_TILES)) {
if (isArray(rec.dc?.URI)) {
let tilesetJsonURIs = castArray(rec.dc.URI).filter((uri) => {
return uri.protocol && uri.protocol === "OGC:3DTILES";
});
if (tilesetJsonURIs?.length) {
return getCapabilities(head(tilesetJsonURIs).value);
}
}
let tilesetJsonURL = rec.dc?.URI?.value;
return getCapabilities(tilesetJsonURL);
}
Expand Down
4 changes: 2 additions & 2 deletions web/client/api/catalog/CSW.js
Original file line number Diff line number Diff line change
Expand Up @@ -264,9 +264,9 @@ export const getCatalogRecords = (records, options, locales) => {
};

let catRecord;
if (dc && dc.format === THREE_D_TILES) {
if (dc && castArray(dc.format).includes(THREE_D_TILES)) {
catRecord = getCatalogRecord3DTiles(record, metadata);
} else if (dc && dc.format === MODEL) {
} else if (dc && castArray(dc.format).includes(MODEL)) {
// todo: handle get catalog record for ifc
} else {
const layerType = Object.keys(parsedReferences).filter(key => !ADDITIONAL_OGC_SERVICES.includes(key)).find(key => parsedReferences[key]);
Expand Down