Builder

Builder for RasterDemSource.

class Builder(sourceId: String)

Parameters

sourceId

the ID of the source

Constructors

Builder
Link copied to clipboard

the ID of the source

fun Builder(sourceId: String)

Functions

attribution
Link copied to clipboard

Contains an attribution to be displayed when the map is shown to a user.

fun attribution(value: String): RasterDemSource.Builder
bounds
Link copied to clipboard

An array containing the longitude and latitude of the southwest and northeast corners of the source's bounding box in the following order: [sw.lng, sw.lat, ne.lng, ne.lat]. When this property is included in a source, no tiles outside of the given bounds are requested by Mapbox GL.

fun bounds(value: List<Double>): RasterDemSource.Builder
build
Link copied to clipboard

Build the RasterDemSource.

fun build(): RasterDemSource
encoding
Link copied to clipboard

The encoding used by this source. Mapbox Terrain RGB is used by default

fun encoding(value: Encoding): RasterDemSource.Builder
equals
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
hashCode
Link copied to clipboard
open override fun hashCode(): Int
maxOverscaleFactorForParentTiles
Link copied to clipboard

When a set of tiles for a current zoom level is being rendered and some of the ideal tiles that cover the screen are not yet loaded, parent tile could be used instead. This might introduce unwanted rendering side-effects, especially for raster tiles that are overscaled multiple times. This property sets the maximum limit for how much a parent tile can be overscaled.

fun maxOverscaleFactorForParentTiles(value: Long): RasterDemSource.Builder
maxzoom
Link copied to clipboard

Maximum zoom level for which tiles are available, as in the TileJSON spec. Data from tiles at the maxzoom are used when displaying the map at higher zoom levels.

fun maxzoom(value: Long): RasterDemSource.Builder
minimumTileUpdateInterval
Link copied to clipboard

Minimum tile update interval in milliseconds, which is used to throttle the tile update network requests.

fun minimumTileUpdateInterval(value: Double): RasterDemSource.Builder
minzoom
Link copied to clipboard

Minimum zoom level for which tiles are available, as in the TileJSON spec.

fun minzoom(value: Long): RasterDemSource.Builder
prefetchZoomDelta
Link copied to clipboard

When loading a map, if PrefetchZoomDelta is set to any number greater than 0, the map will first request a tile at zoom level lower than zoom - delta, but so that the zoom level is multiple of delta, in an attempt to display a full map at lower resolution as quick as possible. It will get clamped at the tile source minimum zoom. The default delta is 4.

fun prefetchZoomDelta(value: Long): RasterDemSource.Builder
tiles
Link copied to clipboard

An array of one or more tile source URLs, as in the TileJSON spec.

fun tiles(value: List<String>): RasterDemSource.Builder
tileSet
Link copied to clipboard

Add a TileSet to the Source.

fun tileSet(tileSet: TileSet): RasterDemSource.Builder

Add a TileSet to the Source, using DSL.

fun tileSet(tilejson: String, tiles: List<String>, block: TileSet.RasterDemBuilder.() -> Unit): RasterDemSource.Builder
tileSize
Link copied to clipboard

The minimum visual size to display tiles for this layer. Only configurable for raster layers.

fun tileSize(value: Long): RasterDemSource.Builder
toString
Link copied to clipboard
open override fun toString(): String
url
Link copied to clipboard

A URL to a TileJSON resource. Supported protocols are http:, https:, and mapbox://<Tileset ID>.

fun url(value: String): RasterDemSource.Builder
volatile
Link copied to clipboard

A setting to determine whether a source's tiles are cached locally.

fun volatile(value: Boolean): RasterDemSource.Builder

Properties

sourceId
Link copied to clipboard

the ID of the source

val sourceId: String