PointOfInterest

fun PointOfInterest(type: PointOfInterestType, isSelected: Boolean, onSelectedChange: (Boolean) -> Unit, modifier: Modifier = Modifier, interactionSource: MutableInteractionSource = remember { MutableInteractionSource() })

A point of interest (POI) is a specific point location on a map used to highlight one or some elements.

The POI can display either one or two content slots.

For more information visit the ODS Core Documentation

Point of Interest with One Content Slot Sample Point of Interest with Two Content Slots Sample

Selecting a POI

When the POI is selected, it gets highlighted with a border: Selected Point of Interest with One Content Slot Sample Selected Point of Interest with Two Content Slots Sample

Parameters

type

The type of POI to display, which can be either PointOfInterestType.One for a single content slot or PointOfInterestType.Two for two content slots stacked vertically.

modifier

An optional Modifier to be applied to the point of interest. Defaults to Modifier.

isSelected

An optional Boolean indicating whether the POI is currently selected. Defaults to false.

interactionSource

An optional hoisted MutableInteractionSource for observing and emitting Interactions for the point of interest. You can use this to change the point of interest's appearance or preview the point of interest in different states. Defaults to a remembered MutableInteractionSource.

See also