LocationComponentPlugin

Define the interfaces for the Location plugin.

Functions

addOnIndicatorBearingChangedListener
Link copied to clipboard

Adds a listener that gets invoked when indicator bearing changes.

abstract fun addOnIndicatorBearingChangedListener(listener: OnIndicatorBearingChangedListener)
addOnIndicatorPositionChangedListener
Link copied to clipboard

Adds a listener that gets invoked when indicator position changes.

abstract fun addOnIndicatorPositionChangedListener(listener: OnIndicatorPositionChangedListener)
bind
Link copied to clipboard

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

abstract override fun bind(context: Context, attrs: AttributeSet?, pixelRatio: Float)
cleanup
Link copied to clipboard

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

open override fun cleanup()
equals
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
getLocationProvider
Link copied to clipboard

Get the current LocationProvider under usage with the LocationComponentPlugin.

abstract fun getLocationProvider(): LocationProvider?
getSettings
Link copied to clipboard

Get current locationcomponent configuration.

abstract override fun getSettings(): LocationComponentSettings
hashCode
Link copied to clipboard
open override fun hashCode(): Int
initialize
Link copied to clipboard

Called when the plugin is first added to the map.

open override fun initialize()
isLocatedAt
Link copied to clipboard

Check whether the rendered location puck is on the given point.

abstract fun isLocatedAt(point: Point, listener: PuckLocatedAtPointListener)
onDelegateProvider
Link copied to clipboard

Provides all map delegate instances.

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

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

open override fun onStart()
onStop
Link copied to clipboard

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

open override fun onStop()
onStyleChanged
Link copied to clipboard

Called when a new Style is loaded.

abstract override fun onStyleChanged(styleDelegate: StyleInterface)
removeOnIndicatorBearingChangedListener
Link copied to clipboard

Removes a listener that gets invoked when indicator bearing changes.

abstract fun removeOnIndicatorBearingChangedListener(listener: OnIndicatorBearingChangedListener)

Removes a listener that gets invoked when indicator position changes.

abstract fun removeOnIndicatorPositionChangedListener(listener: OnIndicatorPositionChangedListener)
setLocationProvider
Link copied to clipboard

Set the LocationProvider, it will replace the default location provider provided by the LocationComponentPlugin.

abstract fun setLocationProvider(locationProvider: LocationProvider)
toString
Link copied to clipboard
open override fun toString(): String
updateSettings
Link copied to clipboard

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

abstract override fun updateSettings(block: LocationComponentSettings.() -> Unit)

Properties

enabled
Link copied to clipboard

Whether the user location is visible on the map.

abstract override var enabled: Boolean
layerAbove
Link copied to clipboard

Sets the id of the layer that's added above to when placing the component on the map.

abstract override var layerAbove: String?
layerBelow
Link copied to clipboard

Sets the id of the layer that's added below to when placing the component on the map.

abstract override var layerBelow: String?
locationPuck
Link copied to clipboard

Defines what the customised look of the location puck.

abstract override var locationPuck: LocationPuck
pulsingColor
Link copied to clipboard

The color of the pulsing circle. Only work for 2D location puck.

abstract override var pulsingColor: Int
pulsingEnabled
Link copied to clipboard

Whether the location puck is pulsing on the map. Only work for 2D location puck.

abstract override var pulsingEnabled: Boolean
pulsingMaxRadius
Link copied to clipboard

The maximum radius of the pulsing circle. Only work for 2D location puck.

abstract override var pulsingMaxRadius: Float

Inheritors

LocationComponentPluginImpl
Link copied to clipboard