MarkerController

Controls Marker-specific features on the map. Allows Marker management and user interactions with the Marker.

Inheritors

Properties

Link copied to clipboard

Flag determining whether markers fade with increased distance. True by default.

Link copied to clipboard

Flag determining whether markers shrink with increased distance. True by default.

Link copied to clipboard

Defines the range of marker fading in meters. In the range 0, markersFadingRange.first markers don't fade. In the range markersFadingRange.first, markersFadingRange.last marker transparency gradually changes from fully opaque to fully transparent.

Link copied to clipboard

Defines the range of marker shrinking in meters. In the range 0, markersFadingRange.first markers are normal size. In the range markersFadingRange.first, markersFadingRange.last marker size gradually changes from normal to minimum possible size.

Functions

Link copied to clipboard
abstract fun addMarker(options: MarkerOptions): Marker

Adds a new Marker based on the given MarkerOptions.

Link copied to clipboard

Registers MarkerClickListener that will be notified about any Marker being clicked. The clicked Marker becomes a parameter of the MarkerClickListener.onMarkerClicked callback.

Link copied to clipboard

Registers MarkerLongClickListener that will be notified about the long press gesture recognized on the Marker. The clicked Marker becomes a parameter of the MarkerLongClickListener.onMarkerLongClicked callback.

Link copied to clipboard
abstract fun addMarkers(options: List<MarkerOptions>): List<Marker>

Adds a group of Marker based on the given MarkerOptions list.

Link copied to clipboard

Registers MarkerLongClickListener that will be notified when marker is selected or deselected. The selected Marker becomes a parameter of the MarkerSelectionListener.onMarkerSelectedStateChanged callback.

Link copied to clipboard
Link copied to clipboard
abstract fun removeMarkers(tag: String? = null)

Removes all Marker elements with provided tag from the map.

Link copied to clipboard
abstract fun zoomToMarkers(padding: Int = 0)

Zooms the map to display all markers added to the map.

abstract fun zoomToMarkers(tag: String?, padding: Int = 0)

Zooms the map to display all markers with provided tag.

abstract fun zoomToMarkers(markers: List<Marker>, padding: Int = 0)

Zooms the map do display markers from the given list.