ScaleBarPlugin

Presenter interface for the ScaleBar.

interface ScaleBarPlugin : ViewPlugin, MapSizePlugin, ScaleBarSettingsInterface

Functions

bind
Link copied to clipboard

Bind a view instance

abstract 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

Get current scalebar configuration.

abstract 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 inflate 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

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

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

Properties

borderWidth
Link copied to clipboard

Defines width of the border for the scale bar.

abstract override var borderWidth: Float
distancePerPixel
Link copied to clipboard

How many meters in each pixel.

abstract var distancePerPixel: Float
enabled
Link copied to clipboard

Whether the scale is visible on the map.

abstract override var enabled: Boolean
height
Link copied to clipboard

Defines height of the scale bar.

abstract override var height: Float
isMetricUnits
Link copied to clipboard

Whether the scale bar is using metric unit. True if the scale bar is using metric system, false if the scale bar is using imperial units.

abstract override var isMetricUnits: Boolean
marginBottom
Link copied to clipboard

Defines the margin to the bottom that the scale bar honors.

abstract override var marginBottom: Float
marginLeft
Link copied to clipboard

Defines the margin to the left that the scale bar honors.

abstract override var marginLeft: Float
marginRight
Link copied to clipboard

Defines the margin to the right that the scale bar honors.

abstract override var marginRight: Float
marginTop
Link copied to clipboard

Defines the margin to the top that the scale bar honors.

abstract override var marginTop: Float
position
Link copied to clipboard

Defines where the scale bar is positioned on the map

abstract override var position: Int
primaryColor
Link copied to clipboard

Defines primary color of the scale bar.

abstract override var primaryColor: Int
ratio
Link copied to clipboard

configures ratio of scale bar max width compared with MapView width, default is 0.5.

abstract override var ratio: Float
refreshInterval
Link copied to clipboard

Configures minimum refresh interval, in millisecond, default is 15.

abstract override var refreshInterval: Long
secondaryColor
Link copied to clipboard

Defines secondary color of the scale bar.

abstract override var secondaryColor: Int
showTextBorder
Link copied to clipboard

Configures whether to show the text border or not, default is true.

abstract override var showTextBorder: Boolean
textBarMargin
Link copied to clipboard

Defines margin of the text bar of the scale bar.

abstract override var textBarMargin: Float
textBorderWidth
Link copied to clipboard

Defines text border width of the scale bar.

abstract override var textBorderWidth: Float
textColor
Link copied to clipboard

Defines text color of the scale bar.

abstract override var textColor: Int
textSize
Link copied to clipboard

Defines text size of the scale bar.

abstract 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.

abstract override var useContinuousRendering: Boolean

Inheritors

ScaleBarPluginImpl
Link copied to clipboard