ScaleBarSettings

data class ScaleBarSettings @JvmOverloads() constructor(enabled: Boolean, position: Int, marginLeft: Float, marginTop: Float, marginRight: Float, marginBottom: Float, textColor: Int, primaryColor: Int, secondaryColor: Int, borderWidth: Float, height: Float, textBarMargin: Float, textBorderWidth: Float, textSize: Float, isMetricUnits: Boolean, refreshInterval: Long, showTextBorder: Boolean, ratio: Float, useContinuousRendering: Boolean)

Shows the scale bar on the map.

Constructors

ScaleBarSettings
Link copied to clipboard
fun ScaleBarSettings(enabled: Boolean = true, position: Int = Gravity.TOP or Gravity.START, marginLeft: Float = 4f, marginTop: Float = 4f, marginRight: Float = 4f, marginBottom: Float = 4f, textColor: Int = Color.BLACK, primaryColor: Int = Color.BLACK, secondaryColor: Int = Color.WHITE, borderWidth: Float = 2f, height: Float = 2f, textBarMargin: Float = 8f, textBorderWidth: Float = 2f, textSize: Float = 8f, isMetricUnits: Boolean = true, refreshInterval: Long = 15, showTextBorder: Boolean = true, ratio: Float = 0.5f, useContinuousRendering: Boolean = false)

Functions

component1
Link copied to clipboard
operator fun component1(): Boolean
component10
Link copied to clipboard
operator fun component10(): Float
component11
Link copied to clipboard
operator fun component11(): Float
component12
Link copied to clipboard
operator fun component12(): Float
component13
Link copied to clipboard
operator fun component13(): Float
component14
Link copied to clipboard
operator fun component14(): Float
component15
Link copied to clipboard
operator fun component15(): Boolean
component16
Link copied to clipboard
operator fun component16(): Long
component17
Link copied to clipboard
operator fun component17(): Boolean
component18
Link copied to clipboard
operator fun component18(): Float
component19
Link copied to clipboard
operator fun component19(): Boolean
component2
Link copied to clipboard
operator fun component2(): Int
component3
Link copied to clipboard
operator fun component3(): Float
component4
Link copied to clipboard
operator fun component4(): Float
component5
Link copied to clipboard
operator fun component5(): Float
component6
Link copied to clipboard
operator fun component6(): Float
component7
Link copied to clipboard
operator fun component7(): Int
component8
Link copied to clipboard
operator fun component8(): Int
component9
Link copied to clipboard
operator fun component9(): Int
copy
Link copied to clipboard
fun copy(enabled: Boolean = true, position: Int = Gravity.TOP or Gravity.START, marginLeft: Float = 4f, marginTop: Float = 4f, marginRight: Float = 4f, marginBottom: Float = 4f, textColor: Int = Color.BLACK, primaryColor: Int = Color.BLACK, secondaryColor: Int = Color.WHITE, borderWidth: Float = 2f, height: Float = 2f, textBarMargin: Float = 8f, textBorderWidth: Float = 2f, textSize: Float = 8f, isMetricUnits: Boolean = true, refreshInterval: Long = 15, showTextBorder: Boolean = true, ratio: Float = 0.5f, useContinuousRendering: Boolean = false): ScaleBarSettings
equals
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
hashCode
Link copied to clipboard
open override fun hashCode(): Int
toString
Link copied to clipboard
open override fun toString(): String

Properties

borderWidth
Link copied to clipboard
var borderWidth: Float = 2f
Defines width of the border for the scale bar.
enabled
Link copied to clipboard
var enabled: Boolean = true
Whether the scale is visible on the map.
height
Link copied to clipboard
var height: Float = 2f
Defines height of the scale bar.
isMetricUnits
Link copied to clipboard
var isMetricUnits: Boolean = true
Whether the scale bar is using metric unit.
marginBottom
Link copied to clipboard
var marginBottom: Float = 4f
Defines the margin to the bottom that the scale bar honors.
marginLeft
Link copied to clipboard
var marginLeft: Float = 4f
Defines the margin to the left that the scale bar honors.
marginRight
Link copied to clipboard
var marginRight: Float = 4f
Defines the margin to the right that the scale bar honors.
marginTop
Link copied to clipboard
var marginTop: Float = 4f
Defines the margin to the top that the scale bar honors.
position
Link copied to clipboard
var position: Int
Defines where the scale bar is positioned on the map
primaryColor
Link copied to clipboard
var primaryColor: Int
Defines primary color of the scale bar.
ratio
Link copied to clipboard
var ratio: Float = 0.5f
configures ratio of scale bar max width compared with MapView width, default is 0.5.
refreshInterval
Link copied to clipboard
var refreshInterval: Long = 15
Configures minimum refresh interval, in millisecond, default is 15.
secondaryColor
Link copied to clipboard
var secondaryColor: Int
Defines secondary color of the scale bar.
showTextBorder
Link copied to clipboard
var showTextBorder: Boolean = true
Configures whether to show the text border or not, default is true.
textBarMargin
Link copied to clipboard
var textBarMargin: Float = 8f
Defines margin of the text bar of the scale bar.
textBorderWidth
Link copied to clipboard
var textBorderWidth: Float = 2f
Defines text border width of the scale bar.
textColor
Link copied to clipboard
var textColor: Int
Defines text color of the scale bar.
textSize
Link copied to clipboard
var textSize: Float = 8f
Defines text size of the scale bar.
useContinuousRendering
Link copied to clipboard
var useContinuousRendering: Boolean = false
If set to True scale bar will be triggering onDraw depending on ScaleBarSettings.refreshInterval even if actual data did not change.