Interactive interface for browsing global, full-resolution satellite imagery
WV-2313
Jason Kent2ad140bc2c1b
diff --git a/web/js/map/ui.js b/web/js/map/ui.jsindex 26430ad35..8e9d8363d 100644--- a/web/js/map/ui.js+++ b/web/js/map/ui.js@@ -36,7 +36,6 @@ import mapCompare from './compare/compare';import { granuleFootprint } from './granule/util';import { LOCATION_POP_ACTION } from '../redux-location-state-customs';import { CHANGE_PROJECTION } from '../modules/projection/constants';-import { CHANGE_TAB } from '../modules/sidebar/constants';import {REMOVE_MARKER,SET_MARKER,@@ -160,15 +159,6 @@ export default function mapui(models, config, store) {});return;}- case CHANGE_TAB: {- const { sidebar, proj } = state;- const { activeTab, previousTab } = sidebar;- const dataDownloadTabSwitched = activeTab === 'download' || previousTab === 'download';- if (proj.id === 'geographic' && dataDownloadTabSwitched) {- return reloadLayers();- }- return;- }case LOCATION_POP_ACTION: {const newState = util.fromQueryString(action.payload.search);const extent = lodashGet(state, 'map.extent');@@ -179,7 +169,6 @@ export default function mapui(models, config, store) {flyToNewExtent(extent, rotate);}}, 200);-return;}case layerConstants.REMOVE_GROUP:@@ -207,6 +196,7 @@ export default function mapui(models, config, store) {case paletteConstants.SET_CUSTOM:case paletteConstants.SET_DISABLED_CLASSIFICATION:case paletteConstants.CLEAR_CUSTOM:+ case layerConstants.ADD_LAYERS_FOR_EVENT:return setTimeout(reloadLayers, 100);case vectorStyleConstants.SET_FILTER_RANGE:case vectorStyleConstants.SET_VECTORSTYLE:@@ -242,7 +232,7 @@ export default function mapui(models, config, store) {return updateDate(action.outOfStep);case layerConstants.TOGGLE_LAYER_VISIBILITY:case layerConstants.TOGGLE_OVERLAY_GROUP_VISIBILITY: {- updateDate();+ updateLayerVisibilities();break;}case dateConstants.ARROW_DOWN:@@ -647,6 +637,7 @@ export default function mapui(models, config, store) {const state = store.getState();const { compare } = state;+ console.log('map - reloadLayers');if (!config.features.compare || !compare.active) {const compareMapDestroyed = !compare.active && compareMapUi.active;if (compareMapDestroyed) {@@ -660,7 +651,6 @@ export default function mapui(models, config, store) {});const createdLayers = await Promise.all(layerPromises);lodashEach(createdLayers, (l) => { map.addLayer(l); });- updateLayerVisibilities();} else {const stateArray = [['active', 'selected'], ['activeB', 'selectedB']];if (compare && !compare.isCompareA && compare.mode === 'spy') {@@ -712,6 +702,8 @@ export default function mapui(models, config, store) {const state = store.getState();const layerGroup = self.selected.getLayers();+ console.log('map - updateLayerVisibilities');+const setRenderable = (layer, parentCompareGroup) => {const { id, group } = layer.wv;const dateGroup = layer.get('date') || group === 'active' ? 'selected' : 'selectedB';@@ -929,6 +921,8 @@ export default function mapui(models, config, store) {.includes(id),).filter(({ visible }) => visible);+ console.log('map - updateDate');+const layerPromises = visibleLayers.map(async (def) => {const { id, type } = def;const temporalLayer = ['subdaily', 'daily', 'monthly', 'yearly']