diff --git a/web/client/actions/map.js b/web/client/actions/map.js index 33d3a6ad31..98e16c2569 100644 --- a/web/client/actions/map.js +++ b/web/client/actions/map.js @@ -32,6 +32,7 @@ export const MAP_PLUGIN_LOAD = 'MAP:MAP_PLUGIN_LOAD'; export const ORIENTATION = 'MAP:ORIENTATION'; export const UPDATE_MAP_VIEW = 'MAP:UPDATE_MAP_VIEW'; export const UPDATE_MAP_OPTIONS = 'MAP:UPDATE_MAP_OPTIONS'; +export const FORCE_RENDER = 'MAP:FORCE_RENDER'; /** @@ -260,6 +261,11 @@ export const updateMapOptions = (configUpdate) => ({ configUpdate }); +export const forceReRender = (configUpdate) => ({ + type: FORCE_RENDER, + configUpdate +}); + /** * Actions for map * @name actions.map diff --git a/web/client/reducers/map.js b/web/client/reducers/map.js index 5098cbe59a..dbe08d518e 100644 --- a/web/client/reducers/map.js +++ b/web/client/reducers/map.js @@ -24,7 +24,8 @@ import { UNREGISTER_EVENT_LISTENER, ORIENTATION, UPDATE_MAP_VIEW, - UPDATE_MAP_OPTIONS + UPDATE_MAP_OPTIONS, + FORCE_RENDER } from '../actions/map'; import { LOCATION_CHANGE } from 'connected-react-router'; @@ -38,6 +39,8 @@ function mapConfig(state = {eventListeners: {}}, action) { const {type, ...params} = action; params.zoom = isNaN(params.zoom) ? 1 : params.zoom; return assign({}, state, params); + case FORCE_RENDER: + return {...state, center: {...state.center, x: state.center.x + 0.0000000000001}}; case CHANGE_MOUSE_POINTER: return assign({}, state, { mousePointer: action.pointer