From 7f7e068b54325fe9f0b31521ac82030a491a9f70 Mon Sep 17 00:00:00 2001 From: Brad Andrick Date: Mon, 11 Sep 2023 14:57:16 -0400 Subject: [PATCH] select any results on click not just single scenes --- src/utils/mapHelper.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/utils/mapHelper.js b/src/utils/mapHelper.js index e1888e8c..c75de009 100644 --- a/src/utils/mapHelper.js +++ b/src/utils/mapHelper.js @@ -87,7 +87,7 @@ export function mapClickHandler(e) { const clickBounds = L.latLngBounds(e.latlng, e.latlng) if (map && Object.keys(map).length > 0) { const _searchType = store.getState().mainSlice.searchType - const _mappedScenes = store.getState().mainSlice.mappedScenes + const _searchResults = store.getState().mainSlice.searchResults clearMapSelection() @@ -101,9 +101,9 @@ export function mapClickHandler(e) { // pull all items from search results that intersect with the click bounds let intersectingFeatures = [] - if (_mappedScenes !== null) { - for (const f in _mappedScenes) { - const feature = _mappedScenes[f] + if (_searchResults !== null) { + for (const f in _searchResults.features) { + const feature = _searchResults.features[f] const featureBounds = L.geoJSON(feature).getBounds() if (featureBounds && featureBounds.intersects(clickBounds)) { // highlight layer