MOKOImageLoader

interface MOKOImageLoader

Turns a moko-resources ImageResource into an ImageProvider that map objects accept as an icon.

Implementations are platform specific: AndroidMOKOImageLoader needs an Android Context, IOSMOKOImageLoader needs nothing. In Compose code use rememberMOKOImageLoader() from yandex-mapkit-kmp-moko-compose instead of instantiating them by hand.

Inheritors

Functions

Link copied to clipboard
abstract fun fromResource(imageResource: ImageResource): ImageProvider

Returns an ImageProvider that draws imageResource.

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

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