ScaleBarPluginImpl

Concrete implementation of ScaleBarViewPlugin.

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

Constructors

ScaleBarPluginImpl
Link copied to clipboard
fun ScaleBarPluginImpl(viewImplProvider: (Context) -> ScaleBarImpl)

Functions

bind
Link copied to clipboard

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

open override fun bind(mapView: FrameLayout, attrs: AttributeSet?, pixelRatio: Float): View
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
getSettings
Link copied to clipboard
open override fun getSettings(): ScaleBarSettings
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()
onDelegateProvider
Link copied to clipboard

Provides all map delegate instances.

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

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

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

Invoked when MapView's width and height have changed.

open override fun onSizeChanged(width: Int, height: Int)
toString
Link copied to clipboard
open override fun toString(): String
updateSettings
Link copied to clipboard
open override fun updateSettings(block: ScaleBarSettings.() -> Unit)

Properties

borderWidth
Link copied to clipboard
open override var borderWidth: Float
distancePerPixel
Link copied to clipboard

How many meters in each pixel.

open override var distancePerPixel: Float
enabled
Link copied to clipboard

Defines whether the plugins is enabled or disabled.

open override var enabled: Boolean
height
Link copied to clipboard
open override var height: Float
isMetricUnits
Link copied to clipboard
open override var isMetricUnits: Boolean
marginBottom
Link copied to clipboard
open override var marginBottom: Float
marginLeft
Link copied to clipboard
open override var marginLeft: Float
marginRight
Link copied to clipboard
open override var marginRight: Float
marginTop
Link copied to clipboard
open override var marginTop: Float
position
Link copied to clipboard
open override var position: Int
primaryColor
Link copied to clipboard
open override var primaryColor: Int
ratio
Link copied to clipboard
open override var ratio: Float
refreshInterval
Link copied to clipboard
open override var refreshInterval: Long
secondaryColor
Link copied to clipboard
open override var secondaryColor: Int
showTextBorder
Link copied to clipboard
open override var showTextBorder: Boolean
textBarMargin
Link copied to clipboard
open override var textBarMargin: Float
textBorderWidth
Link copied to clipboard
open override var textBorderWidth: Float
textColor
Link copied to clipboard
open override var textColor: Int
textSize
Link copied to clipboard
open override var textSize: Float
useContinuousRendering
Link copied to clipboard

If set to True scale bar will be triggering onDraw depending on ScaleBarSettings.refreshInterval even if actual data did not change. If set to False scale bar will redraw only on demand.

Defaults to False and should not be changed explicitly in most cases. Could be set to True to produce correct GPU frame metrics when running gfxinfo command.

open override var useContinuousRendering: Boolean