ImageSource

Image source, allows a georeferenced raster image to be shown on the map.

The georeferenced image scales and rotates as the user zooms and rotates the map. The geographic location of the raster image content, supplied with LatLngQuad, can be non-axis aligned.

Constructors

Link copied to clipboard
constructor(id: String?, coordinates: LatLngQuad?, url: URL)

Create an ImageSource from coordinates and an image URL

constructor(id: String?, coordinates: LatLngQuad?, uri: URI)

Create an ImageSource from coordinates and an image URI

constructor(id: String?, coordinates: LatLngQuad?, bitmap: Bitmap)

Create an ImageSource from coordinates and a bitmap image

constructor(id: String?, coordinates: LatLngQuad?, @DrawableRes resourceId: Int)

Create an ImageSource from coordinates and a bitmap image resource

Properties

Link copied to clipboard
@get:NonNull
open val attribution: String
Link copied to clipboard
@get:NonNull
open val id: String
Link copied to clipboard
@get:NonNull
open var isVolatile: Boolean
Link copied to clipboard
Link copied to clipboard
open val nativePtr: Long
Link copied to clipboard
Link copied to clipboard
val uri: String?

Get the source URI.

Link copied to clipboard
val url: String?

Functions

Link copied to clipboard
fun setCoordinates(latLngQuad: LatLngQuad?)

Updates the latitude and longitude of the four corners of the image

Link copied to clipboard
open fun setDetached()
Link copied to clipboard
fun setImage(bitmap: Bitmap)

Updates the source image to a bitmap

fun setImage(@DrawableRes resourceId: Int)

Updates the source image to a bitmap image resource

Link copied to clipboard
fun setUri(uri: URI)
fun setUri(uri: String?)

Updates the source image URI.

Link copied to clipboard
fun setUrl(url: URL)
fun setUrl(url: String?)

Updates the source image url