CompassSettings

data class CompassSettings @JvmOverloads() constructor(enabled: Boolean, position: Int, marginLeft: Float, marginTop: Float, marginRight: Float, marginBottom: Float, opacity: Float, rotation: Float, visibility: Boolean, fadeWhenFacingNorth: Boolean, clickable: Boolean, image: Drawable?)

Shows the compass on the map.

Constructors

CompassSettings
Link copied to clipboard
fun CompassSettings(enabled: Boolean = true, position: Int = Gravity.TOP or Gravity.END, marginLeft: Float = 4f, marginTop: Float = 4f, marginRight: Float = 4f, marginBottom: Float = 4f, opacity: Float = 1f, rotation: Float = 0f, visibility: Boolean = true, fadeWhenFacingNorth: Boolean = true, clickable: Boolean = true, image: Drawable? = null)

Properties

clickable
Link copied to clipboard
var clickable: Boolean = true
Whether the compass can be clicked and click events can be registered.
enabled
Link copied to clipboard
var enabled: Boolean = true
Whether the compass is visible on the map.
fadeWhenFacingNorth
Link copied to clipboard
var fadeWhenFacingNorth: Boolean = true
Whether the compass fades out to invisible when facing north direction.
image
Link copied to clipboard
var image: Drawable? = null
The compass image, the visual representation of the compass.
marginBottom
Link copied to clipboard
var marginBottom: Float = 4f
Defines the margin to the bottom that the compass icon honors.
marginLeft
Link copied to clipboard
var marginLeft: Float = 4f
Defines the margin to the left that the compass icon honors.
marginRight
Link copied to clipboard
var marginRight: Float = 4f
Defines the margin to the right that the compass icon honors.
marginTop
Link copied to clipboard
var marginTop: Float = 4f
Defines the margin to the top that the compass icon honors.
opacity
Link copied to clipboard
var opacity: Float = 1f
The alpha channel value of the compass image
position
Link copied to clipboard
var position: Int
Defines where the compass is positioned on the map
rotation
Link copied to clipboard
var rotation: Float = 0f
The clockwise rotation value in degrees of the compass.
visibility
Link copied to clipboard
var visibility: Boolean = true
Whether the compass is displayed.