-
public final class MarkerKt
-
-
Method Summary
Modifier and Type Method Description final static MarkerStaterememberMarkerState(String key, LatLng position)Uses rememberSaveable to retain MarkerState.position across configuration changes, for simple use cases. final static UnitMarker(MarkerState state, String contentDescription, Float alpha, Offset anchor, Boolean draggable, Boolean flat, BitmapDescriptor icon, Offset infoWindowAnchor, Float rotation, String snippet, Object tag, String title, Boolean visible, Float zIndex, Function1<Marker, Boolean> onClick, Function1<Marker, Unit> onInfoWindowClick, Function1<Marker, Unit> onInfoWindowClose, Function1<Marker, Unit> onInfoWindowLongClick)A composable for a marker on the map. final static UnitMarkerComposable(Object keys, MarkerState state, String contentDescription, Float alpha, Offset anchor, Boolean draggable, Boolean flat, Offset infoWindowAnchor, Float rotation, String snippet, Object tag, String title, Boolean visible, Float zIndex, Function1<Marker, Boolean> onClick, Function1<Marker, Unit> onInfoWindowClick, Function1<Marker, Unit> onInfoWindowClose, Function1<Marker, Unit> onInfoWindowLongClick, Function0<Unit> content)Composable rendering the content passed as a marker. final static UnitMarkerInfoWindow(MarkerState state, Float alpha, Offset anchor, Boolean draggable, Boolean flat, BitmapDescriptor icon, Offset infoWindowAnchor, Float rotation, String snippet, Object tag, String title, Boolean visible, Float zIndex, Function1<Marker, Boolean> onClick, Function1<Marker, Unit> onInfoWindowClick, Function1<Marker, Unit> onInfoWindowClose, Function1<Marker, Unit> onInfoWindowLongClick, Function1<Marker, Unit> content)A composable for a marker on the map wherein its entire info window can be customized. final static UnitMarkerInfoWindowComposable(Object keys, MarkerState state, Float alpha, Offset anchor, Boolean draggable, Boolean flat, Offset infoWindowAnchor, Float rotation, String snippet, Object tag, String title, Boolean visible, Float zIndex, Function1<Marker, Boolean> onClick, Function1<Marker, Unit> onInfoWindowClick, Function1<Marker, Unit> onInfoWindowClose, Function1<Marker, Unit> onInfoWindowLongClick, Function1<Marker, Unit> infoContent, Function0<Unit> content)A composable for a marker on the map wherein its entire info window and the marker itself can be customized. final static UnitMarkerInfoWindowContent(MarkerState state, Float alpha, Offset anchor, Boolean draggable, Boolean flat, BitmapDescriptor icon, Offset infoWindowAnchor, Float rotation, String snippet, Object tag, String title, Boolean visible, Float zIndex, Function1<Marker, Boolean> onClick, Function1<Marker, Unit> onInfoWindowClick, Function1<Marker, Unit> onInfoWindowClose, Function1<Marker, Unit> onInfoWindowLongClick, Function1<Marker, Unit> content)A composable for a marker on the map wherein its info window contents can be customized. final static UnitAdvancedMarker(MarkerState state, String contentDescription, Float alpha, Offset anchor, Boolean draggable, Boolean flat, Offset infoWindowAnchor, Float rotation, String snippet, Object tag, String title, Boolean visible, Float zIndex, Function1<Marker, Boolean> onClick, Function1<Marker, Unit> onInfoWindowClick, Function1<Marker, Unit> onInfoWindowClose, Function1<Marker, Unit> onInfoWindowLongClick, PinConfig pinConfig, View iconView, Integer collisionBehavior)A composable for an advanced marker on the map. -
-
Method Detail
-
rememberMarkerState
@Composable() final static MarkerState rememberMarkerState(String key, LatLng position)
Uses rememberSaveable to retain MarkerState.position across configuration changes, for simple use cases.
Other use cases may be better served syncing MarkerState.position with a data model.
This cannot be used to preserve info window visibility across configuration changes.
-
Marker
@Composable() final static Unit Marker(MarkerState state, String contentDescription, Float alpha, Offset anchor, Boolean draggable, Boolean flat, BitmapDescriptor icon, Offset infoWindowAnchor, Float rotation, String snippet, Object tag, String title, Boolean visible, Float zIndex, Function1<Marker, Boolean> onClick, Function1<Marker, Unit> onInfoWindowClick, Function1<Marker, Unit> onInfoWindowClose, Function1<Marker, Unit> onInfoWindowLongClick)
A composable for a marker on the map.
- Parameters:
state- the MarkerState to be used to control or observe the marker state such as its position and info windowcontentDescription- the content description for accessibility purposesalpha- the alpha (opacity) of the markeranchor- the anchor for the marker imagedraggable- sets the draggability for the markerflat- sets if the marker should be flat against the mapicon- sets the icon for the markerinfoWindowAnchor- the anchor point of the info window on the marker imagerotation- the rotation of the marker in degrees clockwise about the marker's anchor pointsnippet- the snippet for the markertag- optional tag to associate with the markertitle- the title for the markervisible- the visibility of the markerzIndex- the z-index of the markeronClick- a lambda invoked when the marker is clickedonInfoWindowClick- a lambda invoked when the marker's info window is clickedonInfoWindowClose- a lambda invoked when the marker's info window is closedonInfoWindowLongClick- a lambda invoked when the marker's info window is long clicked
-
MarkerComposable
@Composable() final static Unit MarkerComposable(Object keys, MarkerState state, String contentDescription, Float alpha, Offset anchor, Boolean draggable, Boolean flat, Offset infoWindowAnchor, Float rotation, String snippet, Object tag, String title, Boolean visible, Float zIndex, Function1<Marker, Boolean> onClick, Function1<Marker, Unit> onInfoWindowClick, Function1<Marker, Unit> onInfoWindowClose, Function1<Marker, Unit> onInfoWindowLongClick, Function0<Unit> content)
Composable rendering the content passed as a marker.
This composable must have a non-zero size in both dimensions
- Parameters:
keys- unique keys representing the state of this Marker.state- the MarkerState to be used to control or observe the marker state such as its position and info windowcontentDescription- the content description for accessibility purposesalpha- the alpha (opacity) of the markeranchor- the anchor for the marker imagedraggable- sets the draggability for the markerflat- sets if the marker should be flat against the mapinfoWindowAnchor- the anchor point of the info window on the marker imagerotation- the rotation of the marker in degrees clockwise about the marker's anchor pointsnippet- the snippet for the markertag- optional tag to associate with the markertitle- the title for the markervisible- the visibility of the markerzIndex- the z-index of the markeronClick- a lambda invoked when the marker is clickedonInfoWindowClick- a lambda invoked when the marker's info window is clickedonInfoWindowClose- a lambda invoked when the marker's info window is closedonInfoWindowLongClick- a lambda invoked when the marker's info window is long clickedcontent- composable lambda expression used to customize the marker's content
-
MarkerInfoWindow
@Composable() final static Unit MarkerInfoWindow(MarkerState state, Float alpha, Offset anchor, Boolean draggable, Boolean flat, BitmapDescriptor icon, Offset infoWindowAnchor, Float rotation, String snippet, Object tag, String title, Boolean visible, Float zIndex, Function1<Marker, Boolean> onClick, Function1<Marker, Unit> onInfoWindowClick, Function1<Marker, Unit> onInfoWindowClose, Function1<Marker, Unit> onInfoWindowLongClick, Function1<Marker, Unit> content)
A composable for a marker on the map wherein its entire info window can be customized. If this customization is not required, use com.google.maps.android.compose.Marker.
- Parameters:
state- the MarkerState to be used to control or observe the marker state such as its position and info windowalpha- the alpha (opacity) of the markeranchor- the anchor for the marker imagedraggable- sets the draggability for the markerflat- sets if the marker should be flat against the mapicon- sets the icon for the markerinfoWindowAnchor- the anchor point of the info window on the marker imagerotation- the rotation of the marker in degrees clockwise about the marker's anchor pointsnippet- the snippet for the markertag- optional tag to associate with the markertitle- the title for the markervisible- the visibility of the markerzIndex- the z-index of the markeronClick- a lambda invoked when the marker is clickedonInfoWindowClick- a lambda invoked when the marker's info window is clickedonInfoWindowClose- a lambda invoked when the marker's info window is closedonInfoWindowLongClick- a lambda invoked when the marker's info window is long clickedcontent- optional composable lambda expression for customizing the info window's content
-
MarkerInfoWindowComposable
@Composable() final static Unit MarkerInfoWindowComposable(Object keys, MarkerState state, Float alpha, Offset anchor, Boolean draggable, Boolean flat, Offset infoWindowAnchor, Float rotation, String snippet, Object tag, String title, Boolean visible, Float zIndex, Function1<Marker, Boolean> onClick, Function1<Marker, Unit> onInfoWindowClick, Function1<Marker, Unit> onInfoWindowClose, Function1<Marker, Unit> onInfoWindowLongClick, Function1<Marker, Unit> infoContent, Function0<Unit> content)
A composable for a marker on the map wherein its entire info window and the marker itself can be customized. If this customization is not required, use com.google.maps.android.compose.Marker.
- Parameters:
keys- unique keys representing the state of this Marker.state- the MarkerState to be used to control or observe the marker state such as its position and info windowalpha- the alpha (opacity) of the markeranchor- the anchor for the marker imagedraggable- sets the draggability for the markerflat- sets if the marker should be flat against the mapinfoWindowAnchor- the anchor point of the info window on the marker imagerotation- the rotation of the marker in degrees clockwise about the marker's anchor pointsnippet- the snippet for the markertag- optional tag to associate with the markertitle- the title for the markervisible- the visibility of the markerzIndex- the z-index of the markeronClick- a lambda invoked when the marker is clickedonInfoWindowClick- a lambda invoked when the marker's info window is clickedonInfoWindowClose- a lambda invoked when the marker's info window is closedonInfoWindowLongClick- a lambda invoked when the marker's info window is long clickedinfoContent- optional composable lambda expression for customizing the info window's contentcontent- composable lambda expression used to customize the marker's content
-
MarkerInfoWindowContent
@Composable() final static Unit MarkerInfoWindowContent(MarkerState state, Float alpha, Offset anchor, Boolean draggable, Boolean flat, BitmapDescriptor icon, Offset infoWindowAnchor, Float rotation, String snippet, Object tag, String title, Boolean visible, Float zIndex, Function1<Marker, Boolean> onClick, Function1<Marker, Unit> onInfoWindowClick, Function1<Marker, Unit> onInfoWindowClose, Function1<Marker, Unit> onInfoWindowLongClick, Function1<Marker, Unit> content)
A composable for a marker on the map wherein its info window contents can be customized. If this customization is not required, use com.google.maps.android.compose.Marker.
- Parameters:
state- the MarkerState to be used to control or observe the marker state such as its position and info windowalpha- the alpha (opacity) of the markeranchor- the anchor for the marker imagedraggable- sets the draggability for the markerflat- sets if the marker should be flat against the mapicon- sets the icon for the markerinfoWindowAnchor- the anchor point of the info window on the marker imagerotation- the rotation of the marker in degrees clockwise about the marker's anchor pointsnippet- the snippet for the markertag- optional tag to associate with the markertitle- the title for the markervisible- the visibility of the markerzIndex- the z-index of the markeronClick- a lambda invoked when the marker is clickedonInfoWindowClick- a lambda invoked when the marker's info window is clickedonInfoWindowClose- a lambda invoked when the marker's info window is closedonInfoWindowLongClick- a lambda invoked when the marker's info window is long clickedcontent- optional composable lambda expression for customizing the info window's content
-
AdvancedMarker
@Composable() final static Unit AdvancedMarker(MarkerState state, String contentDescription, Float alpha, Offset anchor, Boolean draggable, Boolean flat, Offset infoWindowAnchor, Float rotation, String snippet, Object tag, String title, Boolean visible, Float zIndex, Function1<Marker, Boolean> onClick, Function1<Marker, Unit> onInfoWindowClick, Function1<Marker, Unit> onInfoWindowClose, Function1<Marker, Unit> onInfoWindowLongClick, PinConfig pinConfig, View iconView, Integer collisionBehavior)
A composable for an advanced marker on the map.
- Parameters:
state- the MarkerState to be used to control or observe the marker state such as its position and info windowcontentDescription- the content description for accessibility purposesalpha- the alpha (opacity) of the markeranchor- the anchor for the marker imagedraggable- sets the draggability for the markerflat- sets if the marker should be flat against the mapinfoWindowAnchor- the anchor point of the info window on the marker imagerotation- the rotation of the marker in degrees clockwise about the marker's anchor pointsnippet- the snippet for the markertag- optional tag to associate with the markertitle- the title for the markervisible- the visibility of the markerzIndex- the z-index of the markeronClick- a lambda invoked when the marker is clickedonInfoWindowClick- a lambda invoked when the marker's info window is clickedonInfoWindowClose- a lambda invoked when the marker's info window is closedonInfoWindowLongClick- a lambda invoked when the marker's info window is long clickedpinConfig- the PinConfig object that will be used for the advanced markericonView- the custom view to be used on the advanced markercollisionBehavior- the expected collision behavior
-
-
-
-