Provider
Last updated
Was this helpful?
Last updated
Was this helpful?
The default provider class
Parameters
props.icon
ReactElement React element
Examples
This method will be called when user select a map to load from the storage map viewer
Parameters
loadParams
any the loadParams property of each visualization object
Examples
This method is called to determine whether user already logged in to this provider
This method is called by kepler.gl demo app to pushes a new location to history, becoming the current location.
Parameters
This method is called after user share a map, to display the share url.
Parameters
This method is called to get the user name of the current user. It will be displayed in the cloud provider tile.
Whether this provider support upload map to a private storage. If truthy, user will be displayed with the storage save icon on the top right of the side bar.
Whether this provider support share map via a public url, if truthy, user will be displayed with a share map via url under the export map option on the top right of the side bar
This method is called to get a list of maps saved by the current logged in user.
Examples
This method will be called when user click the login button in the cloud provider tile. Upon login success, onCloudLoginSuccess
has to be called to notify kepler.gl UI
Parameters
This method will be called when user click the logout button under the cloud provider tile. Upon login success, onCloudLoginSuccess
has to be called to notify kepler.gl UI
Parameters
This method will be called to upload map for saving and sharing. Kepler.gl will package map data, config, title, description and thumbnail for upload to storage. With the option to overwrite already saved map, and upload as private or public map.
Parameters
The returned object of downloadMap
. The response object should contain: datasets: [], config: {}, and info: {} each dataset object should be {info: {id, label}, data: {...}} to inform how kepler should process your data object, pass in format
loadParams
any A property to be passed to downloadMap
props
props.name
props.displayName
props.thumbnail
thumbnail size object
props.thumbnail.width
thumbnail width in pixels
props.thumbnail.height
thumbnail height in pixels
Returns the map object containing dataset config info and format option
Returns true if a user already logged in
fullURL
Whether to return the full url with domain, or just the location (optional, default true
)
Returns mapUrl
fullUrl
Whether to return the full url with domain, or just the location (optional, default false
)
Returns shareUrl
Returns true if a user already logged in
Returns
Returns
Returns <> an array of Viz objects
onCloudLoginSuccess
callbacks to be called after login success
onCloudLogoutSuccess
callbacks to be called after logout success
param
param.mapData
the map object
param.mapData.map
{datasets. config, info: {title, description}}
param.mapData.thumbnail
A thumbnail of current map. thumbnail size can be defined by provider by this.thumbnail
param.options
(optional, default {}
)
param.options.overwrite
whether user choose to overwrite already saved map under the same name
param.options.isPublic
whether user wish to share the map with others. if isPublic is truthy, kepler will call this.getShareUrl() to display an URL they can share with others
Type:
map
map.datasets
<>
map.config
map.info
format
one of 'csv': csv file string, 'geojson': geojson object, 'row': row object, 'keplergl': datasets array saved using KeplerGlSchema.save
Type:
id
An unique id
title
The title of the map
description
The description of the map
imageUrl
The imageUrl of the map
lastModification
An epoch timestamp in milliseconds
privateMap
Optional, whether if this map is private to the user, or can be accessed by others via URL