PolygonAnnotationGroup

fun PolygonAnnotationGroup(annotations: List<PolygonAnnotationOptions>, annotationConfig: AnnotationConfig? = null, polygonAnnotationGroupState: PolygonAnnotationGroupState = remember { PolygonAnnotationGroupState() })

Composable function to add a PolygonAnnotationGroup to the Map. For convenience, if there's no need to hoist the polygonAnnotationGroupState, use PolygonAnnotationGroup(annotations, annotationConfig, onClick, init) with trailing lambda instead.

The PolygonAnnotationGroup is more performant than adding multiple PolygonAnnotation individually, because the PolygonAnnotationGroup is added to the map as a single layer.

PointAnnotationGroup and CircleAnnotationGroup can also be clustered based on the configuration, see AnnotationConfig.annotationSourceOptions and ClusterOptions for more details.

Parameters

annotations

List of PolygonAnnotationOptions to be added to the group.

annotationConfig

Configuration for PolygonAnnotationGroup.

polygonAnnotationGroupState

The state holder for PolygonAnnotationGroup properties.


inline fun PolygonAnnotationGroup(annotations: List<PolygonAnnotationOptions>, annotationConfig: AnnotationConfig? = null, crossinline init: PolygonAnnotationGroupState.() -> Unit)

Composable function to add a PolygonAnnotationGroup to the Map.

The PolygonAnnotationGroup is more performant than adding multiple PolygonAnnotation individually, because the PolygonAnnotationGroup is added to the map as a single layer.

PointAnnotationGroup and CircleAnnotationGroup can also be clustered based on the configuration, see AnnotationConfig.annotationSourceOptions and ClusterOptions for more details.

Parameters

annotations

List of PolygonAnnotationOptions to be added to the group.

annotationConfig

Configuration for PolygonAnnotationGroup.

init

the lambda that will be applied to the remembered PolygonAnnotationGroupState.


fun PolygonAnnotationGroup(annotations: List<PolygonAnnotationOptions>, annotationConfig: AnnotationConfig? = null, onClick: (PolygonAnnotation) -> Boolean = { false }, polygonAnnotationGroupState: PolygonAnnotationGroupState = remember { PolygonAnnotationGroupState() })

Deprecated

This method is deprecated, and will be removed in next major release.

Replace with

PolygonAnnotationGroup(annotations, annotationConfig, polygonAnnotationGroupState)

Composable function to add a PolygonAnnotationGroup to the Map. For convenience, if there's no need to hoist the polygonAnnotationGroupState, use PolygonAnnotationGroup(annotations, annotationConfig, onClick, init) with trailing lambda instead.

The PolygonAnnotationGroup is more performant than adding multiple PolygonAnnotation individually, because the PolygonAnnotationGroup is added to the map as a single layer.

PointAnnotationGroup and CircleAnnotationGroup can also be clustered based on the configuration, see AnnotationConfig.annotationSourceOptions and ClusterOptions for more details.

Parameters

annotations

List of PolygonAnnotationOptions to be added to the group.

annotationConfig

Configuration for PolygonAnnotationGroup.

onClick

Callback to be invoked when one of the PolygonAnnotation in the cluster is clicked. The clicked PolygonAnnotation will be passed as parameter.

polygonAnnotationGroupState

The state holder for PolygonAnnotationGroup properties.


inline fun PolygonAnnotationGroup(annotations: List<PolygonAnnotationOptions>, annotationConfig: AnnotationConfig? = null, noinline onClick: (PolygonAnnotation) -> Boolean = { false }, crossinline init: PolygonAnnotationGroupState.() -> Unit)

Deprecated

This method is deprecated, and will be removed in next major release.

Replace with

PolygonAnnotationGroup(annotations, annotationConfig, init)

Composable function to add a PolygonAnnotationGroup to the Map.

The PolygonAnnotationGroup is more performant than adding multiple PolygonAnnotation individually, because the PolygonAnnotationGroup is added to the map as a single layer.

PointAnnotationGroup and CircleAnnotationGroup can also be clustered based on the configuration, see AnnotationConfig.annotationSourceOptions and ClusterOptions for more details.

Parameters

annotations

List of PolygonAnnotationOptions to be added to the group.

annotationConfig

Configuration for PolygonAnnotationGroup.

onClick

Callback to be invoked when one of the PolygonAnnotation in the cluster is clicked. The clicked PolygonAnnotation will be passed as parameter.

init

the lambda that will be applied to the remembered PolygonAnnotationGroupState.