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

backport 2023.02.xx - Fix #9821 error loading 3Dtiles in csw catalog (#9844) #9854

Merged
merged 1 commit into from
Jan 8, 2024
Merged
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
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
Loading