Builder

class Builder

Composes and builds a ScaleBarSettings object.

This is a concrete implementation of the builder design pattern.

Constructors

Link copied to clipboard
fun Builder()

Functions

Link copied to clipboard

Returns a ScaleBarSettings reference to the object being constructed by the builder.

Link copied to clipboard
fun setBorderWidth(borderWidth: Float): ScaleBarSettings.Builder

Setter for borderWidth: defines width of the border for the scale bar. Default value: 2. This property is specified in pixels.

Link copied to clipboard
fun setEnabled(enabled: Boolean): ScaleBarSettings.Builder

Setter for enabled: whether the scale is visible on the map. Default value: true.

Link copied to clipboard

Setter for height: defines height of the scale bar. Default value: 2. This property is specified in pixels.

Link copied to clipboard
fun setIsMetricUnits(isMetricUnits: Boolean): ScaleBarSettings.Builder

Setter for isMetricUnits: 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
fun setMarginBottom(marginBottom: Float): ScaleBarSettings.Builder

Setter for marginBottom: defines the margin to the bottom that the scale bar honors. Default value: 4. This property is specified in pixels.

Link copied to clipboard
fun setMarginLeft(marginLeft: Float): ScaleBarSettings.Builder

Setter for marginLeft: defines the margin to the left that the scale bar honors. Default value: 4. This property is specified in pixels.

Link copied to clipboard
fun setMarginRight(marginRight: Float): ScaleBarSettings.Builder

Setter for marginRight: defines the margin to the right that the scale bar honors. Default value: 4. This property is specified in pixels.

Link copied to clipboard
fun setMarginTop(marginTop: Float): ScaleBarSettings.Builder

Setter for marginTop: defines the margin to the top that the scale bar honors. Default value:

Link copied to clipboard

Setter for position: defines where the scale bar is positioned on the map Default value: "top-left".

Link copied to clipboard

Setter for primaryColor: defines primary color of the scale bar. Default value: "black".

Link copied to clipboard

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

Link copied to clipboard
fun setRefreshInterval(refreshInterval: Long): ScaleBarSettings.Builder

Setter for refreshInterval: configures minimum refresh interval, in millisecond, default is

Link copied to clipboard

Setter for secondaryColor: defines secondary color of the scale bar. Default value: "white".

Link copied to clipboard
fun setShowTextBorder(showTextBorder: Boolean): ScaleBarSettings.Builder

Setter for showTextBorder: configures whether to show the text border or not, default is true. Default value: true.

Link copied to clipboard
fun setTextBarMargin(textBarMargin: Float): ScaleBarSettings.Builder

Setter for textBarMargin: defines margin of the text bar of the scale bar. Default value: 8. This property is specified in pixels.

Link copied to clipboard
fun setTextBorderWidth(textBorderWidth: Float): ScaleBarSettings.Builder

Setter for textBorderWidth: defines text border width of the scale bar. Default value: 2. This property is specified in pixels.

Link copied to clipboard

Setter for textColor: defines text color of the scale bar. Default value: "black".

Link copied to clipboard

Setter for textSize: defines text size of the scale bar. Default value: 8. This property is specified in pixels.

Link copied to clipboard
fun setUseContinuousRendering(useContinuousRendering: Boolean): ScaleBarSettings.Builder

Setter for useContinuousRendering: 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.

Properties

Link copied to clipboard
var borderWidth: Float = 2.0f

Defines width of the border for the scale bar. Default value: 2. This property is specified in pixels.

Link copied to clipboard
var enabled: Boolean = true

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

Link copied to clipboard
var height: Float = 2.0f

Defines height of the scale bar. Default value: 2. This property is specified in pixels.

Link copied to clipboard
var isMetricUnits: Boolean = true

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
var marginBottom: Float = 4.0f

Defines the margin to the bottom that the scale bar honors. Default value: 4. This property is specified in pixels.

Link copied to clipboard
var marginLeft: Float = 4.0f

Defines the margin to the left that the scale bar honors. Default value: 4. This property is specified in pixels.

Link copied to clipboard
var marginRight: Float = 4.0f

Defines the margin to the right that the scale bar honors. Default value: 4. This property is specified in pixels.

Link copied to clipboard
var marginTop: Float = 4.0f

Defines the margin to the top that the scale bar honors. Default value: 4. This property is specified in pixels.

Link copied to clipboard
var position: Int

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

Link copied to clipboard
var primaryColor: Int

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

Link copied to clipboard
var ratio: Float = 0.5f

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

Link copied to clipboard
var refreshInterval: Long = 15

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

Link copied to clipboard

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

Link copied to clipboard
var showTextBorder: Boolean = true

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

Link copied to clipboard
var textBarMargin: Float = 8.0f

Defines margin of the text bar of the scale bar. Default value: 8. This property is specified in pixels.

Link copied to clipboard
var textBorderWidth: Float = 2.0f

Defines text border width of the scale bar. Default value: 2. This property is specified in pixels.

Link copied to clipboard
var textColor: Int

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

Link copied to clipboard
var textSize: Float = 8.0f

Defines text size of the scale bar. Default value: 8. This property is specified in pixels.

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