Skip to content

Commit

Permalink
Fix #9821 error loading 3Dtiles in csw catalog (#9844) (#9854)
Browse files Browse the repository at this point in the history
  • Loading branch information
MV88 authored Jan 8, 2024
1 parent 1518651 commit 24d9f8a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion web/client/api/CSW.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 4 additions & 0 deletions web/client/api/ThreeDTiles.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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: {}};
});
};

Expand Down

0 comments on commit 24d9f8a

Please sign in to comment.