Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

no orbit tracks for monthly layers

Jason Kent7826fad4bb2e
diff --git a/tasks/migrateConfigs.js b/tasks/migrateConfigs.js
index e05b88b4e..b309bbb66 100644
--- a/tasks/migrateConfigs.js
+++ b/tasks/migrateConfigs.js
@@ -114,7 +114,12 @@ function modifyProps (layerObj) {
if (!wvJsonLayerObj) {
console.log('Layer not found in wv.json, run build script!', title);
}
- const staticLayer = !wvJsonLayerObj.startDate && !wvJsonLayerObj.endDate && !wvJsonLayerObj.dateRanges;
+
+ const {
+ startDate, endDate, dateRanges, period,
+ } = wvJsonLayerObj;
+
+ const staticLayer = !startDate && !endDate && !dateRanges;
const modifiedObj = {
title,
@@ -131,7 +136,7 @@ function modifyProps (layerObj) {
if (conceptIdsMap[id]) {
modifiedObj.conceptIds = conceptIdsMap[id].conceptId;
}
- if (tracks) {
+ if (tracks && period !== 'monthly') {
modifiedObj.orbitTracks = [];
modifiedObj.orbitDirection = [];
tracks.forEach((track) => {
@@ -143,7 +148,7 @@ function modifyProps (layerObj) {
}
});
}
- if (wvJsonLayerObj && wvJsonLayerObj.period) {
+ if (period) {
// WARNING: Not totally accurate, will need to identify N-Day layers.
// modifiedObj.period = wvJsonLayerObj.period;
setPeriodProps(wvJsonLayerObj, modifiedObj);