Class MarkerManagerFlowsKt
-
- All Implemented Interfaces:
public final class MarkerManagerFlowsKt
-
-
Method Summary
Modifier and Type Method Description final static Flow<Marker>clickEvents(MarkerManager.Collection $self)Returns a flow that emits when a marker in this collection is clicked. final static MarkeraddMarker(MarkerManager.Collection $self, Function1<MarkerOptions, Unit> optionsActions)Adds a new Marker to the underlying map and to this MarkerManager.Collection with the provided optionsActions. final static Flow<Marker>infoWindowClickEvents(MarkerManager.Collection $self)Returns a flow that emits when a marker's info window in this collection is clicked. final static Flow<Marker>infoWindowLongClickEvents(MarkerManager.Collection $self)Returns a flow that emits when a marker's info window in this collection is long clicked. -
-
Method Detail
-
clickEvents
final static Flow<Marker> clickEvents(MarkerManager.Collection $self)
Returns a flow that emits when a marker in this collection is clicked. Using this to observe marker clicks will override an existing listener (if any) to MarkerManager.Collection.setOnMarkerClickListener.
Warning: This is a cold flow wrapping a single-listener SDK callback. Concurrently subscribing multiple collectors will result in listener hijacking, and cancelling any observer will unregister the active listener completely. Always share this flow (e.g. using kotlinx.coroutines.flow.shareIn) for multi-observer configurations.
Note on event consumption: The underlying SDK listener returns the result of
trySend().isSuccess. When an emission is accepted by the flow buffer, the click event is considered consumed (true), suppressing default SDK behavior. Under backpressure if the buffer is full,trySendreturnsfalse, allowing default SDK click handling to proceed.
-
addMarker
final static Marker addMarker(MarkerManager.Collection $self, Function1<MarkerOptions, Unit> optionsActions)
Adds a new Marker to the underlying map and to this MarkerManager.Collection with the provided optionsActions.
-
infoWindowClickEvents
final static Flow<Marker> infoWindowClickEvents(MarkerManager.Collection $self)
Returns a flow that emits when a marker's info window in this collection is clicked. Using this to observe info window clicks will override an existing listener (if any) to MarkerManager.Collection.setOnInfoWindowClickListener.
Warning: This is a cold flow wrapping a single-listener SDK callback. Concurrently subscribing multiple collectors will result in listener hijacking, and cancelling any observer will unregister the active listener completely. Always share this flow (e.g. using kotlinx.coroutines.flow.shareIn) for multi-observer configurations.
-
infoWindowLongClickEvents
final static Flow<Marker> infoWindowLongClickEvents(MarkerManager.Collection $self)
Returns a flow that emits when a marker's info window in this collection is long clicked. Using this to observe info window long clicks will override an existing listener (if any) to MarkerManager.Collection.setOnInfoWindowLongClickListener.
Warning: This is a cold flow wrapping a single-listener SDK callback. Concurrently subscribing multiple collectors will result in listener hijacking, and cancelling any observer will unregister the active listener completely. Always share this flow (e.g. using kotlinx.coroutines.flow.shareIn) for multi-observer configurations.
-
-
-
-