Class PolygonManagerFlowsKt

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final static Flow<Polygon> clickEvents(PolygonManager.Collection $self) Returns a flow that emits when a polygon in this collection is clicked.
      final static Polygon addPolygon(PolygonManager.Collection $self, Function1<PolygonOptions, Unit> optionsActions) Adds a new Polygon to the underlying map and to this PolygonManager.Collection with the provided optionsActions.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • clickEvents

         final static Flow<Polygon> clickEvents(PolygonManager.Collection $self)

        Returns a flow that emits when a polygon in this collection is clicked. Using this to observe polygon clicks will override an existing listener (if any) to PolygonManager.Collection.setOnPolygonClickListener.

        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, trySend returns false, allowing default SDK click handling to proceed.