ImageSource

An image data source.

class ImageSource(builder: ImageSource.Builder) : Source

See also

Constructors

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

Types

Builder
Link copied to clipboard

Builder for ImageSource.

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)
coordinates
Link copied to clipboard

Corners of image specified in longitude, latitude pairs.

fun coordinates(value: List<List<Double>>): ImageSource
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
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): ImageSource
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

URL that points to an image.

fun url(value: String): ImageSource

Properties

coordinates
Link copied to clipboard

Corners of image specified in longitude, latitude pairs.

val coordinates: List<List<Double>>?
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?
sourceId
Link copied to clipboard

The ID of the Source.

override val sourceId: String
url
Link copied to clipboard

URL that points to an image.

val url: String?

Extensions

updateImage
Link copied to clipboard

Updates the image of an image style source.

See https://docs.mapbox.com/mapbox-gl-js/style-spec/#sources-image

fun ImageSource.updateImage(image: Image)