MapComposableState

class MapComposableState(mapOptions: MapOptions)

State that allows control over various map-related parameters and behaviors, such as theme, copyright configuration, FPS settings, touch events, screenshot functionality, and gestures.

Notes:

  • Main Thread Requirement: All interactions with this class, including setting properties or invoking methods, must be performed on the main thread to ensure thread safety and proper UI behavior.

  • MapOptions.mapTheme is not used. Use the setTheme method instead to update the theme.

  • Some functionalities, such as taking snapshots or gesture management, are only available when the map is ready (map is not null).

Constructors

Link copied to clipboard
constructor(mapOptions: MapOptions)

Properties

Link copied to clipboard
val copyrightGravity: StateFlow<Int>
Link copied to clipboard
Link copied to clipboard
var fpsCounterCallback: (Fps) -> Unit?
Link copied to clipboard
val map: StateFlow<Map?>
Link copied to clipboard
val maxFps: StateFlow<Fps?>
Link copied to clipboard
var objectLongTouchCallback: MapObjectTappedCallback?
Link copied to clipboard
var objectTappedCallback: MapObjectTappedCallback?
Link copied to clipboard
val powerSavingMaxFps: StateFlow<Fps?>
Link copied to clipboard
Link copied to clipboard
val theme: StateFlow<MapTheme>
Link copied to clipboard
var touchEventsObserver: TouchEventsObserver?

Functions

Link copied to clipboard
fun gestureManager(): GestureManager?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Updates the URI opener for copyright clicks.

Link copied to clipboard
fun setMaxFps(value: Fps?)
Link copied to clipboard
fun setPowerSavingMaxFps(value: Fps?)
Link copied to clipboard

Hides or displays the SDK version next to the copyright text.

Link copied to clipboard
fun setTheme(value: MapTheme)
Link copied to clipboard
fun takeSnapshot(alignment: Alignment = Alignment.BOTTOM_RIGHT): Future<ImageData>?

Takes a snapshot of the map at the specified alignment.