Class ClusterManagerFlowsKt
-
- All Implemented Interfaces:
public final class ClusterManagerFlowsKt
-
-
Method Summary
Modifier and Type Method Description final static <T extends ClusterItem> Flow<Cluster<T>>clusterClickEvents(ClusterManager<T> $self)Returns a flow that emits when a cluster is clicked. final static <T extends ClusterItem> Flow<T>clusterItemClickEvents(ClusterManager<T> $self)Returns a flow that emits when a cluster item is clicked. final static <T extends ClusterItem> Flow<Cluster<T>>clusterInfoWindowClickEvents(ClusterManager<T> $self)Returns a flow that emits when a cluster's info window is clicked. final static <T extends ClusterItem> Flow<Cluster<T>>clusterInfoWindowLongClickEvents(ClusterManager<T> $self)Returns a flow that emits when a cluster's info window is long clicked. final static <T extends ClusterItem> Flow<T>clusterItemInfoWindowClickEvents(ClusterManager<T> $self)Returns a flow that emits when a cluster item's info window is clicked. final static <T extends ClusterItem> Flow<T>clusterItemInfoWindowLongClickEvents(ClusterManager<T> $self)Returns a flow that emits when a cluster item's info window is long clicked. -
-
Method Detail
-
clusterClickEvents
final static <T extends ClusterItem> Flow<Cluster<T>> clusterClickEvents(ClusterManager<T> $self)
Returns a flow that emits when a cluster is clicked. Using this to observe cluster clicks will override an existing listener (if any) to ClusterManager.setOnClusterClickListener.
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 (such as zooming). Under backpressure if the buffer is full,trySendreturnsfalse, allowing default SDK click handling to proceed.
-
clusterItemClickEvents
final static <T extends ClusterItem> Flow<T> clusterItemClickEvents(ClusterManager<T> $self)
Returns a flow that emits when a cluster item is clicked. Using this to observe cluster item clicks will override an existing listener (if any) to ClusterManager.setOnClusterItemClickListener.
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.
-
clusterInfoWindowClickEvents
final static <T extends ClusterItem> Flow<Cluster<T>> clusterInfoWindowClickEvents(ClusterManager<T> $self)
Returns a flow that emits when a cluster's info window is clicked. Using this to observe cluster info window clicks will override an existing listener (if any) to ClusterManager.setOnClusterInfoWindowClickListener.
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.
-
clusterInfoWindowLongClickEvents
final static <T extends ClusterItem> Flow<Cluster<T>> clusterInfoWindowLongClickEvents(ClusterManager<T> $self)
Returns a flow that emits when a cluster's info window is long clicked. Using this to observe cluster info window long clicks will override an existing listener (if any) to ClusterManager.setOnClusterInfoWindowLongClickListener.
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.
-
clusterItemInfoWindowClickEvents
final static <T extends ClusterItem> Flow<T> clusterItemInfoWindowClickEvents(ClusterManager<T> $self)
Returns a flow that emits when a cluster item's info window is clicked. Using this to observe cluster item info window clicks will override an existing listener (if any) to ClusterManager.setOnClusterItemInfoWindowClickListener.
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.
-
clusterItemInfoWindowLongClickEvents
final static <T extends ClusterItem> Flow<T> clusterItemInfoWindowLongClickEvents(ClusterManager<T> $self)
Returns a flow that emits when a cluster item's info window is long clicked. Using this to observe cluster item info window long clicks will override an existing listener (if any) to ClusterManager.setOnClusterItemInfoWindowLongClickListener.
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.
-
-
-
-