Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

get extent and rotation from state, not location.query

Jason Kent494e0e898080
diff --git a/web/js/containers/tour.js b/web/js/containers/tour.js
index 091709c3b..507371830 100644
--- a/web/js/containers/tour.js
+++ b/web/js/containers/tour.js
@@ -20,6 +20,7 @@ import {
import { BULK_PALETTE_RENDERING_SUCCESS } from '../modules/palettes/constants';
import { stop as stopAnimation } from '../modules/animation/actions';
import { onClose as closeModal } from '../modules/modal/actions';
+import { LOCATION_POP_ACTION } from '../redux-location-state-customs';
import { layersParse12 } from '../modules/layers/util';
import {
endTour as endTourAction,
@@ -470,10 +471,10 @@ const mapDispatchToProps = (dispatch) => ({
type: BULK_PALETTE_RENDERING_SUCCESS,
rendered: obj.rendered,
});
- dispatch({ type: 'REDUX-LOCATION-POP-ACTION', payload: location });
+ dispatch({ type: LOCATION_POP_ACTION, payload: location });
});
} else {
- dispatch({ type: 'REDUX-LOCATION-POP-ACTION', payload: location });
+ dispatch({ type: LOCATION_POP_ACTION, payload: location });
}
},
startTour: () => {
diff --git a/web/js/map/ui.js b/web/js/map/ui.js
index 0e6d7216e..3830fedb2 100644
--- a/web/js/map/ui.js
+++ b/web/js/map/ui.js
@@ -139,9 +139,10 @@ export default function mapui(models, config, store, ui) {
return;
}
case LOCATION_POP_ACTION: {
+ const state = store.getState();
const newState = util.fromQueryString(action.payload.search);
- const extent = lodashGet(action, 'payload.query.map.extent');
- const rotate = lodashGet(action, 'payload.query.map.rotation') || 0;
+ const extent = lodashGet(state, 'map.extent');
+ const rotate = lodashGet(state, 'map.rotation') || 0;
updateProjection();
if (newState.v && !newState.e && extent) {
flyToNewExtent(extent, rotate);