OmhMarker

interface OmhMarker

Abstraction to provide access to OmhMarker. OmhMarker is an icon placed at a particular point on the map's surface.

Functions

Link copied to clipboard
abstract fun getAlpha(): Float

Gets the alpha (transparency) of the marker.

Link copied to clipboard

Gets the ARGB background color of the marker represented as an integer.

Link copied to clipboard
abstract fun getClickable(): Boolean

Checks whether the marker is clickable. If the marker is not clickable, the info window associated with this marker will be disabled and no click events will be propagated. Default: true.

Link copied to clipboard
abstract fun getDraggable(): Boolean

Checks whether the marker is draggable. Default: false.

Link copied to clipboard
abstract fun getIsFlat(): Boolean

Gets whether the marker is flat (stuck to the map) or is a billboard (rotates and tilts with the camera). Default: false (billboard).

Link copied to clipboard

Gets whether the info window associated with this marker is currently being shown.

Link copied to clipboard
abstract fun getIsVisible(): Boolean

Gets whether the marker is visible.

Link copied to clipboard
abstract fun getPosition(): OmhCoordinate

The OmhCoordinate value for the marker's position on the map.

Link copied to clipboard
abstract fun getRotation(): Float

Gets the rotation of the marker (degrees, clockwise) with respect to the map; default: 0.

Link copied to clipboard
abstract fun getSnippet(): String?

Gets the text snippet to be shown below marker title.

Link copied to clipboard
abstract fun getTitle(): String?

A text string that's displayed in an info window when the user taps the marker.

Link copied to clipboard
abstract fun getZIndex(): Float?

Gets the zIndex of the marker, which specifies the order in which the marker is drawn on the map.

Link copied to clipboard
abstract fun hideInfoWindow()

Imperatively hides the info window associated with this marker. Note: this overrides the info-window-disabling behaviour based on the value of setIsVisible and setClickable.

Link copied to clipboard
abstract fun invalidateInfoWindow()

Invalidates the info window associated with this marker, causing the re-render of the info window.

Link copied to clipboard
abstract fun remove()

Removes the marker from the map.

Link copied to clipboard
abstract fun setAlpha(alpha: Float)

Gets the alpha (transparency) of the marker.

Link copied to clipboard
abstract fun setAnchor(anchorU: Float, anchorV: Float)

Sets the anchor point of marker image.

Link copied to clipboard
abstract fun setBackgroundColor(@ColorInt color: Int?)

Sets the color of the marker or resets the color to the provider's default value if null. Note: this overrides setIcon.

Link copied to clipboard
abstract fun setClickable(clickable: Boolean)

Sets whether the marker is clickable.

Link copied to clipboard
abstract fun setDraggable(draggable: Boolean)

Sets whether the marker is draggable.

Link copied to clipboard
abstract fun setIcon(icon: Drawable?)

Sets the icon to display for the marker. Note: this overrides setBackgroundColor.

Link copied to clipboard
abstract fun setInfoWindowAnchor(iwAnchorU: Float, iwAnchorV: Float)

Sets the anchor point of marker info window.

Link copied to clipboard
abstract fun setIsFlat(flat: Boolean)

Sets whether the marker is flat (stuck to the map) or is a billboard (rotates and tilts with the camera).

Link copied to clipboard
abstract fun setIsVisible(visible: Boolean)

Sets whether the marker is visible. If the marker is not visible, the info window associated with this marker will be disabled and no interaction events will be propagated.

Link copied to clipboard
abstract fun setPosition(omhCoordinate: OmhCoordinate)

Sets the location of the marker.

Link copied to clipboard
abstract fun setRotation(rotation: Float)

Sets the rotation of the marker (degrees, clockwise) with respect to the map; default: 0.

Link copied to clipboard
abstract fun setSnippet(snippet: String?)

Sets the text snippet to be shown below marker title.

Link copied to clipboard
abstract fun setTitle(title: String?)

Sets the title of the marker. When null, the info window associated with this marker is disabled.

Link copied to clipboard
abstract fun setZIndex(zIndex: Float)

Sets the zIndex of the marker, which specifies the order in which the marker is drawn on the map.

Link copied to clipboard
abstract fun showInfoWindow()

Imperatively shows the info window associated with this marker. If custom info window is set and the window is already shown, it will be re-rendered. Note: this overrides the info-window-disabling behaviour based on the value of setIsVisible and setClickable.