Builder

Builder for RasterSource.

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: Expression): RasterSource.Builder
fun attribution(value: String): RasterSource.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: Expression): RasterSource.Builder
fun bounds(value: List<Double>): RasterSource.Builder
build
Link copied to clipboard

Build the RasterSource.

fun build(): RasterSource
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: Expression): RasterSource.Builder
fun maxOverscaleFactorForParentTiles(value: Long): RasterSource.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: Expression): RasterSource.Builder
fun maxzoom(value: Long): RasterSource.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: Expression): RasterSource.Builder
fun minimumTileUpdateInterval(value: Double): RasterSource.Builder
minzoom
Link copied to clipboard

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

fun minzoom(value: Expression): RasterSource.Builder
fun minzoom(value: Long): RasterSource.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 for zoom - delta in a 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: Expression): RasterSource.Builder
fun prefetchZoomDelta(value: Long): RasterSource.Builder
scheme
Link copied to clipboard

Influences the y direction of the tile coordinates. The global-mercator (aka Spherical Mercator) profile is assumed.

fun scheme(value: Expression): RasterSource.Builder
fun scheme(value: Scheme): RasterSource.Builder
tiles
Link copied to clipboard

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

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

Add a TileSet to the Source.

fun tileSet(tileSet: TileSet): RasterSource.Builder

Add a TileSet to the Source, using DSL.

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

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

fun tileSize(value: Expression): RasterSource.Builder
fun tileSize(value: Long): RasterSource.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: Expression): RasterSource.Builder
fun url(value: String): RasterSource.Builder
volatile
Link copied to clipboard

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

fun volatile(value: Expression): RasterSource.Builder
fun volatile(value: Boolean): RasterSource.Builder

Properties

sourceId
Link copied to clipboard

the ID of the source

val sourceId: String