Package com.google.maps.android.compose

Types

CameraMoveStartedReason
Link copied to clipboard
@Immutable()
enum CameraMoveStartedReason : Enum<CameraMoveStartedReason>
Enumerates the different reasons why the map camera started to move.
CameraPositionState
Link copied to clipboard
class CameraPositionState(position: CameraPosition)
A state object that can be hoisted to control and observe the map's camera state.
DefaultIndoorStateChangeListener
Link copied to clipboard
Default implementation of IndoorStateChangeListener with no-op implementations.
DragState
Link copied to clipboard
@Immutable()
enum DragState : Enum<DragState>
GoogleMapComposable
Link copied to clipboard
An annotation that can be used to mark a composable function as being expected to be use in a composable function that is also marked or inferred to be marked as a GoogleMapComposable.
GroundOverlayPosition
Link copied to clipboard
class GroundOverlayPosition
The position of a GroundOverlay.
IndoorStateChangeListener
Link copied to clipboard
interface IndoorStateChangeListener
Interface definition for building indoor level state changes.
MapProperties
Link copied to clipboard
class MapProperties(isBuildingEnabled: Boolean, isIndoorEnabled: Boolean, isMyLocationEnabled: Boolean, isTrafficEnabled: Boolean, latLngBoundsForCameraTarget: LatLngBounds?, mapStyleOptions: MapStyleOptions?, mapType: MapType, maxZoomPreference: Float, minZoomPreference: Float)
Data class for properties that can be modified on the map.
MapsComposeExperimentalApi
Link copied to clipboard
annotation class MapsComposeExperimentalApi
Marks declarations that are still experimental.
MapType
Link copied to clipboard
@Immutable()
enum MapType : Enum<MapType>
Enumerates the different types of map tiles.
MapUiSettings
Link copied to clipboard
class MapUiSettings(compassEnabled: Boolean, indoorLevelPickerEnabled: Boolean, mapToolbarEnabled: Boolean, myLocationButtonEnabled: Boolean, rotationGesturesEnabled: Boolean, scrollGesturesEnabled: Boolean, scrollGesturesEnabledDuringRotateOrZoom: Boolean, tiltGesturesEnabled: Boolean, zoomControlsEnabled: Boolean, zoomGesturesEnabled: Boolean)
Data class for UI-related settings on the map.
MarkerState
Link copied to clipboard
class MarkerState(position: LatLng)
A state object that can be hoisted to control and observe the marker state.

Functions

Circle
Link copied to clipboard
@Composable()
fun Circle(center: LatLng, clickable: Boolean = false, fillColor: Color = Color.Transparent, radius: Double = 0.0, strokeColor: Color = Color.Black, strokePattern: List<PatternItem>? = null, strokeWidth: Float = 10f, tag: Any? = null, visible: Boolean = true, zIndex: Float = 0f, onClick: (Circle) -> Unit = {})
A composable for a circle on the map.
GoogleMap
Link copied to clipboard
@Composable()
fun GoogleMap(modifier: Modifier = Modifier, cameraPositionState: CameraPositionState = rememberCameraPositionState(), contentDescription: String? = null, googleMapOptionsFactory: () -> GoogleMapOptions = { GoogleMapOptions() }, properties: MapProperties = DefaultMapProperties, locationSource: LocationSource? = null, uiSettings: MapUiSettings = DefaultMapUiSettings, indoorStateChangeListener: IndoorStateChangeListener = DefaultIndoorStateChangeListener, onMapClick: (LatLng) -> Unit = {}, onMapLongClick: (LatLng) -> Unit = {}, onMapLoaded: () -> Unit = {}, onMyLocationButtonClick: () -> Boolean = { false }, onMyLocationClick: (Location) -> Unit = {}, onPOIClick: (PointOfInterest) -> Unit = {}, contentPadding: PaddingValues = NoPadding, content: @Composable() () -> Unit? = null)
A compose container for a MapView.
GroundOverlay
Link copied to clipboard
@Composable()
fun GroundOverlay(position: GroundOverlayPosition, image: BitmapDescriptor, anchor: Offset = Offset(0.5f, 0.5f), bearing: Float = 0f, clickable: Boolean = false, tag: Any? = null, transparency: Float = 0f, visible: Boolean = true, zIndex: Float = 0f, onClick: (GroundOverlay) -> Unit = {})
A composable for a ground overlay on the map.
MapEffect
Link copied to clipboard
fun MapEffect(key1: Any?, block: suspend CoroutineScope.(GoogleMap) -> Unit)
A side-effect backed by a LaunchedEffect which will launch block and provide the underlying managed GoogleMap object into the composition's CoroutineContext.
fun MapEffect(vararg keys: Any?, block: suspend CoroutineScope.(GoogleMap) -> Unit)
A side-effect backed by a LaunchedEffect which will launch block and provide the underlying managed GoogleMap object into the composition's CoroutineContext.
fun MapEffect(key1: Any?, key2: Any?, block: suspend CoroutineScope.(GoogleMap) -> Unit)
A side-effect backed by a LaunchedEffect which will launch block and provide the underlying managed GoogleMap object into the composition's CoroutineContext.
fun MapEffect(key1: Any?, key2: Any?, key3: Any?, block: suspend CoroutineScope.(GoogleMap) -> Unit)
A side-effect backed by a LaunchedEffect which will launch block and provide the underlying managed GoogleMap object into the composition's CoroutineContext.
Marker
Link copied to clipboard
@Composable()
fun Marker(state: MarkerState = rememberMarkerState(), alpha: Float = 1.0f, anchor: Offset = Offset(0.5f, 1.0f), draggable: Boolean = false, flat: Boolean = false, icon: BitmapDescriptor? = null, infoWindowAnchor: Offset = Offset(0.5f, 0.0f), rotation: Float = 0.0f, snippet: String? = null, tag: Any? = null, title: String? = null, visible: Boolean = true, zIndex: Float = 0.0f, onClick: (Marker) -> Boolean = { false }, onInfoWindowClick: (Marker) -> Unit = {}, onInfoWindowClose: (Marker) -> Unit = {}, onInfoWindowLongClick: (Marker) -> Unit = {})
A composable for a marker on the map.
MarkerInfoWindow
Link copied to clipboard
@Composable()
fun MarkerInfoWindow(state: MarkerState = rememberMarkerState(), alpha: Float = 1.0f, anchor: Offset = Offset(0.5f, 1.0f), draggable: Boolean = false, flat: Boolean = false, icon: BitmapDescriptor? = null, infoWindowAnchor: Offset = Offset(0.5f, 0.0f), rotation: Float = 0.0f, snippet: String? = null, tag: Any? = null, title: String? = null, visible: Boolean = true, zIndex: Float = 0.0f, onClick: (Marker) -> Boolean = { false }, onInfoWindowClick: (Marker) -> Unit = {}, onInfoWindowClose: (Marker) -> Unit = {}, onInfoWindowLongClick: (Marker) -> Unit = {}, content: @Composable() (Marker) -> Unit? = null)
A composable for a marker on the map wherein its entire info window can be customized.
MarkerInfoWindowContent
Link copied to clipboard
@Composable()
fun MarkerInfoWindowContent(state: MarkerState = rememberMarkerState(), alpha: Float = 1.0f, anchor: Offset = Offset(0.5f, 1.0f), draggable: Boolean = false, flat: Boolean = false, icon: BitmapDescriptor? = null, infoWindowAnchor: Offset = Offset(0.5f, 0.0f), rotation: Float = 0.0f, snippet: String? = null, tag: Any? = null, title: String? = null, visible: Boolean = true, zIndex: Float = 0.0f, onClick: (Marker) -> Boolean = { false }, onInfoWindowClick: (Marker) -> Unit = {}, onInfoWindowClose: (Marker) -> Unit = {}, onInfoWindowLongClick: (Marker) -> Unit = {}, content: @Composable() (Marker) -> Unit? = null)
A composable for a marker on the map wherein its info window contents can be customized.
Polygon
Link copied to clipboard
@Composable()
fun Polygon(points: List<LatLng>, clickable: Boolean = false, fillColor: Color = Color.Black, geodesic: Boolean = false, holes: List<List<LatLng>> = emptyList(), strokeColor: Color = Color.Black, strokeJointType: Int = JointType.DEFAULT, strokePattern: List<PatternItem>? = null, strokeWidth: Float = 10f, tag: Any? = null, visible: Boolean = true, zIndex: Float = 0f, onClick: (Polygon) -> Unit = {})
A composable for a polygon on the map.
Polyline
Link copied to clipboard
@Composable()
fun Polyline(points: List<LatLng>, clickable: Boolean = false, color: Color = Color.Black, endCap: Cap = ButtCap(), geodesic: Boolean = false, jointType: Int = JointType.DEFAULT, pattern: List<PatternItem>? = null, startCap: Cap = ButtCap(), tag: Any? = null, visible: Boolean = true, width: Float = 10f, zIndex: Float = 0f, onClick: (Polyline) -> Unit = {})
A composable for a polyline on the map.
rememberCameraPositionState
Link copied to clipboard
@Composable()
inline fun rememberCameraPositionState(key: String? = null, crossinline init: CameraPositionState.() -> Unit = {}): CameraPositionState
Create and rememberSaveable a CameraPositionState using CameraPositionState.Saver.
rememberMarkerState
Link copied to clipboard
@Composable()
fun rememberMarkerState(key: String? = null, position: LatLng = LatLng(0.0, 0.0)): MarkerState
TileOverlay
Link copied to clipboard
@Composable()
fun TileOverlay(tileProvider: TileProvider, fadeIn: Boolean = true, transparency: Float = 0f, visible: Boolean = true, zIndex: Float = 0f, onClick: (TileOverlay) -> Unit = {})
A composable for a tile overlay on the map.