FormattedSection

A component of the Formatted.

data class FormattedSection @JvmOverloads() constructor(text: String, fontScale: Double?, fontStack: List<String>?, textColor: String?)

Parameters

fontScale

scale of the font, setting to null will fall back to style's default settings

fontStack

main and fallback fonts that are a part of the style, setting null will fall back to style's default settings. The requested font stack has to be a part of the used style. For more information see The online documentationhttps://www.mapbox.com/help/define-font-stack/).

text

displayed string

textColor

text color, setting to null will fall back to style's default settings. Value of red, green, blue components must range between 0 and 255, an alpha component must range between 0 and 1.

For more information see The online documentationhttps://docs.mapbox.com/mapbox-gl-js/style-spec/#types-color).

Constructors

FormattedSection
Link copied to clipboard

displayed string

fun FormattedSection(text: String, fontScale: Double?, fontStack: List<String>?, textColor: String?)

Functions

component1
Link copied to clipboard
operator fun component1(): String
component2
Link copied to clipboard
operator fun component2(): Double?
component3
Link copied to clipboard
operator fun component3(): List<String>?
component4
Link copied to clipboard
operator fun component4(): String?
copy
Link copied to clipboard
fun copy(text: String, fontScale: Double?, fontStack: List<String>?, textColor: String?): FormattedSection
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

fontScale
Link copied to clipboard

scale of the font, setting to null will fall back to style's default settings

var fontScale: Double?
fontStack
Link copied to clipboard

main and fallback fonts that are a part of the style, setting null will fall back to style's default settings. The requested font stack has to be a part of the used style. For more information see The online documentationhttps://www.mapbox.com/help/define-font-stack/).

var fontStack: List<String>?
text
Link copied to clipboard

displayed string

val text: String
textColor
Link copied to clipboard

text color, setting to null will fall back to style's default settings. Value of red, green, blue components must range between 0 and 255, an alpha component must range between 0 and 1.

For more information see The online documentationhttps://docs.mapbox.com/mapbox-gl-js/style-spec/#types-color).

var textColor: String?
textColorAsInt
Link copied to clipboard

ColorInt representation for textColor.

var textColorAsInt: Int