fromResource

abstract fun fromResource(imageResource: ImageResource): ImageProvider

Returns an ImageProvider that draws imageResource.

Parameters

imageResource

the moko-resources image to draw.


abstract fun fromResource(imageResource: ImageResource, isCacheable: Boolean): ImageProvider

Returns an ImageProvider that draws imageResource, letting MapKit keep the decoded image in its own cache.

Parameters

imageResource

the moko-resources image to draw.

isCacheable

honoured on Android only. The iOS implementation builds the provider from a UIImage and has no caching to control, so it ignores this flag and behaves exactly like fromResource.