Label

data class Label(val text: String, val textColor: Color = Color.BLACK, @FloatRange(from = 0.0, fromInclusive = false) @Dimension(unit = 0) val textSize: Double = DEFAULT_TEXT_SIZE, val fontUri: Uri = DEFAULT_FONT_URI, val textAnchoring: TextAnchoring = DEFAULT_TEXT_ANCHORING, val offset: PointF = DEFAULT_OFFSET, val outlineColor: Color = Color.BLACK, @FloatRange(from = 0.0) val outlineWidth: Double = DEFAULT_OUTLINE_WIDTH)

Represents Marker label, including all the label specific attributes.

Important: This is a Public Preview API. It may be changed or removed at any time.

Parameters

text

Text of the Label.

textColor

Text color of the Label. The alpha will be ignored and set to fully opaque.

textSize

Text size (in dp units) of the Label.

fontUri

Uri of the font that will be used for the text rendering.

textAnchoring

TextAnchoring determining how the label is positioned in the Marker.

offset

PointF describing the offset that will be used to position the label in the Marker.

outlineColor

Outline color for the text. The alpha will be ignored and set to fully opaque.

outlineWidth

Width of the text outline.

Constructors

Link copied to clipboard
fun Label(text: String, textColor: Color = Color.BLACK, @FloatRange(from = 0.0, fromInclusive = false) @Dimension(unit = 0) textSize: Double = DEFAULT_TEXT_SIZE, fontUri: Uri = DEFAULT_FONT_URI, textAnchoring: TextAnchoring = DEFAULT_TEXT_ANCHORING, offset: PointF = DEFAULT_OFFSET, outlineColor: Color = Color.BLACK, @FloatRange(from = 0.0) outlineWidth: Double = DEFAULT_OUTLINE_WIDTH)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard