LogoLogo
  • Welcome
  • What's new?
  • Docs
    • User guides
      • Get Started
      • Kepler.gl workflow
        • Add data to layers
          • Adding Data Layers
          • Create a Layer
          • Blend and Rearrange Layers
          • Hide, Edit and Delete Layers
        • Add Data to the Map
      • Layers
        • Point
        • S2 Layer
        • Icon
        • Line
        • Cluster
        • Polygon
        • Hexbin
        • Grid
        • H3
        • Heatmap
        • Arc
        • Trip layer
      • Layer Attributes
      • Color Palettes
      • Filters
      • Map Styles
      • Interactions
      • Map Settings
      • Time Playback
      • Save and Export
      • FAQ
    • API Reference
      • ecosystem
      • Get Started
      • Advanced usages
        • Saving and Loading Maps with Schema Manager
        • Replace UI Component with Component Dependency Injection
        • Forward Dispatch Actions
        • Reducer Plugin
        • Using Updaters
        • Custom reducer initial state
        • custom-mapbox-host
      • Components
      • Reducers
        • reducers
        • map-style
        • map-state
        • combine
        • overview
        • ui-state
        • vis-state
      • Processors
        • All processors
      • Schemas
      • Actions
        • All actions
      • Cloud providers
        • Provider
      • Custom theme
      • Localization
    • Jupyter Notebook
  • Examples
    • Node/Express
    • Demo App
    • Open modal
    • Open modal
    • UMD client
    • Customize kepler.gl Theme
    • Customize kepler.gl Reducer
  • Contributing
    • Developing Kepler.gl
    • Contributor Covenant Code of Conduct
  • Change Log
  • Upgrade Guide
Powered by GitBook
On this page
  • forwardActions
  • ActionTypes
  • mapStyleActions
  • main
  • visStateActions
  • uiStateActions
  • rootActions
  • mapStateActions
  • layerColorUIChange
  • setExportMapFormat

Was this helpful?

  1. Docs
  2. API Reference
  3. Actions

All actions

PreviousActionsNextCloud providers

Last updated 6 months ago

Was this helpful?

Table of Contents

forwardActions

A set of helpers to forward dispatch actions to a specific instance reducer

forwardTo

Returns an action dispatcher that wraps and forwards the actions to a specific instance

Parameters

Examples

// action and forward dispatcher
import {toggleSplitMap, forwardTo} from '@kepler.gl/actions';
import {connect} from 'react-redux';

const MapContainer = props => (
 <div>
  <button onClick={() => props.keplerGlDispatch(toggleSplitMap())}/>
 </div>
)

const mapDispatchToProps = (dispatch, props) => ({
 dispatch,
 keplerGlDispatch: forwardTo(‘foo’, dispatch)
});

export default connect(
 state => state,
 mapDispatchToProps
)(MapContainer);

isForwardAction

Whether an action is a forward action

Parameters

unwrap

Unwrap an action

Parameters

wrapTo

Wrap an action into a forward action that only modify the state of a specific kepler.gl instance. kepler.gl reducer will look for signatures in the action to determine whether it needs to be forwarded to a specific instance reducer.

wrapTo can be curried. You can create a curried action wrapper by only supply the id argument

A forward action looks like this

 {
   type: "@@kepler.gl/LAYER_CONFIG_CHANGE",
   payload: {
     type: '@@kepler.gl/LAYER_CONFIG_CHANGE',
     payload: {},
     meta: {
      // id of instance
       _id_: id
      // other meta
     }
   },
   meta: {
     _forward_: '@redux-forward/FORWARD',
     _addr_: '@@KG_id'
   }
 };

Parameters

Examples

import {wrapTo, togglePerspective} from '@kepler.gl/actions';

// This action will only dispatch to the KeplerGl instance with `id: map_1`
this.props.dispatch(wrapTo('map_1', togglePerspective()));

// You can also create a curried action for each instance
const wrapToMap1 = wrapTo('map_1');
this.props.dispatch(wrapToMap1(togglePerspective()));

ActionTypes

Kepler.gl action types, can be listened by reducers to perform additional tasks whenever an action is called in kepler.gl

Examples

// store.js
import {handleActions} from 'redux-actions';
import {createStore, combineReducers, applyMiddleware} from 'redux';
import {taskMiddleware} from 'react-palm/tasks';

import keplerGlReducer from '@kepler.gl/reducers';
import {ActionTypes} from '@kepler.gl/actions';

const appReducer = handleActions(
  {
    // listen on kepler.gl map update action to store a copy of viewport in app state
    [ActionTypes.UPDATE_MAP]: (state, action) => ({
      ...state,
      viewport: action.payload
    })
  },
  {}
);

const reducers = combineReducers({
  app: appReducer,
  keplerGl: keplerGlReducer
});

export default createStore(reducers, {}, applyMiddleware(taskMiddleware));

mapStyleActions

Actions handled mostly by mapStyle reducer. They manage the display of base map, such as loading and receiving base map styles, hiding and showing map layers, user input of custom map style url.

addCustomMapStyle

Add map style from user input to reducer and set it to current style This action is called when user click confirm after putting in a valid style url in the custom map style dialog. It should not be called from outside kepler.gl without a valid inputStyle in the mapStyle reducer. param {void}

inputMapStyle

Input a custom map style object

Parameters

loadCustomMapStyle

Callback when a custom map style object is received

Parameters

    • customMapStyle.error any

loadMapStyleErr

Callback when load map style error

Parameters

  • error any

loadMapStyles

Callback when load map style success

Parameters

mapConfigChange

Update visibleLayerGroupsto change layer group visibility

Parameters

mapStyleChange

Change to another map style. The selected style should already been loaded into mapStyle.mapStyles

Parameters

requestMapStyles

Request map style style object based on style.url.

Parameters

set3dBuildingColor

Set 3d building layer group color

Parameters

main

Main kepler.gl actions, these actions handles loading data and config into kepler.gl reducer. These actions is listened by all subreducers,

addDataToMap

Add data to kepler.gl reducer, prepare map with preset configuration if config is passed. Kepler.gl provides a handy set of utils to parse data from different formats to the data object required in dataset. You rarely need to manually format the data obejct.

Use KeplerGlSchema.getConfigToSave to generate a json blob of the currents instance config. The config object value will always have higher precedence than the options properties.

Kepler.gl uses dataId in the config to match with loaded dataset. If you pass a config object, you need to match the info.id of your dataset to the dataId in each layer, filter and interactionConfig.tooltips.fieldsToShow

Parameters

Examples

// app.js
import {addDataToMap} from '@kepler.gl/actions';

const sampleTripData = {
  fields: [
    {name: 'tpep_pickup_datetime', format: 'YYYY-M-D H:m:s', type: 'timestamp'},
    {name: 'pickup_longitude', format: '', type: 'real'},
    {name: 'pickup_latitude', format: '', type: 'real'}
  ],
  rows: [
    ['2015-01-15 19:05:39 +00:00', -73.99389648, 40.75011063],
    ['2015-01-15 19:05:39 +00:00', -73.97642517, 40.73981094],
    ['2015-01-15 19:05:40 +00:00', -73.96870422, 40.75424576]
  ]
};

const sampleConfig = {
  visState: {
    filters: [
      {
        id: 'me',
        dataId: 'test_trip_data',
        name: 'tpep_pickup_datetime',
        type: 'timeRange',
        view: 'enlarged'
      }
    ]
  }
};

this.props.dispatch(
  addDataToMap({
    datasets: {
      info: {
        label: 'Sample Taxi Trips in New York City',
        id: 'test_trip_data'
      },
      data: sampleTripData
    },
    options: {
      centerMap: true,
      readOnly: false,
      keepExistingConfig: false
    },
    info: {
      title: 'Taro and Blue',
      description: 'This is my map'
    },
    config: sampleConfig
  })
);

keplerGlInit

Initialize kepler.gl reducer. It is used to pass in mapboxApiAccessToken to mapStyle reducer.

Parameters

receiveMapConfig

Pass config to kepler.gl instance, prepare the state with preset configs. Calling KeplerGlSchema.parseSavedConfig to convert saved config before passing it in is required.

You can call receiveMapConfig before passing in any data. The reducer will store layer and filter config, waiting for data to come in. When data arrives, you can call addDataToMap without passing any config, and the reducer will try to match preloaded configs. This behavior is designed to allow asynchronous data loading.

It is also useful when you want to prepare the kepler.gl instance with some preset layer and filter settings. Note Sequence is important, receiveMapConfig needs to be called before data is loaded. Currently kepler.gl doesn't allow calling receiveMapConfig after data is loaded. It will reset current configuration first then apply config to it.

Parameters

Examples

import {receiveMapConfig} from '@kepler.gl/actions';
import KeplerGlSchema from '@kepler.gl/schemas';

const parsedConfig = KeplerGlSchema.parseSavedConfig(config);
this.props.dispatch(receiveMapConfig(parsedConfig));

resetMapConfig

Reset all sub-reducers to its initial state. This can be used to clear out all configuration in the reducer.

visStateActions

Actions handled mostly by visState reducer. They manage how data is processed, filtered and displayed on the map by operates on layers, filters and interaction settings.

addFilter

Add a new filter

Parameters

Returns {type: ActionTypes.ADD_FILTER, dataId: dataId}

addLayer

Add a new layer

Parameters

Returns {type: ActionTypes.ADD_LAYER, props: props}

applyCPUFilter

Trigger CPU filter of selected dataset

Parameters

enlargeFilter

Show larger time filter at bottom for time playback (apply to time filter only)

Parameters

Returns {type: ActionTypes.ENLARGE_FILTER, idx: idx}

interactionConfigChange

Update interactionConfig

Parameters

Returns {type: ActionTypes.INTERACTION_CONFIG_CHANGE, config: config}

layerConfigChange

Update layer base config: dataId, label, column, isVisible

Parameters

Returns {type: ActionTypes.LAYER_CONFIG_CHANGE, oldLayer: oldLayer, newConfig: newConfig}

layerTextLabelChange

Update layer text label

Parameters

  • value any new value

layerTypeChange

Update layer type. Previews layer config will be copied if applicable.

Parameters

Returns {type: ActionTypes.LAYER_TYPE_CHANGE, oldLayer: oldLayer, newType: newType}

layerVisConfigChange

Update layer visConfig

Parameters

Returns {type: ActionTypes.LAYER_VIS_CONFIG_CHANGE, oldLayer: oldLayer, newVisConfig: newVisConfig}

layerVisualChannelConfigChange

Update layer visual channel

Parameters

Returns {type: ActionTypes.LAYER_VISUAL_CHANNEL_CHANGE, oldLayer: oldLayer, newConfig: newConfig, channel: channel}

loadFiles

Trigger file loading dispatch addDataToMap if succeed, or loadFilesErr if failed

Parameters

Returns {type: ActionTypes.LOAD_FILES, files: any}

loadFilesErr

Trigger loading file error

Parameters

  • error any

onLayerClick

Trigger layer click event with clicked object

Parameters

Returns {type: ActionTypes.LAYER_CLICK, info: info}

onLayerHover

Trigger layer hover event with hovered object

Parameters

Returns {type: ActionTypes.LAYER_HOVER, info: info}

onMapClick

Trigger map click event, unselect clicked object

Returns {type: ActionTypes.MAP_CLICK}

onMouseMove

Parameters

Returns {type: ActionTypes.MAP_CLICK}

removeDataset

Remove a dataset and all layers, filters, tooltip configs that based on it

Parameters

Returns {type: ActionTypes.REMOVE_DATASET, key: key}

removeFilter

Remove a filter from visState.filters, once a filter is removed, data will be re-filtered and layer will be updated

Parameters

Returns {type: ActionTypes.REMOVE_FILTER, idx: idx}

removeLayer

Remove a layer

Parameters

Returns {type: ActionTypes.REMOVE_LAYER, idx: idx}

reorderLayer

Reorder layer, order is an array of layer indexes, index 0 will be the one at the bottom

Parameters

Examples

// bring `layers[1]` below `layers[0]`, the sequence layers will be rendered is `1`, `0`, `2`, `3`.
// `1` will be at the bottom, `3` will be at the top.
this.props.dispatch(reorderLayer([1, 0, 2, 3]));

Returns {type: ActionTypes.REORDER_LAYER, order: order}

setEditorMode

Set the map mode

Parameters

Examples

import {setMapMode} from '@kepler.gl/actions';
import {EDITOR_MODES} from '@kepler.gl/constants';

this.props.dispatch(setMapMode(EDITOR_MODES.DRAW_POLYGON));

setFilter

Update filter property

Parameters

  • value any new value

Returns {type: ActionTypes.SET_FILTER, idx: idx, prop: prop, value: value}

setFilterPlot

Set the property of a filter plot

Parameters

Returns {type: ActionTypes.SET_FILTER_PLOT, idx: any, newProp: any}

setMapInfo

Set the property of a filter plot

Parameters

  • info

Returns {type: ActionTypes.SET_FILTER_PLOT, idx: any, newProp: any}

showDatasetTable

Display dataset table in a modal

Parameters

Returns {type: ActionTypes.SHOW_DATASET_TABLE, dataId: dataId}

toggleFilterAnimation

Start and end filter animation

Parameters

Returns {type: ActionTypes.TOGGLE_FILTER_ANIMATION, idx: idx}

toggleLayerForMap

Toggle visibility of a layer in a split map

Parameters

Returns {type: ActionTypes.TOGGLE_LAYER_FOR_MAP, mapIndex: any, layerId: any}

updateAnimationTime

Reset animation

Parameters

Returns {type: ActionTypes.UPDATE_ANIMATION_TIME, value: value}

updateFilterAnimationSpeed

Change filter animation speed

Parameters

Returns {type: ActionTypes.UPDATE_FILTER_ANIMATION_SPEED, idx: idx, speed: speed}

updateLayerAnimationSpeed

update trip layer animation speed

Parameters

Returns {type: ActionTypes.UPDATE_LAYER_ANIMATION_SPEED, speed: speed}

updateLayerBlending

Update layer blending mode

Parameters

Returns {type: ActionTypes.UPDATE_LAYER_BLENDING, mode: mode}

updateVisData

Add new dataset to visState, with option to load a map config along with the datasets

Parameters

Returns {type: ActionTypes.UPDATE_VIS_DATA, datasets: datasets, options: options, config: config}

uiStateActions

Actions handled mostly by uiState reducer. They manage UI changes in tha app, such as open and close side panel, switch between tabs in the side panel, open and close modal dialog for exporting data / images etc. It also manges which settings are selected during image and map export

addNotification

Add a notification to be displayed. Existing notification is going to be updated in case of matching ids.

Parameters

cleanupExportImage

Delete cached export image

hideExportDropdown

Hide side panel header dropdown, activated by clicking the share link on top of the side panel

openDeleteModal

Toggle active map control panel

Parameters

removeNotification

Remove a notification

Parameters

setExportData

Whether to including data in map config, toggle between true or false

setExportDataType

Set data format for exporting data

Parameters

setExportFiltered

Whether to export filtered data, true or false

Parameters

setExportImageDataUri

Set exportImage.setExportImageDataUri to a dataUri

Parameters

setExportImageSetting

Set exportImage settings: ratio, resolution, legend

Parameters

setExportSelectedDataset

Set selected dataset for export

Parameters

setUserMapboxAccessToken

Whether we export a mapbox access token used to create a single map html file

Parameters

showExportDropdown

Hide and show side panel header dropdown, activated by clicking the share link on top of the side panel

Parameters

startExportingImage

Set exportImage.exporting to true

toggleMapControl

Toggle active map control panel

Parameters

toggleModal

Show and hide modal dialog

Parameters

toggleSidePanel

Toggle active side panel

Parameters

rootActions

Root actions managers adding and removing instances in root reducer. Under-the-hood, when a KeplerGl component is mounted or unmounted, it will automatically calls these actions to add itself to the root reducer. However, sometimes the data is ready before the component is registered in the reducer, in this case, you can manually call these actions or the corresponding updater to add it to the reducer.

deleteEntry

Delete an instance from keplerGlReducer. This action is called under-the-hood when a KeplerGl component is un-mounted to the dom. If mint is set to be true in the component prop, the instance state will be deleted from the root reducer. Otherwise, the root reducer will keep the instance state and later transfer it to a newly mounted component with the same id

  • Updaters:

Parameters

registerEntry

Add a new kepler.gl instance in keplerGlReducer. This action is called under-the-hood when a KeplerGl component is mounted to the dom. Note that if you dispatch actions such as adding data to a kepler.gl instance before the React component is mounted, the action will not be performed. Instance reducer can only handle actions when it is instantiated.

  • Updaters:

Parameters

renameEntry

Rename an instance in the root reducer, keep its entire state

  • Updaters:

Parameters

mapStateActions

Actions handled mostly by mapState reducer. They manage map viewport update, toggle between 2d and 3d map, toggle between single and split maps.

fitBounds

Fit map viewport to bounds

Parameters

Examples

import {fitBounds} from '@kepler.gl/actions';
this.props.dispatch(fitBounds([-122.23, 37.127, -122.11, 37.456]));

togglePerspective

Toggle between 3d and 2d map.

Examples

import {togglePerspective} from '@kepler.gl/actions';
this.props.dispatch(togglePerspective());

toggleSplitMap

Toggle between single map or split maps

Parameters

Examples

import {toggleSplitMap} from '@kepler.gl/actions';
this.props.dispatch(toggleSplitMap());

updateMap

Update map viewport

Parameters

Examples

import {updateMap} from '@kepler.gl/actions';
this.props.dispatch(
  updateMap({latitude: 37.75043, longitude: -122.34679, width: 800, height: 1200})
);

layerColorUIChange

Set the color palette ui for layer color

Parameters

setExportMapFormat

Set the export map format (html, json)

Parameters

id instance id

dispatch action dispatcher

action the action object

Returns boolean - whether the action is a forward action

action the action object

Returns unwrapped action

id The id to forward to

action the action object {type: string, payload: *}

Type:

ActionTypes:

Updaters:

ActionTypes:

Updaters:

inputStyle

inputStyle.url style url e.g. 'mapbox://styles/heshan/xxxxxyyyyzzz'

inputStyle.id style url e.g. 'custom_style_1'

inputStyle.style actual mapbox style json

inputStyle.name style name

inputStyle.layerGroups layer groups that can be used to set map layer visibility

inputStyle.icon icon image data url

mapState mapState is optional

ActionTypes:

Updaters:

customMapStyle

customMapStyle.icon

customMapStyle.style

ActionTypes:

Updaters:

ActionTypes:

Updaters:

newStyles a {[id]: style} mapping

ActionTypes:

Updaters:

mapStyle new config {visibleLayerGroups: {label: false, road: true, background: true}}

ActionTypes:

Updaters:

styleType the style to change to

ActionTypes:

Updaters:

mapStyles <>

ActionTypes:

Updaters:

color [r, g, b]

ActionTypes:

Updaters:

data

data.datasets (<> | ) *required datasets can be a dataset or an array of datasets Each dataset object needs to have info and data property.

data.datasets.info -info of a dataset

data.datasets.info.id id of this dataset. If config is defined, id should matches the dataId in config.

data.datasets.info.label A display name of this dataset

data.datasets.data *required The data object, in a tabular format with 2 properties fields and rows

data.datasets.data.fields <> *required Array of fields,

data.datasets.data.fields.name *required Name of the field,

data.datasets.data.rows <> *required Array of rows, in a tabular format with fields and rows

data.options

data.options.centerMap default: true if centerMap is set to true kepler.gl will place the map view within the data points boundaries. options.centerMap will override config.mapState if passed in.

data.options.readOnly default: false if readOnly is set to true the left setting panel will be hidden

data.options.keepExistingConfig whether to keep exiting map data and associated layer filter interaction config default: false.

data.config this object will contain the full kepler.gl instance configuration {mapState, mapStyle, visState}

ActionTypes:

Updaters:

payload

payload.mapboxApiAccessToken mapboxApiAccessToken to be saved to mapStyle reducer

payload.mapboxApiUrl mapboxApiUrl to be saved to mapStyle reducer.

payload.mapStylesReplaceDefault mapStylesReplaceDefault to be saved to mapStyle reducer

ActionTypes:

Updaters: , ,

config *required The Config Object

options *optional The Option object

options.centerMap default: true if centerMap is set to true kepler.gl will place the map view within the data points boundaries

options.readOnly default: false if readOnly is set to true the left setting panel will be hidden

options.keepExistingConfig whether to keep exiting layer filter and interaction config default: false.

ActionTypes:

Updaters: , , ,

ActionTypes:

Updaters:

dataId dataset id this new filter is associated with

ActionTypes:

Updaters:

props new layer props

ActionTypes:

Updaters:

dataId ( | Arrary<>) single dataId or an array of dataIds

Returns {type: ActionTypes.APPLY_CPU_FILTER, dataId: }

ActionTypes:

Updaters:

idx index of filter to enlarge

ActionTypes:

Updaters:

config new config as key value map: {tooltip: {enabled: true}}

ActionTypes:

Updaters:

oldLayer layer to be updated

newConfig new config

ActionTypes:

Updaters:

oldLayer layer to be updated

idx -idx of text label to be updated

prop prop of text label, e,g, anchor, alignment, color, size, field

ActionTypes:

Updaters:

oldLayer layer to be updated

newType new type

ActionTypes:

Updaters:

oldLayer layer to be updated

newVisConfig new visConfig as a key value map: e.g. {opacity: 0.8}

ActionTypes:

Updaters:

oldLayer layer to be updated

newConfig new visual channel config

channel channel to be updated

ActionTypes:

Updaters: ,

files <> array of fileblob

ActionTypes:

Updaters: ,

Returns {type: ActionTypes.LOAD_FILES_ERR, error: }

ActionTypes:

Updaters:

info Object clicked, returned by deck.gl

ActionTypes:

Updaters:

info Object hovered, returned by deck.gl

ActionTypes:

Updaters:

Trigger map mouse moveevent, payload would be React-map-gl MapLayerMouseEvent

ActionTypes:

Updaters:

evt MapLayerMouseEvent

ActionTypes:

Updaters:

key dataset id

ActionTypes:

Updaters:

idx idx of filter to be removed

ActionTypes:

Updaters:

idx idx of layer to be removed

ActionTypes:

Updaters:

order <> an array of layer indexes

ActionTypes:

Updaters:

mode one of EDITOR_MODES

ActionTypes:

Updaters:

idx -idx of filter to be updated

prop prop of filter, e,g, dataId, name, value

valueIndex array properties like dataset require index in order to improve performance

ActionTypes:

Updaters:

idx

newProp key value mapping of new prop {yAxis: 'histogram'}

ActionTypes:

Updaters:

idx

newProp key value mapping of new prop {yAxis: 'histogram'}

ActionTypes:

Updaters:

dataId dataset id to show in table

ActionTypes:

Updaters:

idx idx of filter

ActionTypes:

Updaters:

mapIndex index of the split map

layerId id of the layer

ActionTypes:

Updaters:

value Current value of the slider

ActionTypes:

Updaters:

idx idx of filter

speed speed to change it to. speed is a multiplier

ActionTypes:

Updaters:

speed speed to change it to. speed is a multiplier

ActionTypes:

Updaters:

mode one of additive, normal and subtractive

ActionTypes:

Updaters:

datasets (<> | ) *required datasets can be a dataset or an array of datasets Each dataset object needs to have info and data property.

datasets.info -info of a dataset

datasets.info.id id of this dataset. If config is defined, id should matches the dataId in config.

datasets.info.label A display name of this dataset

datasets.data *required The data object, in a tabular format with 2 properties fields and rows

datasets.data.fields <> *required Array of fields,

datasets.data.fields.name *required Name of the field,

datasets.data.rows <> *required Array of rows, in a tabular format with fields and rows

options

options.centerMap default: true if centerMap is set to true kepler.gl will place the map view within the data points boundaries

options.readOnly default: false if readOnly is set to true the left setting panel will be hidden

config this object will contain the full kepler.gl instance configuration {mapState, mapStyle, visState}

ActionTypes:

Updaters:

notification The notification object to be added

ActionTypes:

Updaters:

ActionTypes:

Updaters:

ActionTypes:

Updaters:

datasetId id of the dataset to be deleted

ActionTypes:

Updaters:

id id of the notification to be removed

ActionTypes:

Updaters:

ActionTypes:

Updaters:

dataType one of 'text/csv'

ActionTypes:

Updaters:

payload set true to ony export filtered data

ActionTypes:

Updaters:

dataUri export image data uri

ActionTypes:

Updaters:

newSetting {ratio: '1x'}

ActionTypes:

Updaters:

datasetId dataset id

ActionTypes:

Updaters:

payload mapbox access token

ActionTypes:

Updaters:

id id of the dropdown

ActionTypes:

Updaters:

ActionTypes:

Updaters:

panelId map control panel id, one of the keys of:

ActionTypes:

Updaters:

id ( | null) id of modal to be shown, null to hide modals. One of:-

ActionTypes:

Updaters:

id id of side panel to be shown, one of layer, filter, interaction, map

ActionTypes:

id the id of the instance to be deleted

ActionTypes:

payload

payload.id *required The id of the instance

payload.mint Whether to use a fresh empty state, when mint: true it will always load a fresh state when the component is re-mounted. When mint: false it will register with existing instance state under the same id, when the component is unmounted then mounted again. Default: true

payload.mapboxApiAccessToken mapboxApiAccessToken to be saved in map-style reducer.

payload.mapboxApiUrl mapboxApiUrl to be saved in map-style reducer.

payload.mapStylesReplaceDefault mapStylesReplaceDefault to be saved in map-style reducer.

ActionTypes:

oldId *required old id

newId *required new id

ActionTypes:

Updaters:

bounds <> as [lngMin, latMin, lngMax, latMax]

ActionTypes:

Updaters:

ActionTypes:

Updaters: , ,

index ? index is provided, close split map at index

ActionTypes:

Updaters:

viewport viewport object container one or any of these properties width, height, latitude longitude, zoom, pitch, bearing, dragRotate

viewport.width ? Width of viewport

viewport.height ? Height of viewport

viewport.zoom ? Zoom of viewport

viewport.pitch ? Camera angle in degrees (0 is straight down)

viewport.bearing ? Map rotation in degrees (0 means north is up)

viewport.latitude ? Latitude center of viewport on map in mercator projection

viewport.longitude ? Longitude Center of viewport on map in mercator projection

viewport.dragRotate ? Whether to enable drag and rotate map into perspective viewport

ActionTypes:

Updaters:

oldLayer layer to be updated

prop which color prop

newConfig to be merged

ActionTypes:

Updaters:

payload map format

string
Function
Object
boolean
Object
Object
string
Object
Object
Object
string
string
Object
string
Object
Object
Object
Object
string
Object
Object
Object
string
Array
Object
Array
combinedUpdaters.addDataToMapUpdater
Object
Array
Object
Object
Object
string
string
Object
Array
Object
string
Array
Array
Object
boolean
boolean
boolean
Object
Object
string
string
Boolean
Object
Object
boolean
boolean
boolean
string
Object
string
string
string
Number
Object
Object
Object
Object
Number
string
Object
string
Object
Object
Object
Object
string
Array
Object
Object
Object
Object
https://visgl.github.io/react-map-gl/docs/api-reference/types#maplayermouseevent
Object
string
Number
Number
Array
Number
string
Number
string
Number
Number
Object
Number
Object
string
Number
Number
string
Number
Number
Number
Number
string
Array
Object
Object
Object
string
string
Object
Array
Object
string
Array
Array
Object
boolean
boolean
Object
Object
string
string
string
boolean
string
Object
string
string
string
string
DATA_TABLE_ID
DELETE_DATA_ID
ADD_DATA_ID
EXPORT_IMAGE_ID
EXPORT_DATA_ID
ADD_MAP_STYLE_ID
string
string
Object
string
boolean
string
string
Boolean
string
string
Array
Number
Number
Object
Number
Number
Number
Number
Number
Number
Number
boolean
Object
String
object
string
forwardActions
forwardTo
isForwardAction
unwrap
wrapTo
ActionTypes
mapStyleActions
addCustomMapStyle
inputMapStyle
loadCustomMapStyle
loadMapStyleErr
loadMapStyles
mapConfigChange
mapStyleChange
requestMapStyles
set3dBuildingColor
main
addDataToMap
keplerGlInit
receiveMapConfig
resetMapConfig
visStateActions
addFilter
addLayer
applyCPUFilter
enlargeFilter
interactionConfigChange
layerConfigChange
layerTextLabelChange
layerTypeChange
layerVisConfigChange
layerVisualChannelConfigChange
loadFiles
loadFilesErr
onLayerClick
onLayerHover
onMapClick
onMouseMove
removeDataset
removeFilter
removeLayer
reorderLayer
setEditorMode
setFilter
setFilterPlot
setMapInfo
showDatasetTable
toggleFilterAnimation
toggleLayerForMap
updateAnimationTime
updateFilterAnimationSpeed
updateLayerAnimationSpeed
updateLayerBlending
updateVisData
uiStateActions
addNotification
cleanupExportImage
hideExportDropdown
openDeleteModal
removeNotification
setExportData
setExportDataType
setExportFiltered
setExportImageDataUri
setExportImageSetting
setExportSelectedDataset
setUserMapboxAccessToken
showExportDropdown
startExportingImage
toggleMapControl
toggleModal
toggleSidePanel
rootActions
deleteEntry
registerEntry
renameEntry
mapStateActions
fitBounds
togglePerspective
toggleSplitMap
updateMap
layerColorUIChange
setExportMapFormat
ActionTypes.ADD_CUSTOM_MAP_STYLE
ActionTypes.INPUT_MAP_STYLE
ActionTypes.LOAD_CUSTOM_MAP_STYLE
ActionTypes.LOAD_MAP_STYLE_ERR
ActionTypes.LOAD_MAP_STYLES
ActionTypes.MAP_CONFIG_CHANGE
ActionTypes.MAP_STYLE_CHANGE
ActionTypes.REQUEST_MAP_STYLES
ActionTypes.SET_3D_BUILDING_COLOR
ActionTypes.ADD_DATA_TO_MAP
ActionTypes.INIT
ActionTypes.RECEIVE_MAP_CONFIG
ActionTypes.RESET_MAP_CONFIG
ActionTypes.ADD_FILTER
ActionTypes.ADD_LAYER
ActionTypes.APPLY_CPU_FILTER
ActionTypes.ENLARGE_FILTER
ActionTypes.INTERACTION_CONFIG_CHANGE
ActionTypes.LAYER_CONFIG_CHANGE
ActionTypes.LAYER_TEXT_LABEL_CHANGE
ActionTypes.LAYER_TYPE_CHANGE
ActionTypes.LAYER_VIS_CONFIG_CHANGE
ActionTypes.LAYER_VISUAL_CHANNEL_CHANGE
ActionTypes.LOAD_FILES
ActionTypes.LOAD_FILES_ERR
ActionTypes.LAYER_CLICK
ActionTypes.LAYER_HOVER
ActionTypes.MAP_CLICK
ActionTypes.MOUSE_MOVE
ActionTypes.REMOVE_DATASET
ActionTypes.REMOVE_FILTER
ActionTypes.REMOVE_LAYER
ActionTypes.REORDER_LAYER
ActionTypes.SET_EDITOR_MODE
ActionTypes.SET_FILTER
ActionTypes.SET_FILTER_PLOT
ActionTypes.SET_MAP_INFO
ActionTypes.SHOW_DATASET_TABLE
ActionTypes.TOGGLE_FILTER_ANIMATION
ActionTypes.TOGGLE_LAYER_FOR_MAP
ActionTypes.UPDATE_ANIMATION_TIME
ActionTypes.UPDATE_FILTER_ANIMATION_SPEED
ActionTypes.UPDATE_LAYER_ANIMATION_SPEED
ActionTypes.UPDATE_LAYER_BLENDING
ActionTypes.UPDATE_VIS_DATA
ActionTypes.ADD_NOTIFICATION
ActionTypes.CLEANUP_EXPORT_IMAGE
ActionTypes.HIDE_EXPORT_DROPDOWN
ActionTypes.OPEN_DELETE_MODAL
ActionTypes.REMOVE_NOTIFICATION
ActionTypes.SET_EXPORT_DATA
ActionTypes.SET_EXPORT_DATA_TYPE
ActionTypes.SET_EXPORT_FILTERED
ActionTypes.SET_EXPORT_IMAGE_DATA_URI
ActionTypes.SET_EXPORT_IMAGE_SETTING
ActionTypes.SET_EXPORT_SELECTED_DATASET
ActionTypes.SET_USER_MAPBOX_ACCESS_TOKEN
ActionTypes.SHOW_EXPORT_DROPDOWN
ActionTypes.START_EXPORTING_IMAGE
ActionTypes.TOGGLE_MAP_CONTROL
string
DEFAULT_MAP_CONTROLS
ActionTypes.TOGGLE_MODAL
ActionTypes.TOGGLE_SIDE_PANEL
ActionTypes.DELETE_ENTRY
ActionTypes.REGISTER_ENTRY
ActionTypes.RENAME_ENTRY
ActionTypes.FIT_BOUNDS
ActionTypes.TOGGLE_PERSPECTIVE
ActionTypes.TOGGLE_SPLIT_MAP
ActionTypes.UPDATE_MAP
ActionTypes.LAYER_COLOR_UI_CHANGE
ActionTypes.SET_EXPORT_MAP_FORMAT
mapStateUpdaters.fitBoundsUpdater
mapStateUpdaters.togglePerspectiveUpdater
mapStateUpdaters.updateMapUpdater
mapStyleUpdaters.addCustomMapStyleUpdater
mapStyleUpdaters.inputMapStyleUpdater
mapStyleUpdaters.loadCustomMapStyleUpdater
mapStyleUpdaters.loadMapStyleErrUpdater
mapStyleUpdaters.loadMapStylesUpdater
mapStyleUpdaters.mapConfigChangeUpdater
mapStyleUpdaters.mapStyleChangeUpdater
mapStyleUpdaters.requestMapStylesUpdater
mapStyleUpdaters.set3dBuildingColorUpdater
mapStyleUpdaters.initMapStyleUpdater
uiStateUpdaters.addNotificationUpdater
uiStateUpdaters.cleanupExportImage
uiStateUpdaters.hideExportDropdownUpdater
uiStateUpdaters.openDeleteModalUpdater
uiStateUpdaters.removeNotificationUpdater
uiStateUpdaters.setExportDataUpdater
uiStateUpdaters.setExportDataTypeUpdater
uiStateUpdaters.setExportFilteredUpdater
uiStateUpdaters.setExportImageDataUri
uiStateUpdaters.setExportImageSetting
uiStateUpdaters.setExportSelectedDatasetUpdater
uiStateUpdaters.setUserMapboxAccessTokenUpdater
uiStateUpdaters.showExportDropdownUpdater
uiStateUpdaters.startExportingImage
uiStateUpdaters.toggleMapControlUpdater
uiStateUpdaters.toggleModalUpdater
uiStateUpdaters.toggleSidePanelUpdater
uiStateUpdaters.setExportMapFormatUpdater
mapStateUpdaters.receiveMapConfigUpdater
mapStyleUpdaters.receiveMapConfigUpdater
mapStateUpdaters.resetMapConfigUpdater
mapStyleUpdaters.resetMapConfigMapStyleUpdater
mapStyleUpdaters.resetMapConfigMapStyleUpdater
mapStateUpdaters.toggleSplitMapUpdater
uiStateUpdaters.toggleSplitMapUpdater
uiStateUpdaters.loadFilesUpdater
uiStateUpdaters.loadFilesErrUpdater
visStateUpdaters.receiveMapConfigUpdater
visStateUpdaters.resetMapConfigUpdater
visStateUpdaters.addFilterUpdater
visStateUpdaters.addLayerUpdater
visStateUpdaters.applyCPUFilterUpdater
visStateUpdaters.enlargeFilterUpdater
visStateUpdaters.interactionConfigChangeUpdater
visStateUpdaters.layerConfigChangeUpdater
visStateUpdaters.layerTextLabelChangeUpdater
visStateUpdaters.layerTypeChangeUpdater
visStateUpdaters.layerVisConfigChangeUpdater
visStateUpdaters.layerVisualChannelChangeUpdater
visStateUpdaters.loadFilesUpdater
visStateUpdaters.loadFilesErrUpdater
visStateUpdaters.layerClickUpdater
visStateUpdaters.layerHoverUpdater
visStateUpdaters.mapClickUpdater
visStateUpdaters.mouseMoveUpdater
visStateUpdaters.removeDatasetUpdater
visStateUpdaters.removeFilterUpdater
visStateUpdaters.removeLayerUpdater
visStateUpdaters.reorderLayerUpdater
visStateUpdaters.setEditorModeUpdater
visStateUpdaters.setFilterUpdater
visStateUpdaters.setFilterPlotUpdater
visStateUpdaters.setMapInfoUpdater
visStateUpdaters.showDatasetTableUpdater
visStateUpdaters.toggleFilterAnimationUpdater
visStateUpdaters.toggleLayerForMapUpdater
visStateUpdaters.updateAnimationTimeUpdater
visStateUpdaters.updateFilterAnimationSpeedUpdater
visStateUpdaters.updateLayerAnimationSpeedUpdater
visStateUpdaters.updateLayerBlendingUpdater
visStateUpdaters.updateVisDataUpdater
visStateUpdaters.toggleSplitMapUpdater
visStateUpdaters.layerColorUIChangeUpdater