diff --git a/web/client/api/CSW.js b/web/client/api/CSW.js index 2d61e4b4e0..efa8665eb8 100644 --- a/web/client/api/CSW.js +++ b/web/client/api/CSW.js @@ -253,7 +253,7 @@ const getBboxFor3DLayersToRecords = async(result)=> { const newRecords = records.map( (record, idx) => { const capabilityResult = allPromises[idx]; - if (!capabilityResult) { + if (!capabilityResult || !capabilityResult?.bbox?.bounds || !capabilityResult?.bbox?.crs) { return record; } let bbox = getExtentFromNormalized(capabilityResult.bbox.bounds, capabilityResult.bbox.crs); diff --git a/web/client/api/ThreeDTiles.js b/web/client/api/ThreeDTiles.js index 1aca28ec02..993ac69cd9 100644 --- a/web/client/api/ThreeDTiles.js +++ b/web/client/api/ThreeDTiles.js @@ -9,6 +9,7 @@ import axios from '../libs/ajax'; import { convertRadianToDegrees } from '../utils/CoordinatesUtils'; import { METERS_PER_UNIT } from '../utils/MapUtils'; +import { logError } from '../utils/DebugUtils'; // converts the boundingVolume of the root tileset to a valid layer bbox function tilesetToBoundingBox(Cesium, tileset) { @@ -140,6 +141,9 @@ export const getCapabilities = (url) => { return axios.get(url) .then(({ data }) => { return extractCapabilities(data).then((properties) => ({ tileset: data, ...properties })); + }).catch((e) => { + logError(e); + return { tileset: {}}; }); };