FormattedSection

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

A component of the Formatted.

Parameters

text

displayed string

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

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
fun FormattedSection(text: String, fontScale: Double? = null, fontStack: List<String>? = null, textColor: String? = null)

Properties

fontScale
Link copied to clipboard
var fontScale: Double? = null
fontStack
Link copied to clipboard
var fontStack: List<String>? = null
text
Link copied to clipboard
val text: String
textColor
Link copied to clipboard
var textColor: String? = null
textColorAsInt
Link copied to clipboard
var textColorAsInt: Int

ColorInt representation for textColor.