Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

WV-2962: Travel Mode Fixes (#4848)

Ryan Weilere20b85e117d2
diff --git a/web/js/mapUI/components/kiosk/tile-measurement/utils/layer-data-eic.js b/web/js/mapUI/components/kiosk/tile-measurement/utils/layer-data-eic.js
index 69f491ba2..e7c82f316 100644
--- a/web/js/mapUI/components/kiosk/tile-measurement/utils/layer-data-eic.js
+++ b/web/js/mapUI/components/kiosk/tile-measurement/utils/layer-data-eic.js
@@ -94,15 +94,15 @@ export const travelModeData = {
title: 'Antarctic Sea Ice',
},
10: {
- title: 'VIIRS/Suomi NPP fires & VIRRS True Color Corrected Reflectance',
+ title: 'Active fires detected by Suomi NPP satellite',
},
11: {
- title: 'Aura/OMI Nitrogen Dioxide and VIIRS/NOAA-20 True Color Corrected Reflectance',
+ title: 'Nitrogen Dioxide (NO2) by Aura satellite',
},
12: {
- title: 'Aqua/AIRS Carbon Monoxide Day and Night + Borders and coastlines',
+ title: 'Carbon Monoxide (CO) by Aqua satellite',
},
13: {
- title: 'VIIRS/Suomi NPP Aerosol Optical Depth Dark Target and Deep Blue & True Color Corrected Reflectance',
+ title: 'Aerosol Optical Depth (AOD) by Suomi NPP satellite',
},
};
diff --git a/web/js/mapUI/components/kiosk/travel-mode/travelModeColorbars.js b/web/js/mapUI/components/kiosk/travel-mode/travelModeColorbars.js
index b453d35af..dfef459ab 100644
--- a/web/js/mapUI/components/kiosk/travel-mode/travelModeColorbars.js
+++ b/web/js/mapUI/components/kiosk/travel-mode/travelModeColorbars.js
@@ -10,8 +10,17 @@ function ColorBarRow({ legend, index }) {
const {
minLabel, maxLabel, units, type, title, colors,
} = legend;
- const minimum = `${minLabel} ${units}`;
- const maximum = `${maxLabel} ${units}`;
+ const validUnits = units !== undefined;
+ const minimum = validUnits ? `${minLabel} ${units}` : minLabel;
+ const maximum = validUnits ? `${maxLabel} ${units}` : maxLabel;
+
+ // Temporary fix for manually updating title of the colorbar
+ let colorbarTitle = title;
+ if (title === 'Nitric Oxide') {
+ colorbarTitle = 'Nitrogen Dioxide';
+ } else if (title === 'Deep Blue Aerosol Optical Depth') {
+ colorbarTitle = 'Aerosol Optical Depth';
+ }
const drawOnCanvas = () => {
if (canvasRef.current && legend) {
@@ -28,7 +37,7 @@ function ColorBarRow({ legend, index }) {
return (
<div className="travel-mode-colorbar-row" key={index}>
- <div className="travel-mode-colorbar-title">{title}</div>
+ <div className="travel-mode-colorbar-title">{colorbarTitle}</div>
<div className="travel-mode-colorbar-case">
<canvas
className="travel-mode-colorbar"