Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

filter gitc relevant headers (#4714)

Ryan Weiler25794b2b108a
diff --git a/web/js/map/layerbuilder.js b/web/js/map/layerbuilder.js
index 9e290c316..20162967f 100644
--- a/web/js/map/layerbuilder.js
+++ b/web/js/map/layerbuilder.js
@@ -119,16 +119,19 @@ export default function mapLayerBuilder(config, cache, store) {
const updateCollections = (headers) => {
const actualId = headers.get('layer-identifier-actual');
+
if (!actualId) return;
+ const parts = actualId.split('_');
+ const type = parts[parts.length - 1];
+ const version = parts[parts.length - 2];
+
+ if (type !== 'NRT' && type !== 'STD') return;
+
const { layers } = state;
- const collectionCheck = getCollections(layers, date, layer);
// check if the collection & dates already exist for layer so we don't dispatch actions
- if (!collectionCheck) {
+ if (!getCollections(layers, date, layer)) {
updateStoreCollections(layer.id);
- const parts = actualId.split('_');
- const version = parts[parts.length - 2];
- const type = parts[parts.length - 1];
updateStoreCollectionDates(layer.id, version, type, date);
}
};