FormattedSection

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

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

Link copied to clipboard
fun FormattedSection(text: String, fontScale: Double? = null, fontStack: List<String>? = null, textColor: String? = null)

Properties

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

ColorInt representation for textColor.