Interactive interface for browsing global, full-resolution satellite imagery
fix more bad conflict resolution issues from rebase
Jason Kent1bc57006cd82
diff --git a/web/js/components/geosearch/ol-coordinates-marker.js b/web/js/components/geosearch/ol-coordinates-marker.jsindex 333b9c4d4..8498e7b11 100644--- a/web/js/components/geosearch/ol-coordinates-marker.js+++ b/web/js/components/geosearch/ol-coordinates-marker.js@@ -27,19 +27,18 @@ export class CoordinatesMarker extends Component {this.mouseMove = this.mouseMove.bind(this);this.singleClick = this.singleClick.bind(this);this.rightClick = this.rightClick.bind(this);- this.registerMouseListeners();}- componentWillUnmount() {- events.off('mousemove', this.mouseMove);- events.off('singleclick', this.singleClick);- events.off('contextmenu', this.rightClick);+ componentDidMount() {+ events.on('map:mousemove', this.mouseMove);+ events.on('map:singleclick', this.singleClick);+ events.on('map:contextmenu', this.rightClick);}- registerMouseListeners() {- events.on('mousemove', this.mouseMove);- events.on('singleclick', this.singleClick);- events.on('contextmenu', this.rightClick);+ componentWillUnmount() {+ events.off('map:mousemove', this.mouseMove);+ events.off('map:singleclick', this.singleClick);+ events.off('map:contextmenu', this.rightClick);}mouseMove(event, map, crs) {diff --git a/web/js/containers/map-interactions/map-interactions.js b/web/js/containers/map-interactions/map-interactions.jsindex 8411b6a83..85f25496f 100644--- a/web/js/containers/map-interactions/map-interactions.js+++ b/web/js/containers/map-interactions/map-interactions.js@@ -23,10 +23,6 @@ class MapInteractions extends PureComponent {const mapClasses = this.getMapClasses();return (<>- <div- id="wv-map"- className={mapClasses}- /><div id="wv-map" className={mapClasses} />{!isDistractionFreeModeActive && (<OlCoordinates />diff --git a/web/js/map/ui.js b/web/js/map/ui.jsindex 19090f140..cc99746ff 100644--- a/web/js/map/ui.js+++ b/web/js/map/ui.js@@ -348,15 +348,12 @@ export default function mapui(models, config, store, ui) {*/const addMarkerAndUpdateStore = (geocodeResults, shouldFlyToCoordinates) => {const state = store.getState();- const {- geosearch, layers, proj,- } = state;+ const { geosearch, proj } = state;const {coordinates, isCoordinatesDialogOpen, reverseGeocodeResults,} = geosearch;const results = geocodeResults || reverseGeocodeResults;const { sources } = config;- const { active } = layers;// unmount coordinate dialog to prevent residual tooltips being hoveredif (self.coordinatesDialogDOMEl) {@@ -379,7 +376,7 @@ export default function mapui(models, config, store, ui) {if (shouldFlyToCoordinates) {// fly to coordinates and render coordinates tooltip on init SET_MARKERconst zoom = self.selected.getView().getZoom();- const activeLayers = active.filter((layer) => layer.projections[proj.id] !== undefined);+ const activeLayers = getActiveLayers(state).filter(({ projections }) => projections[proj.id]);const maxZoom = getMaxZoomLevelLayerCollection(activeLayers, zoom, proj.id, sources);animateCoordinates({ ui: self }, config, coordinates, maxZoom);}