ImageSource

An image data source.

class ImageSource(builder: ImageSource.Builder) : Source

See also

<a href="https://docs.mapbox.com/mapbox-gl-js/style-spec/sources/#image">The online documentation</a>

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

Corners of image specified in longitude, latitude pairs.

fun coordinates(value: Expression): ImageSource
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 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): ImageSource
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<*>)
url
Link copied to clipboard

URL that points to an image.

fun url(value: Expression): ImageSource
fun url(value: String): ImageSource

Properties

coordinates
Link copied to clipboard

Corners of image specified in longitude, latitude pairs.

val coordinates: List<List<Double>>?
coordinatesAsExpression
Link copied to clipboard

Corners of image specified in longitude, latitude pairs.

val coordinatesAsExpression: Expression?
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.

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

val prefetchZoomDeltaAsExpression: Expression?
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?
urlAsExpression
Link copied to clipboard

URL that points to an image.

val urlAsExpression: Expression?

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)