sdk-maps-ui-extensions / com.tomtom.online.sdk.map.ui.compass / CompassView

CompassView

interface CompassView : MapComponentView, ClickableMapComponent

Compass component.

Properties

COMPASS_NORTH_YAW_DEGREES

static val COMPASS_NORTH_YAW_DEGREES: Float

The starting compass rotation when the image points on the north.

Functions

rotate

abstract fun rotate(yawDegrees: Float): Unit

Rotates the compass in clockwise and reverse direction.

Inherited Functions

getView

abstract fun getView(): View!

The Android's View which is used by the Map Component.

hide

abstract fun hide(): Unit

Hides the ui component.

setMargins

abstract fun setMargins(left: Int, top: Int, right: Int, bottom: Int): Unit

Sets the margins of the ui component in PX.

setOnMapComponentClickCallback

abstract fun setOnMapComponentClickCallback(callback: ClickableMapComponent.MapComponentClickCallback!): Unit

The callback fired when center on map component view is clicked.

show

abstract fun show(): Unit

Shows the ui component.

Inheritors

BasicCompassView

open class BasicCompassView : AppCompatImageView, CompassView, OnClickListener

Button that represents 2D compass. When clicked, the map is set to north up. The button is visible only when map is not set to north up. Fade in / out animation is used to change button visibility.