Marker

class Marker

Defines a visual container which can be added on the map.

Markers consist of a pin, an optional shield, an optional icon and an optional label.

The different components of the marker can be interpreted as 4 ordered layers:

  • Layer 1 (Pin) : The bottom layer of the marker, defining the base and the boundaries.

  • Layer 2 (Shield) : Typically used as a background for the icon.

  • Layer 3 (Icon) : The icon layer, typically used for drawing a logo on the pin (and on shield, if present).

  • Layer 4 (Label) : The top layer, used for drawing a label on the pin. The position of the shield and icon on the pin are set by the shield and icon anchors respectively.

Important: This is a Public Preview API. It may be changed or removed at any time.

Parameters

id

UniqueId uniquely identifying this Marker.

Functions

Link copied to clipboard
fun deselect()

Deselect this Marker.

Link copied to clipboard

Get the current pin image descriptor.

Link copied to clipboard

Returns the current selection state of the marker.

Link copied to clipboard
fun remove()

Remove the Marker from the map.

Link copied to clipboard
fun select()

Select this Marker.

Link copied to clipboard
fun setLabel(label: Label)

Update the label for this Marker.

Link copied to clipboard

Update the pin icon anchor of this Marker.

Link copied to clipboard

Update the pin icon image for this Marker.

Link copied to clipboard
fun setPinImage(image: Image)

Update the pin image for this Marker.

Link copied to clipboard
fun setShieldImage(image: Image)

Update the shield image for this Marker.

Properties

Link copied to clipboard

Text displayed within the marker balloon (if visible).

Link copied to clipboard

The GeoPoint location of the given Marker.

Link copied to clipboard
Link copied to clipboard

Determines whether the marker is visible or hidden.

Link copied to clipboard
var tag: Any?

A property which may hold some extra information associated with the given Marker instance.