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

Issue/hitide UI 68 - fix dataset ui crash bug #69

Merged
merged 4 commits into from
May 20, 2024
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
20 changes: 12 additions & 8 deletions src/jpl/utils/SearchDatasets.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,16 +159,20 @@ define([
var resolutionAndCoordinateSystemObject = additionalMetadataObject.spatialExtent.horizontalSpatialDomain.resolutionAndCoordinateSystem
var relatedUrlsArray = additionalMetadataObject.relatedUrls
if (resolutionAndCoordinateSystemObject) {
var resolutionObjects = resolutionAndCoordinateSystemObject.horizontalDataResolution.genericResolutions
var resolutionObjects = resolutionAndCoordinateSystemObject.horizontalDataResolution
if (resolutionObjects) {
resolutionObjects.forEach(function(resolutionObject) {
var acrossTrack = resolutionObject.xdimension
var alongTrack = resolutionObject.ydimension
var unit = resolutionObject.unit
datasetObject["Dataset-Resolution"].push({"Dataset-AcrossTrackResolution": acrossTrack, "Dataset-AlongTrackResolution": alongTrack, "Unit": unit})
});
if(resolutionObjects.genericResolutions) {
resolutionObjects.genericResolutions.forEach(function(resolutionObject) {
var acrossTrack = resolutionObject.xdimension
var alongTrack = resolutionObject.ydimension
var unit = resolutionObject.unit
datasetObject["Dataset-Resolution"].push({"Dataset-AcrossTrackResolution": acrossTrack, "Dataset-AlongTrackResolution": alongTrack, "Unit": unit})
});
} else {
datasetObject["Dataset-Resolution"].push({"error": "Not Available"})
}
} else {
// Resolution not available by error
// Resolution not available by error.
datasetObject["Dataset-Resolution"].push({"error": "Not Available"})
}
} else {
Expand Down
Loading