DefaultMinimapControllerViewModel

class DefaultMinimapControllerViewModel(sdkContext: Context, options: MapControllerOptions) : MapControllerViewModel, AutoCloseable

MapControllerViewModel of a minimap: a non-interactive map with the Lite graphics preset, created with MapControllerFactory.MiniMap.

Creation starts in the constructor. The instance must be closed when the minimap is no longer needed; closing also closes the controller.

Main thread only.

Constructors

Link copied to clipboard
constructor(sdkContext: Context, options: MapControllerOptions)

Properties

Link copied to clipboard
open override val state: StateFlow<MapControllerState>

Functions

Link copied to clipboard
open override fun close()
Link copied to clipboard
fun MapControllerViewModel.collectController(): MapController?

The controller as composition state: null while the map is not created, triggers recomposition when the map appears or changes.

Link copied to clipboard
fun MapControllerViewModel.collectMap(): Map?

Same as collectController, but returns Map of the controller.