Interactive interface for browsing global, full-resolution satellite imagery
Revert tile-measurement.js to call findBestDate() after other array of dates have depleted.
Jason Hurleye623d7595a5e
diff --git a/web/js/mapUI/components/kiosk/tile-measurement/tile-measurement.js b/web/js/mapUI/components/kiosk/tile-measurement/tile-measurement.jsindex a9a63addd..c7b8c1326 100644--- a/web/js/mapUI/components/kiosk/tile-measurement/tile-measurement.js+++ b/web/js/mapUI/components/kiosk/tile-measurement/tile-measurement.js@@ -67,8 +67,6 @@ function TileMeasurement({ ui }) {// #4 Loop through layers and dates to find the first date that satisfies full imagery thresholdsconst findFullImageryDate = async (layers, dates) => {console.log('Date range found... Finding date with satisfactory imagery...');- const firstLayerWithBestDate = findBestDate(layers, bestDates);- if (firstLayerWithBestDate) dates.push(firstLayerWithBestDate);for (let i = 0; i < dates.length; i += 1) {let layersMeetingThresholdForDate = 0;@@ -99,6 +97,7 @@ function TileMeasurement({ ui }) {layersMeetingThresholdForDate = 0;}+ const firstLayerWithBestDate = findBestDate(layers, bestDates);if (!firstLayerWithBestDate) {console.error(`No date found that satisfies the full imagery thresholds. There is no best date selected for ${layers[0].id}.`);return dates[0];