ZoomViewModel

interface ZoomViewModel

Manages the state and behavior of the zoom control. Implementations push updates as the map zoom state changes.

Thread Safety

This ViewModel is not thread-safe and must only be accessed from the Main thread.

  • All methods must be called from the Main (UI) thread

  • All StateFlow properties emit values on the Main thread

  • Concurrent access from multiple threads may lead to undefined behavior

Inheritors

Properties

Link copied to clipboard
abstract val isZoomInEnabled: StateFlow<Boolean>

Observable state indicating whether zooming in is currently available. When false, the zoom-in button should appear disabled.

Link copied to clipboard
abstract val isZoomOutEnabled: StateFlow<Boolean>

Observable state indicating whether zooming out is currently available. When false, the zoom-out button should appear disabled.

Functions

Link copied to clipboard
abstract fun onCleared()

Releases resources when the view model is no longer needed.

Link copied to clipboard
abstract fun onZoomInPressed()

Called when the user presses the zoom-in button.

Link copied to clipboard
abstract fun onZoomInReleased()

Called when the user releases the zoom-in button.

Link copied to clipboard
abstract fun onZoomOutPressed()

Called when the user presses the zoom-out button.

Link copied to clipboard
abstract fun onZoomOutReleased()

Called when the user releases the zoom-out button.