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.

Parameters

id

UniqueId uniquely identifying this Marker.

Types

Link copied to clipboard
object Companion

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 small pin icon anchor of this Marker. {0.0, 0.0} puts the pin icon in the top left corner of the marker. Default value {0.5, 0.5} puts the pin icon in the center.

Link copied to clipboard
fun setPinIconImage(image: Image?)

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

Update the whole marker's pin offset in relation to the point specified by coordinate. {0.0, 0.0} means that the given point is in the top left corner of the marker. Default value {0.5, 1.0} sets the point in the center of the bottom line of the marker.

Link copied to clipboard

Update the pin's shield anchor of this Marker. It sets the offset between the shield and the whole marker. Default value is {0.5, 0.5}

Link copied to clipboard
fun setShieldImage(image: Image?)

Update the shield image for this Marker. It works in tandem with setPinIconImage. This shows the shield image, but only where the two images overlap. The pin image is not rendered; it is only treated as a mask. The color channels of the pin image are ignored, only the opacity has an effect.

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: String?

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