MarkerOptions

Builder class for creating Marker instances with a fluent API. Matches the Google Maps API pattern for marker configuration.

Example usage:

val marker = MarkerOptions()
.position(LatLng(51.4818, 0.0))
.title("Greenwich Observatory")
.snippet("Prime Meridian")
.draggable(true)
.alpha(0.8f)

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard

Sets the opacity of the marker.

Link copied to clipboard
fun anchor(anchorU: Float, anchorV: Float): MarkerOptions

Sets the anchor point for the marker icon.

Link copied to clipboard

Sets whether the marker can be dragged.

Link copied to clipboard

Sets a custom icon for the marker.

Link copied to clipboard
fun position(position: LatLng): MarkerOptions

Sets the position of the marker.

Link copied to clipboard
fun snippet(snippet: String?): MarkerOptions

Sets the snippet text for the marker's info window.

Link copied to clipboard
fun tag(tag: Any?): MarkerOptions

Sets optional user data associated with the marker.

Link copied to clipboard
fun title(title: String?): MarkerOptions

Sets the title text for the marker's info window.

Link copied to clipboard

Sets whether the marker is visible.

Link copied to clipboard
fun zIndex(zIndex: Float): MarkerOptions

Sets the z-index for draw order.