Builder

class Builder

Constructors

Builder
Link copied to clipboard
open fun Builder()

Functions

acceptExpired
Link copied to clipboard

Accepts expired data when loading tiles. This flag should be set to true to accept expired responses. When a tile is already loaded but expired, no attempt will be made to refresh the data. This may lead to outdated data. Set to false to ensure that data for a tile is up-to-date. Set to true to continue loading a group without updating expired data for tiles that are already downloaded.

open fun acceptExpired(acceptExpired: Boolean): TileRegionLoadOptions.Builder
averageBytesPerSecond
Link copied to clipboard

Limits the download speed of the tile region. Note that this is not a strict bandwidth limit, but only limits the average download speed. tile regions may be temporarily downloaded with higher speed, then pause downloading until the rolling average has dropped below this value. If unspecified, the download speed will not be restricted. Note that this functionality is not currently implemented.

open fun averageBytesPerSecond(averageBytesPerSecond: Integer): TileRegionLoadOptions.Builder
build
Link copied to clipboard
open fun build(): TileRegionLoadOptions
descriptors
Link copied to clipboard

The tile region's tileset descriptors. If provided, updates the tile region's tileset descriptors that define the tilesets and zoom ranges of the tiles for the tile region. Providing an empty tileset descriptors list is equivalent to removeTileRegion() call.

open fun descriptors(descriptors: List<TilesetDescriptor>): TileRegionLoadOptions.Builder
extraOptions
Link copied to clipboard

Extra tile region load options. If provided, contains an object value with extra tile region load options. There are currently no extra options.

open fun extraOptions(extraOptions: Value): TileRegionLoadOptions.Builder
geometry
Link copied to clipboard

The tile region's associated geometry. If provided, updates the tile region's associated geometry i.e. geometry, which is used in the tile cover algorithm to find out a set of tiles to be loaded for the tile region. Providing an empty geometry list is equivalent to removeTileRegion() call.

open fun geometry(geometry: Geometry): TileRegionLoadOptions.Builder
metadata
Link copied to clipboard

A custom Mapbox Value associated with this tile region for storing metadata. If provided, the custom value value will be stored alongside the tile region. Previous values will be replaced with the new value. Developers can use this field to store custom metadata associated with a tile region. This value can be retrieved with getTileRegionMetadata().

open fun metadata(metadata: Value): TileRegionLoadOptions.Builder
networkRestriction
Link copied to clipboard

Controls which networks may be used to load the tile. By default, all networks are allowed. However, in some situations, it's useful to limit the kind of networks that are allowed, e.g. to ensure that data is only transferred over a connection that doesn't incur cost to the user, like a WiFi connection, and prohibit data transfer over expensive connections like cellular.

open fun networkRestriction(networkRestriction: NetworkRestriction): TileRegionLoadOptions.Builder
startLocation
Link copied to clipboard

Starts loading the tile region at the given location and then proceeds to tiles that are further away from it. Note that this functionality is not currently implemented.

open fun startLocation(startLocation: Point): TileRegionLoadOptions.Builder