Redux
Package
Version
Downloads
CARTO Slice
createCartoSlice
Param
Type
Description
import { POSITRON } from "@carto/react-basemaps";
export const initialState = {
viewState: {
latitude: 31.802892,
longitude: -103.007813,
zoom: 2,
pitch: 0,
bearing: 0,
dragRotate: false,
},
basemap: POSITRON,
credentials: {
username: "public",
apiKey: "default_public",
serverUrlTemplate: "https://{user}.carto.com",
},
googleApiKey: "",
};addSource
Param
Type
Description
removeSource
Param
Type
Description
addLayer
Param
Type
Description
updateLayer
Param
Type
Description
removeLayer
Param
Type
Description
setCredentials
Param
Type
Description
setBasemap
Param
Type
Description
addFilter
Param
Type
Description
removeFilter
Param
Type
Description
clearFilters
Type
Description
selectSourceById
Param
Type
Description
setViewState
Param
Type
Description
setWidgetLoadingState
Param
Type
Description
removeWidgetLoadingState
Param
Type
Description
setAllWidgetsLoadingStates
Param
Type
Description
OAuth Slice
createOauthCartoSlice
Param
Type
Description
setTokenAndUserInfoAsync
Param
Type
Description
logout
selectOAuthCredentials
Param
Type
Description
Last updated
Was this helpful?
