Class CircleManagerFlowsKt
-
- All Implemented Interfaces:
public final class CircleManagerFlowsKt
-
-
Method Summary
Modifier and Type Method Description final static CircleaddCircle(CircleManager.Collection $self, Function1<CircleOptions, Unit> optionsActions)Adds a new Circle to the underlying map and to this CircleManager.Collection with the provided optionsActions. final static Flow<Circle>clickEvents(CircleManager.Collection $self)Returns a flow that emits when a circle in this collection is clicked. -
-
Method Detail
-
addCircle
final static Circle addCircle(CircleManager.Collection $self, Function1<CircleOptions, Unit> optionsActions)
Adds a new Circle to the underlying map and to this CircleManager.Collection with the provided optionsActions.
-
clickEvents
final static Flow<Circle> clickEvents(CircleManager.Collection $self)
Returns a flow that emits when a circle in this collection is clicked. Using this to observe circle clicks will override an existing listener (if any) to CircleManager.Collection.setOnCircleClickListener.
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.
-
-
-
-