Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

fix issue with selecting granules near dateline

Jason Kentbbd388714db6
diff --git a/web/js/map/data/map.js b/web/js/map/data/map.js
index fb92cc596..0884e52bf 100644
--- a/web/js/map/data/map.js
+++ b/web/js/map/data/map.js
@@ -350,9 +350,12 @@ export default function dataMap(store, maps, dataUi, ui) {
};
const clickCheck = function(event) {
+ const clickedFeatures = {};
const pixel = map.getEventPixel(event.originalEvent);
map.forEachFeatureAtPixel(pixel, (feature, layer) => {
- if (feature.button) {
+ const id = feature.ol_uid;
+ if (feature.button && !clickedFeatures[id]) {
+ clickedFeatures[id] = true;
store.dispatch(toggleGranule(feature.granule));
hovering = false;
hoverCheck(event);