Package 

Class MarkerState


  • 
    public final class MarkerState
    
                        

    A state object that can be hoisted to control and observe the marker state.

    This cannot be used to preserve marker info window visibility across configuration changes.

    • Method Detail

      • getPosition

         final LatLng getPosition()

        Current position of the marker.

        This property is backed by Compose state. It can be updated by the API user and by the API itself: it has two potentially competing sources of truth.

        The API will not update the property unless isDragging== true, which will happen if and only if a Marker is draggable and the end user is currently dragging it.

      • setPosition

         final Unit setPosition(LatLng position)

        Current position of the marker.

        This property is backed by Compose state. It can be updated by the API user and by the API itself: it has two potentially competing sources of truth.

        The API will not update the property unless isDragging== true, which will happen if and only if a Marker is draggable and the end user is currently dragging it.

      • getIsDragging

         final Boolean getIsDragging()

        Reflects whether the end user is currently dragging the marker. Dragging can happen only if a Marker is draggable.

        This property is backed by Compose state.

      • showInfoWindow

         final Unit showInfoWindow()

        Shows the info window for the underlying marker.

        Not backed by Compose state to accommodate com.google.android.gms.maps.GoogleMap special semantics: only a single info window can be visible for the entire GoogleMap.

        Only use from Compose Effect APIs, never directly from composition, to avoid exceptions and unexpected behavior from cancelled compositions.

      • hideInfoWindow

         final Unit hideInfoWindow()

        Hides the info window for the underlying marker.

        Not backed by observable Compose state to accommodate com.google.android.gms.maps.GoogleMap special semantics: only a single info window can be visible for the entire GoogleMap.

        Only use from Compose Effect APIs, never directly from composition, to avoid unexpected behavior from cancelled compositions.