Class GroundOverlayManagerFlowsKt
-
- All Implemented Interfaces:
public final class GroundOverlayManagerFlowsKt
-
-
Method Summary
Modifier and Type Method Description final static Flow<GroundOverlay>clickEvents(GroundOverlayManager.Collection $self)Returns a flow that emits when a ground overlay in this collection is clicked. final static GroundOverlayaddGroundOverlay(GroundOverlayManager.Collection $self, Function1<GroundOverlayOptions, Unit> optionsActions)Adds a new GroundOverlay to the underlying map and to this GroundOverlayManager.Collection with the provided optionsActions. -
-
Method Detail
-
clickEvents
final static Flow<GroundOverlay> clickEvents(GroundOverlayManager.Collection $self)
Returns a flow that emits when a ground overlay in this collection is clicked. Using this to observe ground overlay clicks will override an existing listener (if any) to GroundOverlayManager.Collection.setOnGroundOverlayClickListener.
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.
-
addGroundOverlay
final static GroundOverlay addGroundOverlay(GroundOverlayManager.Collection $self, Function1<GroundOverlayOptions, Unit> optionsActions)
Adds a new GroundOverlay to the underlying map and to this GroundOverlayManager.Collection with the provided optionsActions.
-
-
-
-