ScaleBarSettingsInterface

Interface that defines the public settings interface for ScaleBarPlugin.

Functions

Link copied to clipboard

Get current scalebar configuration.

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

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

Properties

Link copied to clipboard
abstract var borderWidth: Float

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

Link copied to clipboard
abstract var enabled: Boolean

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

Link copied to clipboard
abstract var height: Float

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

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

Link copied to clipboard
abstract var marginBottom: Float

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

Link copied to clipboard
abstract var marginLeft: Float

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

Link copied to clipboard
abstract var marginRight: Float

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

Link copied to clipboard
abstract var marginTop: Float

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

Link copied to clipboard
abstract var position: Int

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

Link copied to clipboard
abstract var primaryColor: Int

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

Link copied to clipboard
abstract 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
abstract var refreshInterval: Long

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

Link copied to clipboard
abstract var secondaryColor: Int

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

Link copied to clipboard
abstract var showTextBorder: Boolean

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

Link copied to clipboard
abstract var textBarMargin: Float

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

Link copied to clipboard
abstract var textBorderWidth: Float

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

Link copied to clipboard
abstract var textColor: Int

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

Link copied to clipboard
abstract var textSize: Float

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

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

Inheritors

Link copied to clipboard
Link copied to clipboard