ScaleBarPluginImpl

open class ScaleBarPluginImpl(viewImplProvider: (Context) -> ScaleBarImpl) : ScaleBarSettingsBase, ScaleBarPlugin

Concrete implementation of ScaleBarViewPlugin.

Constructors

ScaleBarPluginImpl
Link copied to clipboard
fun ScaleBarPluginImpl(viewImplProvider: (Context) -> ScaleBarImpl = { ScaleBarImpl(it) })

Functions

bind
Link copied to clipboard
open override fun bind(mapView: FrameLayout, attrs: AttributeSet?, pixelRatio: Float): View
Bind the ViewPlugin with current map context.
cleanup
Link copied to clipboard
open override fun cleanup()
Called when the map is destroyed.
getSettings
Link copied to clipboard
abstract fun getSettings(): ScaleBarSettings
initialize
Link copied to clipboard
open override fun initialize()
Called when the plugin is first added to the map.
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.
onSizeChanged
Link copied to clipboard
open override fun onSizeChanged(width: Int, height: Int)
Invoked when MapView's width and height have changed.
updateSettings
Link copied to clipboard
abstract fun updateSettings(block: ScaleBarSettings.() -> Unit)

Properties

borderWidth
Link copied to clipboard
abstract var borderWidth: Float
distancePerPixel
Link copied to clipboard
open override var distancePerPixel: Float
How many meters in each pixel.
enabled
Link copied to clipboard
open override var enabled: Boolean
Defines whether the plugins is enabled or disabled.
height
Link copied to clipboard
abstract var height: Float
isMetricUnits
Link copied to clipboard
abstract var isMetricUnits: Boolean
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
position
Link copied to clipboard
abstract var position: Int
primaryColor
Link copied to clipboard
abstract var primaryColor: Int
ratio
Link copied to clipboard
abstract var ratio: Float
refreshInterval
Link copied to clipboard
abstract var refreshInterval: Long
secondaryColor
Link copied to clipboard
abstract var secondaryColor: Int
showTextBorder
Link copied to clipboard
abstract var showTextBorder: Boolean
textBarMargin
Link copied to clipboard
abstract var textBarMargin: Float
textBorderWidth
Link copied to clipboard
abstract var textBorderWidth: Float
textColor
Link copied to clipboard
abstract var textColor: Int
textSize
Link copied to clipboard
abstract var textSize: Float
useContinuousRendering
Link copied to clipboard
open override var useContinuousRendering: Boolean
If set to True scale bar will be triggering onDraw depending on ScaleBarSettings.refreshInterval even if actual data did not change.