Builder

Builder for VectorSource.

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

Build the VectorSource.

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

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

fun minzoom(value: Expression): VectorSource.Builder
fun minzoom(value: Long): VectorSource.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): VectorSource.Builder
fun prefetchZoomDelta(value: Long): VectorSource.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): VectorSource.Builder
fun scheme(value: Scheme): VectorSource.Builder
tiles
Link copied to clipboard

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

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

Add a TileSet to the Source.

fun tileSet(tileSet: TileSet): VectorSource.Builder

Add a TileSet to the Source, using DSL.

fun tileSet(tilejson: String, tiles: List<String>, block: TileSet.Builder.() -> Unit): VectorSource.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): VectorSource.Builder
fun url(value: String): VectorSource.Builder
volatile
Link copied to clipboard

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

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

Properties

sourceId
Link copied to clipboard

the ID of the source

val sourceId: String