map-state
Table of Contents
mapStateUpdaters
import keplerGlReducer, {mapStateUpdaters} from '@kepler.gl/reducers';
// Root Reducer
const reducers = combineReducers({
keplerGl: keplerGlReducer,
app: appReducer
});
const composedReducer = (state, action) => {
switch (action.type) {
// click button to close side panel
case 'CLICK_BUTTON':
return {
...state,
keplerGl: {
...state.keplerGl,
foo: {
...state.keplerGl.foo,
mapState: mapStateUpdaters.fitBoundsUpdater(
mapState, {payload: [127.34, 31.09, 127.56, 31.59]]}
)
}
}
};
}
return reducers(state, action);
};
export default composedReducer;fitBoundsUpdater
INITIAL_MAP_STATE
receiveMapConfigUpdater
resetMapConfigUpdater
togglePerspectiveUpdater
toggleSplitMapUpdater
updateMapUpdater
Last updated
Was this helpful?