ScaleBarSettingsBase

Abstract settings class for ScaleBarPlugin.

This abstract class exposes all the required public APIs to configure the ScaleBarPlugin.

Constructors

Link copied to clipboard

Functions

Link copied to clipboard
open override fun getSettings(): ScaleBarSettings

Get current scalebar configuration.

Link copied to clipboard
open override fun updateSettings(block: ScaleBarSettings.Builder.() -> Unit)

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

Properties

Link copied to clipboard
open override var borderWidth: Float

Defines width of the border for the scale bar. Default value: 2.

Link copied to clipboard
open override var enabled: Boolean

Whether the scale is visible on the map. Default value: true.

Link copied to clipboard
open override var height: Float

Defines height of the scale bar. Default value: 2.

Link copied to clipboard
open override 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. Default value: true.

Link copied to clipboard
open override var marginBottom: Float

Defines the margin to the bottom that the scale bar honors. Default value: 4.

Link copied to clipboard
open override var marginLeft: Float

Defines the margin to the left that the scale bar honors. Default value: 4.

Link copied to clipboard
open override var marginRight: Float

Defines the margin to the right that the scale bar honors. Default value: 4.

Link copied to clipboard
open override var marginTop: Float

Defines the margin to the top that the scale bar honors. Default value: 4.

Link copied to clipboard
open override var position: Int

Defines where the scale bar is positioned on the map Default value: "top-left".

Link copied to clipboard
open override var primaryColor: Int

Defines primary color of the scale bar. Default value: "black".

Link copied to clipboard
open override var ratio: Float

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

Link copied to clipboard
open override var refreshInterval: Long

Configures minimum refresh interval, in millisecond, default is 15. Default value: 15.

Link copied to clipboard
open override var secondaryColor: Int

Defines secondary color of the scale bar. Default value: "white".

Link copied to clipboard
open override var showTextBorder: Boolean

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

Link copied to clipboard
open override var textBarMargin: Float

Defines margin of the text bar of the scale bar. Default value: 8.

Link copied to clipboard
open override var textBorderWidth: Float

Defines text border width of the scale bar. Default value: 2.

Link copied to clipboard
open override var textColor: Int

Defines text color of the scale bar. Default value: "black".

Link copied to clipboard
open override var textSize: Float

Defines text size of the scale bar. Default value: 8.

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. 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. Default value: false.