Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

WV-2181 (#3819)

Jason Kentd0acdc3fd107
diff --git a/web/js/components/context-menu/context-menu.js b/web/js/components/context-menu/context-menu.js
index 19e244e0e..d09b15d7b 100644
--- a/web/js/components/context-menu/context-menu.js
+++ b/web/js/components/context-menu/context-menu.js
@@ -9,8 +9,7 @@ import { transform } from 'ol/proj';
import util from '../../util/util';
import CopyClipboardTooltip from '../location-search/copy-tooltip';
import { changeUnits } from '../../modules/measure/actions';
-import { getCoordinateFixedPrecision, getFormattedCoordinates } from '../location-search/util';
-import { setCoordinates } from '../../modules/location-search/actions';
+import { getFormattedCoordinates } from '../location-search/util';
const { events } = util;
@@ -20,7 +19,7 @@ function RightClickMenu(props) {
const [toolTipToggleTime, setToolTipToggleTime] = useState(0);
const [formattedCoordinates, setFormattedCoordinates] = useState();
const {
- map, crs, unitOfMeasure, onToggleUnits, updateStateCoordinates, isCoordinateSearchActive,
+ map, crs, unitOfMeasure, onToggleUnits, isCoordinateSearchActive,
} = props;
const [getMap, setMap] = useState(map);
@@ -30,10 +29,7 @@ function RightClickMenu(props) {
event.originalEvent.preventDefault();
const coord = olMap.getCoordinateFromPixel(event.pixel);
const [lon, lat] = transform(coord, crs, 'EPSG:4326');
- const latitude = getCoordinateFixedPrecision(lat);
- const longitude = getCoordinateFixedPrecision(lon);
setPixelCoords({ pixel: event.pixel });
- updateStateCoordinates([longitude, latitude]);
setFormattedCoordinates(getFormattedCoordinates(lat, lon).join(','));
setMap(olMap);
setShow(true);
@@ -141,16 +137,12 @@ const mapDispatchToProps = (dispatch) => ({
onToggleUnits: (unitOfMeasure) => {
dispatch(changeUnits(unitOfMeasure));
},
- updateStateCoordinates: (coordinates) => {
- dispatch(setCoordinates(coordinates));
- },
});
RightClickMenu.propTypes = {
map: PropTypes.object,
crs: PropTypes.string,
unitOfMeasure: PropTypes.string,
onToggleUnits: PropTypes.func,
- updateStateCoordinates: PropTypes.func,
isCoordinateSearchActive: PropTypes.bool,
};
diff --git a/web/js/modules/location-search/actions.js b/web/js/modules/location-search/actions.js
index d800da7d5..6595d33f0 100644
--- a/web/js/modules/location-search/actions.js
+++ b/web/js/modules/location-search/actions.js
@@ -3,7 +3,6 @@ import {
CLEAR_SUGGESTIONS,
SET_MARKER,
SET_SUGGESTION,
- SET_COORDINATES,
TOGGLE_DIALOG_VISIBLE,
TOGGLE_REVERSE_GEOCODE,
TOGGLE_SHOW_LOCATION_SEARCH,
@@ -142,19 +141,6 @@ export function setSuggestion(suggestion) {
};
}
-/**
- * Set coordinates
- * @param {Array} coordinates
- */
-export function setCoordinates(coordinates) {
- return (dispatch) => {
- dispatch({
- type: SET_COORDINATES,
- coordinates,
- });
- };
-}
-
/**
* Get place suggestions using ArcGIS suggest API
* @param {String} val | input text to suggest places
diff --git a/web/js/modules/location-search/constants.js b/web/js/modules/location-search/constants.js
index 87d7ca94f..5087b573a 100644
--- a/web/js/modules/location-search/constants.js
+++ b/web/js/modules/location-search/constants.js
@@ -5,7 +5,6 @@ export const REQUEST_SUGGEST_PLACE_SUCCESS = 'LOCATION_SEARCH/REQUEST_SUGGEST_PL
export const SET_REVERSE_GEOCODE_RESULTS = 'LOCATION_SEARCH/SET_REVERSE_GEOCODE_RESULTS';
export const SET_MARKER = 'LOCATION_SEARCH/SET_MARKER';
export const SET_SUGGESTION = 'LOCATION_SEARCH/SET_SUGGESTION';
-export const SET_COORDINATES = 'LOCATION_SEARCH/SET_COORDINATES';
export const TOGGLE_DIALOG_VISIBLE = 'LOCATION_SEARCH/TOGGLE_DIALOG_VISIBLE';
export const TOGGLE_REVERSE_GEOCODE = 'LOCATION_SEARCH/TOGGLE_REVERSE_GEOCODE';
export const TOGGLE_SHOW_LOCATION_SEARCH = 'LOCATION_SEARCH/TOGGLE_SHOW_LOCATION_SEARCH';
diff --git a/web/js/modules/location-search/reducers.js b/web/js/modules/location-search/reducers.js
index cdc9ae986..79dd2fc93 100644
--- a/web/js/modules/location-search/reducers.js
+++ b/web/js/modules/location-search/reducers.js
@@ -6,7 +6,6 @@ import {
SET_REVERSE_GEOCODE_RESULTS,
SET_MARKER,
SET_SUGGESTION,
- SET_COORDINATES,
TOGGLE_DIALOG_VISIBLE,
TOGGLE_REVERSE_GEOCODE,
TOGGLE_SHOW_LOCATION_SEARCH,
@@ -66,11 +65,6 @@ export function locationSearchReducer(state = locationSearchState, action) {
...state,
suggestedPlace: action.value,
};
- case SET_COORDINATES:
- return {
- ...state,
- coordinates: action.coordinates,
- };
case REQUEST_SUGGEST_PLACE_SUCCESS:
return {
...state,