Builder

class Builder

Composes and builds a CompassSettings object.

This is a concrete implementation of the builder design pattern.

Constructors

Link copied to clipboard
fun Builder()

Functions

Link copied to clipboard

Returns a CompassSettings reference to the object being constructed by the builder.

Link copied to clipboard
fun setClickable(clickable: Boolean): CompassSettings.Builder

Setter for clickable: whether the compass can be clicked and click events can be registered. Default value: true.

Link copied to clipboard
fun setEnabled(enabled: Boolean): CompassSettings.Builder

Setter for enabled: whether the compass is visible on the map. Default value: true.

Link copied to clipboard
fun setFadeWhenFacingNorth(fadeWhenFacingNorth: Boolean): CompassSettings.Builder

Setter for fadeWhenFacingNorth: whether the compass fades out to invisible when facing north direction. Default value: true.

Link copied to clipboard

Setter for image: the compass image, the visual representation of the compass.

Link copied to clipboard
fun setMarginBottom(marginBottom: Float): CompassSettings.Builder

Setter for marginBottom: defines the margin to the bottom that the compass icon honors. Default value: 4. This property is specified in pixels.

Link copied to clipboard
fun setMarginLeft(marginLeft: Float): CompassSettings.Builder

Setter for marginLeft: defines the margin to the left that the compass icon honors. Default value: 4. This property is specified in pixels.

Link copied to clipboard
fun setMarginRight(marginRight: Float): CompassSettings.Builder

Setter for marginRight: defines the margin to the right that the compass icon honors. Default value: 4. This property is specified in pixels.

Link copied to clipboard
fun setMarginTop(marginTop: Float): CompassSettings.Builder

Setter for marginTop: defines the margin to the top that the compass icon honors. Default value: 4. This property is specified in pixels.

Link copied to clipboard
fun setOpacity(opacity: Float): CompassSettings.Builder

Setter for opacity: the alpha channel value of the compass image Default value: 1.

Link copied to clipboard

Setter for position: defines where the compass is positioned on the map Default value: "top-right".

Link copied to clipboard
fun setRotation(rotation: Float): CompassSettings.Builder

Setter for rotation: the clockwise rotation value in degrees of the compass. Default value:

Link copied to clipboard
fun setVisibility(visibility: Boolean): CompassSettings.Builder

Setter for visibility: whether the compass is displayed. Default value: true.

Properties

Link copied to clipboard
var clickable: Boolean = true

Whether the compass can be clicked and click events can be registered. Default value: true.

Link copied to clipboard
var enabled: Boolean = true

Whether the compass is visible on the map. Default value: true.

Link copied to clipboard
var fadeWhenFacingNorth: Boolean = true

Whether the compass fades out to invisible when facing north direction. Default value: true.

Link copied to clipboard
var image: ImageHolder? = null

The compass image, the visual representation of the compass.

Link copied to clipboard
var marginBottom: Float = 4.0f

Defines the margin to the bottom that the compass icon honors. Default value: 4. This property is specified in pixels.

Link copied to clipboard
var marginLeft: Float = 4.0f

Defines the margin to the left that the compass icon honors. Default value: 4. This property is specified in pixels.

Link copied to clipboard
var marginRight: Float = 4.0f

Defines the margin to the right that the compass icon honors. Default value: 4. This property is specified in pixels.

Link copied to clipboard
var marginTop: Float = 4.0f

Defines the margin to the top that the compass icon honors. Default value: 4. This property is specified in pixels.

Link copied to clipboard
var opacity: Float = 1.0f

The alpha channel value of the compass image Default value: 1.

Link copied to clipboard
var position: Int

Defines where the compass is positioned on the map Default value: "top-right".

Link copied to clipboard
var rotation: Float = 0.0f

The clockwise rotation value in degrees of the compass. Default value: 0.

Link copied to clipboard
var visibility: Boolean = true

Whether the compass is displayed. Default value: true.