DefaultZoomViewModel

Default implementation of ZoomViewModel that integrates with ZoomControlModel.

Listens to the native zoom control model and exposes zoom-in/zoom-out enabled states as kotlinx.coroutines.flow.StateFlow. Delegates press/release actions to the model.

Parameters

map

The map instance to control zoom for.

Constructors

Link copied to clipboard
constructor(map: Map)

Properties

Link copied to clipboard
open override 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
open override 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
open override fun onCleared()

Releases resources when the view model is no longer needed.

Link copied to clipboard
open override fun onZoomInPressed()

Called when the user presses the zoom-in button.

Link copied to clipboard
open override fun onZoomInReleased()

Called when the user releases the zoom-in button.

Link copied to clipboard
open override fun onZoomOutPressed()

Called when the user presses the zoom-out button.

Link copied to clipboard
open override fun onZoomOutReleased()

Called when the user releases the zoom-out button.