map-state
Last updated
Was this helpful?
Last updated
Was this helpful?
Updaters for mapState
reducer. Can be used in your root reducer to directly modify kepler.gl's state. Read more about
Examples
Fit map viewport to bounds
Parameters
Default initial mapState
Properties
Update mapState
to propagate a new config
Parameters
action.payload.config
(optional, default {}
)
action.payload.options
(optional, default {}
)
action.payload.bounds
(optional, default null
)
reset mapState to initial State
Parameters
Toggle between 3d and 2d map.
Parameters
Toggle between one or split maps
Parameters
Update map viewport
Parameters
Action:
state
action
action.payload
<> bounds as [lngMin, latMin, lngMax, latMax]
Returns nextState
pitch
Default: 0
bearing
Default: 0
latitude
Default: 37.75043
longitude
Default: -122.34679
zoom
Default: 9
dragRotate
Default: false
width
Default: 800
height
Default: 800
isSplit
Default: false
Action:
state
action
action.payload
saved map config
Returns nextState
Action:
state
mapState
Returns nextState
Action:
state
Returns nextState
Action:
state
Returns nextState
Action:
state
action
action.payload
viewport
Returns nextState