IonResource

external class IonResource(endpoint: Any, endpointResource: Resource)(source)

A Resource instance that encapsulates Cesium ion asset access. This object is normally not instantiated directly, use IonResource.fromAssetId.

Parameters

endpoint

The result of the Cesium ion asset endpoint service.

endpointResource

The resource used to retrieve the endpoint.

See also

Constructors

Link copied to clipboard
constructor(endpoint: Any, endpointResource: Resource)

Types

Link copied to clipboard
object Companion
Link copied to clipboard
sealed interface FetchImageOptions

Properties

Link copied to clipboard

Gets the credits required for attribution of the asset.

Functions

Link copied to clipboard
fun clone(result: Resource? = definedExternally): Resource

Duplicates a Resource instance.

Link copied to clipboard
suspend fun fetchImage(options: IonResource.FetchImageOptions? = definedExternally): CanvasImageSource?

Asynchronously loads the given image resource. Returns a promise that will resolve to an ImageBitmap if preferImageBitmap is true and the browser supports createImageBitmap or otherwise an Image once loaded, or reject if the image failed to load.

Link copied to clipboard