Builder

class Builder

Constructors

Builder
Link copied to clipboard
open fun Builder()

Functions

accessToken
Link copied to clipboard

The access token that is used to access resources provided by Mapbox services.

open fun accessToken(accessToken: String): ResourceOptions.Builder
assetPath
Link copied to clipboard

The path to the folder where application assets are located. Resources whose protocol is `asset://` will be fetched from an asset folder or asset management system provided by respective platform. This option is ignored for Android platform. An iOS application may provide path to an application bundle's path.

open fun assetPath(assetPath: String): ResourceOptions.Builder
baseURL
Link copied to clipboard

The base URL that would be used to make HTTP requests. By default it is `https://api.mapbox.com`.

open fun baseURL(baseURL: String): ResourceOptions.Builder
build
Link copied to clipboard
open fun build(): ResourceOptions
dataPath
Link copied to clipboard

The path to the map data folder. The implementation will use this folder for storing offline style packages and temporary data. The application must have sufficient permissions to create files within the provided directory. If a dataPath is not provided, the default location will be used (the application data path defined in the `Mapbox Common SystemInformation API`).

open fun dataPath(dataPath: String): ResourceOptions.Builder
tileStore
Link copied to clipboard

The tile store instance. This setting can be applied only if tile store usage is enabled, otherwise it is ignored. If not set and tile store usage is enabled, a tile store at the default location will be created and used.

open fun tileStore(tileStore: TileStore): ResourceOptions.Builder
tileStoreUsageMode
Link copied to clipboard

The tile store usage mode.

open fun tileStoreUsageMode(tileStoreUsageMode: TileStoreUsageMode): ResourceOptions.Builder

Extensions

applyDefaultParams
Link copied to clipboard

Get a default ResourceOptions.Builder with Mapbox pre-defined options, and with the access token taken from the Android resources(if available).