Package com.yandex.mapkit.map

Class TextStyle

java.lang.Object
    ↳ com.yandex.mapkit.map.TextStyle

final class TextStyle implements Serializable

The style of placemarks's text.

Nested Class Summary

Modifier and Type

Interface

Description

static final

Placement

Text placement positions

Summary

Constructors

Signature and Description

TextStyle(float size,
          @Nullable java.lang.Integer color,
          float outlineWidth,
          @Nullable java.lang.Integer outlineColor,
          @NonNull Placement placement,
          float offset,
          boolean offsetFromIcon,
          boolean textOptional)

TextStyle()
Use constructor with parameters in your code.

Methods

Type and modifiers

Method and Description

float

getSize()
Text font size in units.

TextStyle

setSize(float size)
See #getSize().

java.lang.Integer

getColor()
Text color.

TextStyle

setColor(@Nullable java.lang.Integer color)
See #getColor().

float

getOutlineWidth()
Outline width in units.

TextStyle

setOutlineWidth(float outlineWidth)
See #getOutlineWidth().

java.lang.Integer

getOutlineColor()
Outline color.

TextStyle

setOutlineColor(@Nullable java.lang.Integer outlineColor)
See #getOutlineColor().

Placement

getPlacement()
Text placement position.

TextStyle

setPlacement(@NonNull Placement placement)
See #getPlacement().

float

getOffset()
Text offset in units.

TextStyle

setOffset(float offset)
See #getOffset().

boolean

getOffsetFromIcon()
When set, mapkit.map.TextStyle#offset is a padding between the text and icon edges.

TextStyle

setOffsetFromIcon(boolean offsetFromIcon)
See #getOffsetFromIcon().

boolean

getTextOptional()
Allow dropping text but keeping icon during conflict resolution default: false

TextStyle

setTextOptional(boolean textOptional)
See #getTextOptional().

void

serialize(com.yandex.runtime.bindings.Archive archive)

Constuctors

TextStyle

TextStyle(float size,
          @Nullable java.lang.Integer color,
          float outlineWidth,
          @Nullable java.lang.Integer outlineColor,
          @NonNull Placement placement,
          float offset,
          boolean offsetFromIcon,
          boolean textOptional)


TextStyle

TextStyle()

Use constructor with parameters in your code.

This one is for bindings only!


Methods

getSize

float getSize()

Text font size in units.

default: 8


setSize

TextStyle setSize(float size)

See #getSize().


getColor

@Nullable
java.lang.Integer getColor()

Text color.

default: black

Optional field, can be null.


setColor

TextStyle setColor(@Nullable java.lang.Integer color)

See #getColor().


getOutlineWidth

float getOutlineWidth()

Outline width in units.

default: 1


setOutlineWidth

TextStyle setOutlineWidth(float outlineWidth)

See #getOutlineWidth().


getOutlineColor

@Nullable
java.lang.Integer getOutlineColor()

Outline color.

default: white

Optional field, can be null.


setOutlineColor

TextStyle setOutlineColor(@Nullable java.lang.Integer outlineColor)

See #getOutlineColor().


getPlacement

@NonNull
Placement getPlacement()

Text placement position.

default: Center


setPlacement

TextStyle setPlacement(@NonNull Placement placement)

See #getPlacement().


getOffset

float getOffset()

Text offset in units.

Measured either from point or form icon edges, depending on mapkit.map.TextStyle#offsetFromIcon value Direction of the offset specified with mapkit.map.TextStyle#placement property Ignored when #placement is 'Center' default: 0


setOffset

TextStyle setOffset(float offset)

See #getOffset().


getOffsetFromIcon

boolean getOffsetFromIcon()

When set, mapkit.map.TextStyle#offset is a padding between the text and icon edges.

default: true


setOffsetFromIcon

TextStyle setOffsetFromIcon(boolean offsetFromIcon)

See #getOffsetFromIcon().


getTextOptional

boolean getTextOptional()

Allow dropping text but keeping icon during conflict resolution default: false


setTextOptional

TextStyle setTextOptional(boolean textOptional)

See #getTextOptional().


serialize

@Override
void serialize(com.yandex.runtime.bindings.Archive archive)