Provider

Table of Contents

Provider

The default provider class

Parameters

Examples

downloadMap

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

Returns MapResponse the map object containing dataset config info and format option

getAccessToken

This method is called to determine whether user already logged in to this provider

Returns booleanarrow-up-right true if a user already logged in

getMapUrl

This method is called by kepler.gl demo app to pushes a new location to history, becoming the current location.

Parameters

  • fullURL booleanarrow-up-right Whether to return the full url with domain, or just the location (optional, default true)

Returns stringarrow-up-right mapUrl

getShareUrl

This method is called after user share a map, to display the share url.

Parameters

  • fullUrl booleanarrow-up-right Whether to return the full url with domain, or just the location (optional, default false)

Returns stringarrow-up-right shareUrl

getUserName

This method is called to get the user name of the current user. It will be displayed in the cloud provider tile.

Returns stringarrow-up-right true if a user already logged in

hasPrivateStorage

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.

Returns booleanarrow-up-right

hasSharingUrl

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

Returns booleanarrow-up-right

listMaps

This method is called to get a list of maps saved by the current logged in user.

Examples

Returns Arrayarrow-up-right<Viz> an array of Viz objects

login

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

logout

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

uploadMap

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

MapResponse

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

Type: Objectarrow-up-right

Properties

Viz

Type: Objectarrow-up-right

Properties

Last updated

Was this helpful?