ScaleBarSettingsInterface

interface ScaleBarSettingsInterface

Interface that defines the public settings interface for ScaleBarPlugin.

Functions

getSettings
Link copied to clipboard
abstract fun getSettings(): ScaleBarSettings

Get current scalebar configuration.

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

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

Properties

borderWidth
Link copied to clipboard
abstract var borderWidth: Float

Defines width of the border for the scale bar.

enabled
Link copied to clipboard
abstract var enabled: Boolean

Whether the scale is visible on the map.

height
Link copied to clipboard
abstract var height: Float

Defines height of the scale bar.

isMetricUnits
Link copied to clipboard
abstract var isMetricUnits: Boolean

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.

marginBottom
Link copied to clipboard
abstract var marginBottom: Float

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

marginLeft
Link copied to clipboard
abstract var marginLeft: Float

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

marginRight
Link copied to clipboard
abstract var marginRight: Float

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

marginTop
Link copied to clipboard
abstract var marginTop: Float

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

position
Link copied to clipboard
abstract var position: Int

Defines where the scale bar is positioned on the map

primaryColor
Link copied to clipboard
abstract var primaryColor: Int

Defines primary color of the scale bar.

ratio
Link copied to clipboard
abstract var ratio: Float

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

refreshInterval
Link copied to clipboard
abstract var refreshInterval: Long

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

secondaryColor
Link copied to clipboard
abstract var secondaryColor: Int

Defines secondary color of the scale bar.

showTextBorder
Link copied to clipboard
abstract var showTextBorder: Boolean

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

textBarMargin
Link copied to clipboard
abstract var textBarMargin: Float

Defines margin of the text bar of the scale bar.

textBorderWidth
Link copied to clipboard
abstract var textBorderWidth: Float

Defines text border width of the scale bar.

textColor
Link copied to clipboard
abstract var textColor: Int

Defines text color of the scale bar.

textSize
Link copied to clipboard
abstract var textSize: Float

Defines text size of the scale bar.

useContinuousRendering
Link copied to clipboard
abstract var useContinuousRendering: Boolean

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.

Inheritors

ScaleBarPlugin
Link copied to clipboard
ScaleBarSettingsBase
Link copied to clipboard