RasterSource

A raster tile source.

class RasterSource(builder: RasterSource.Builder) : Source

See also

Constructors

RasterSource
Link copied to clipboard
fun RasterSource(builder: RasterSource.Builder)

Types

Builder
Link copied to clipboard

Builder for RasterSource.

class Builder(sourceId: String)
Companion
Link copied to clipboard

Static variables and methods.

object Companion

Functions

bindTo
Link copied to clipboard

Add the source to the Style.

open override fun bindTo(delegate: StyleInterface)
equals
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
getCachedSourceProperties
Link copied to clipboard
override fun getCachedSourceProperties(): Value
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): RasterSource
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): RasterSource
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): RasterSource
minzoom
Link copied to clipboard

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

fun minzoom(value: Long): RasterSource
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): RasterSource
tiles
Link copied to clipboard

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

fun tiles(value: List<String>): RasterSource
toString
Link copied to clipboard

Returns a human readable string that includes the cached properties of the source.

open override fun toString(): String
updateProperty
Link copied to clipboard
override fun updateProperty(property: PropertyValue<*>, throwRuntimeException: Boolean)
url
Link copied to clipboard

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

fun url(value: String): RasterSource
volatile
Link copied to clipboard

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

fun volatile(value: Boolean): RasterSource

Properties

attribution
Link copied to clipboard

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

val attribution: String?
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.

val bounds: List<Double>?
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.

val maxOverscaleFactorForParentTiles: Long?
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.

val maxzoom: Long?
minimumTileUpdateInterval
Link copied to clipboard

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

val minimumTileUpdateInterval: Double?
minzoom
Link copied to clipboard

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

val minzoom: Long?
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.

val prefetchZoomDelta: Long?
scheme
Link copied to clipboard

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

val scheme: Scheme?
sourceId
Link copied to clipboard

The ID of the Source.

override val sourceId: String
tiles
Link copied to clipboard

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

val tiles: List<String>?
tileSize
Link copied to clipboard

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

val tileSize: Long?
url
Link copied to clipboard

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

val url: String?
volatile
Link copied to clipboard

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

val volatile: Boolean?