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