CompassViewPlugin

open class CompassViewPlugin(viewImplProvider: (Context) -> CompassViewImpl, fadeAnimator: ValueAnimator, mainHandler: Handler) : CompassSettingsBase, CompassPlugin

Concrete implementation of CompassPlugin.

Constructors

CompassViewPlugin
Link copied to clipboard
fun CompassViewPlugin(viewImplProvider: (Context) -> CompassViewImpl = { CompassViewImpl(it) }, fadeAnimator: ValueAnimator = ValueAnimator.ofFloat(1f, 0f), mainHandler: Handler = Handler(Looper.getMainLooper()))

Types

Companion
Link copied to clipboard
object Companion

Static variables and methods.

Functions

addCompassClickListener
Link copied to clipboard
open override fun addCompassClickListener(onClickListener: OnCompassClickListener)

Add an OnClick listener to the presenter.

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

Bind the ViewPlugin with current map context. This will create a View that will be added to the MapView.

cleanup
Link copied to clipboard
open override fun cleanup()

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

getSettings
Link copied to clipboard
abstract fun getSettings(): CompassSettings
initialize
Link copied to clipboard
open override fun initialize()

Called when the plugin is first added to the map.

onCameraMove
Link copied to clipboard
open override fun onCameraMove(lat: Double, lon: Double, zoom: Double, pitch: Double, bearing: Double, padding: DoubleArray)

Called whenever camera position changes. Could be invoked from any thread when map starts rendering.

onCompassClicked
Link copied to clipboard
open override fun onCompassClicked()

Invoked when the compass view is clicked.

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

Provides all map delegate instances.

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

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

onStart
Link copied to clipboard
open override fun onStart()

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

onStop
Link copied to clipboard
open override fun onStop()

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

removeCompassClickListener
Link copied to clipboard
open override fun removeCompassClickListener(onClickListener: OnCompassClickListener)

Remove an OnClick listener from the presenter.

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

Properties

clickable
Link copied to clipboard
abstract var clickable: Boolean
enabled
Link copied to clipboard
open override var enabled: Boolean

Defines whether the plugins is enabled or disabled.

fadeWhenFacingNorth
Link copied to clipboard
abstract var fadeWhenFacingNorth: Boolean
image
Link copied to clipboard
abstract var image: Drawable?
marginBottom
Link copied to clipboard
abstract var marginBottom: Float
marginLeft
Link copied to clipboard
abstract var marginLeft: Float
marginRight
Link copied to clipboard
abstract var marginRight: Float
marginTop
Link copied to clipboard
abstract var marginTop: Float
opacity
Link copied to clipboard
abstract var opacity: Float
position
Link copied to clipboard
abstract var position: Int
rotation
Link copied to clipboard
abstract var rotation: Float
visibility
Link copied to clipboard
abstract var visibility: Boolean