CompassPlugin

Presenter interface for the Compass.

Functions

Link copied to clipboard
abstract fun addCompassClickListener(onClickListener: OnCompassClickListener)

Add an OnClick listener to the presenter.

Link copied to clipboard
abstract fun bind(mapView: FrameLayout, attrs: AttributeSet?, pixelRatio: Float): View

Bind a view instance

Link copied to clipboard
open fun cleanup()

Called when the map is destroyed. Should be used to cleanup plugin resources for that map.

Link copied to clipboard

Get current compass configuration.

Link copied to clipboard
open fun initialize()

Called when the plugin is first added to the map.

Link copied to clipboard
abstract fun onCameraMove(center: Point, zoom: Double, pitch: Double, bearing: Double, padding: EdgeInsets)

Called whenever camera position changes.

Link copied to clipboard
abstract fun onCompassClicked()

Invoked when the compass view is clicked.

Link copied to clipboard
open fun onDelegateProvider(delegateProvider: MapDelegateProvider)

Provides all map delegate instances.

Link copied to clipboard
open fun onPluginView(view: View)

Provides a view instances returned in inflate after it's been added to the MapView.

Link copied to clipboard
open fun onStart()

Called whenever activity's/fragment's lifecycle is entering a "started" state.

Link copied to clipboard
open fun onStop()

Called whenever activity's/fragment's lifecycle is entering a "stopped" state.

Link copied to clipboard
abstract fun removeCompassClickListener(onClickListener: OnCompassClickListener)

Remove an OnClick listener from the presenter.

Link copied to clipboard
abstract fun updateSettings(block: CompassSettings.Builder.() -> Unit)

Update compass configuration, the update will be applied to the plugin automatically.

Properties

Link copied to clipboard
abstract var clickable: Boolean

Whether the compass can be clicked and click events can be registered.

Link copied to clipboard
abstract var enabled: Boolean

Whether the compass is visible on the map.

Link copied to clipboard

Whether the compass fades out to invisible when facing north direction.

Link copied to clipboard
abstract var image: ImageHolder?

The compass image, the visual representation of the compass.

Link copied to clipboard
abstract var marginBottom: Float

Defines the margin to the bottom that the compass icon honors.

Link copied to clipboard
abstract var marginLeft: Float

Defines the margin to the left that the compass icon honors.

Link copied to clipboard
abstract var marginRight: Float

Defines the margin to the right that the compass icon honors.

Link copied to clipboard
abstract var marginTop: Float

Defines the margin to the top that the compass icon honors.

Link copied to clipboard
abstract var opacity: Float

The alpha channel value of the compass image

Link copied to clipboard
abstract var position: Int

Defines where the compass is positioned on the map

Link copied to clipboard
abstract var rotation: Float

The clockwise rotation value in degrees of the compass.

Link copied to clipboard
abstract var visibility: Boolean

Whether the compass is displayed.