Marker

data class Marker(var position: LatLng, val title: String? = null, val snippet: String? = null, val icon: BitmapDescriptor? = null, val anchor: Pair<Float, Float> = Pair(0.5f, 1.0f), val visible: Boolean = true, val alpha: Float = 1.0f, val draggable: Boolean = false, val zIndex: Float = 0.0f, val tag: Any? = null)(source)

Represents a marker on the map at a specific geographic location.

Constructors

Link copied to clipboard
constructor(position: LatLng, title: String? = null, snippet: String? = null, icon: BitmapDescriptor? = null, anchor: Pair<Float, Float> = Pair(0.5f, 1.0f), visible: Boolean = true, alpha: Float = 1.0f, draggable: Boolean = false, zIndex: Float = 0.0f, tag: Any? = null)

Properties

Link copied to clipboard

Opacity of the marker from 0.0 (transparent) to 1.0 (opaque). Default is 1.0

Link copied to clipboard

Anchor point for the marker icon. Default (0.5f, 1.0f) means the marker is centered horizontally and anchored at the bottom

Link copied to clipboard

Whether the marker can be dragged. Default is false

Link copied to clipboard

Custom icon descriptor. If null, a default red marker icon will be used

Link copied to clipboard

The geographic location of the marker (mutable for dragging)

Link copied to clipboard

Optional snippet text displayed below the title

Link copied to clipboard
val tag: Any?

Optional user data associated with the marker

Link copied to clipboard

Optional title text displayed when marker is clicked

Link copied to clipboard

Whether the marker is visible. Default is true

Link copied to clipboard

Draw order. Markers with higher zIndex are drawn on top. Default is 0.0

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard

Hides the info window for this marker.

Link copied to clipboard

Shows the info window for this marker. The info window displays the marker's title and snippet text.