Map

actual fun Map(modifier: Modifier, cameraPosition: CameraPosition?, properties: MapProperties, uiSettings: MapUISettings, clusterSettings: ClusterSettings, markers: List<Marker>, circles: List<Circle>, polygons: List<Polygon>, polylines: List<Polyline>, onCameraMove: (CameraPosition) -> Unit?, onMarkerClick: (Marker) -> Unit?, onMarkerDragEnd: (Marker) -> Unit?, onCircleClick: (Circle) -> Unit?, onPolygonClick: (Polygon) -> Unit?, onPolylineClick: (Polyline) -> Unit?, onMapClick: (Coordinates) -> Unit?, onMapLongClick: (Coordinates) -> Unit?, onPOIClick: (Coordinates) -> Unit?, onMapLoaded: () -> Unit?, geoJsonLayers: List<GeoJsonLayer>, customMarkerContent: Map<String, (Marker) -> Unit>, webCustomMarkerContent: Map<String, (Marker) -> String>)

Android implementation of the Map composable using Google Maps.

expect fun Map(modifier: Modifier = Modifier, cameraPosition: CameraPosition? = null, properties: MapProperties = MapProperties(), uiSettings: MapUISettings = MapUISettings(), clusterSettings: ClusterSettings = ClusterSettings(), markers: List<Marker> = emptyList(), circles: List<Circle> = emptyList(), polygons: List<Polygon> = emptyList(), polylines: List<Polyline> = emptyList(), onCameraMove: (CameraPosition) -> Unit? = null, onMarkerClick: (Marker) -> Unit? = null, onMarkerDragEnd: (Marker) -> Unit? = null, onCircleClick: (Circle) -> Unit? = null, onPolygonClick: (Polygon) -> Unit? = null, onPolylineClick: (Polyline) -> Unit? = null, onMapClick: (Coordinates) -> Unit? = null, onMapLongClick: (Coordinates) -> Unit? = null, onPOIClick: (Coordinates) -> Unit? = null, onMapLoaded: () -> Unit? = null, geoJsonLayers: List<GeoJsonLayer> = emptyList(), customMarkerContent: Map<String, @Composable (Marker) -> Unit> = emptyMap(), webCustomMarkerContent: Map<String, (Marker) -> String> = emptyMap())

A cross-platform map component that provides a unified interface for native map APIs across Android, iOS, and Desktop (JVM).

This composable acts as a bridge between platform-specific map engines:

  • Android: Renders native Google Maps SDK for Android.

  • iOS: Renders native Google Maps SDK for iOS.

  • Desktop (JVM): Renders Google Maps JS via an embedded WebView.

Parameters

modifier

The modifier to be applied to the map component

cameraPosition

The initial camera position of the map. If null, the map will use default position

properties

Configuration properties for the map behavior and appearance

uiSettings

UI settings that control interactive elements and gestures

clusterSettings

Configuration settings for marker clustering behavior

markers

List of markers to display on the map

circles

List of circles to display on the map

polygons

List of polygons to display on the map

polylines

List of polylines to display on the map

onCameraMove

Callback invoked when the map camera position changes due to user interaction

onMarkerClick

Callback invoked when a marker is clicked

onMarkerDragEnd

Callback invoked when a marker drag operation ends

onCircleClick

Callback invoked when a circle is clicked

onPolygonClick

Callback invoked when a polygon is clicked

onPolylineClick

Callback invoked when a polyline is clicked

onMapClick

Callback invoked when the user clicks on the map (not on POI or markers)

onMapLongClick

Callback invoked when the user long-clicks on the map

onPOIClick

Callback invoked when the user clicks on a Point of Interest

onMapLoaded

Callback invoked when the map has finished loading

geoJsonLayers

List of GeoJSON layers to display on the map

customMarkerContent

Map of content IDs to Composable functions for custom marker content.

webCustomMarkerContent

Map of content IDs to a function returning an HTML string.

actual fun Map(modifier: Modifier, cameraPosition: CameraPosition?, properties: MapProperties, uiSettings: MapUISettings, clusterSettings: ClusterSettings, markers: List<Marker>, circles: List<Circle>, polygons: List<Polygon>, polylines: List<Polyline>, onCameraMove: (CameraPosition) -> Unit?, onMarkerClick: (Marker) -> Unit?, onMarkerDragEnd: (Marker) -> Unit?, onCircleClick: (Circle) -> Unit?, onPolygonClick: (Polygon) -> Unit?, onPolylineClick: (Polyline) -> Unit?, onMapClick: (Coordinates) -> Unit?, onMapLongClick: (Coordinates) -> Unit?, onPOIClick: (Coordinates) -> Unit?, onMapLoaded: () -> Unit?, geoJsonLayers: List<GeoJsonLayer>, customMarkerContent: Map<String, (Marker) -> Unit>, webCustomMarkerContent: Map<String, (Marker) -> String>)

iOS implementation of the Map composable using Google Maps.

actual fun Map(modifier: Modifier, cameraPosition: CameraPosition?, properties: MapProperties, uiSettings: MapUISettings, clusterSettings: ClusterSettings, markers: List<Marker>, circles: List<Circle>, polygons: List<Polygon>, polylines: List<Polyline>, onCameraMove: (CameraPosition) -> Unit?, onMarkerClick: (Marker) -> Unit?, onMarkerDragEnd: (Marker) -> Unit?, onCircleClick: (Circle) -> Unit?, onPolygonClick: (Polygon) -> Unit?, onPolylineClick: (Polyline) -> Unit?, onMapClick: (Coordinates) -> Unit?, onMapLongClick: (Coordinates) -> Unit?, onPOIClick: (Coordinates) -> Unit?, onMapLoaded: () -> Unit?, geoJsonLayers: List<GeoJsonLayer>, customMarkerContent: Map<String, (Marker) -> Unit>, webCustomMarkerContent: Map<String, (Marker) -> String>)

JVM implementation of the Map composable using Google Maps.