Class TextStyle

Package world.mappable.mapkit.map

java.lang.Object
    ↳ world.mappable.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,
          int color,
          float outlineWidth,
          int 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().

int

getColor()
Text color.

TextStyle

setColor(int color)
See #getColor().

float

getOutlineWidth()
Outline width in units.

TextStyle

setOutlineWidth(float outlineWidth)
See #getOutlineWidth().

int

getOutlineColor()
Outline color.

TextStyle

setOutlineColor(int 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(world.mappable.runtime.bindings.Archive archive)

Constuctors

TextStyle

TextStyle(float size,
          int color,
          float outlineWidth,
          int 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

int getColor()

Text color.

default: black


setColor

TextStyle setColor(int color)

See #getColor().


getOutlineWidth

float getOutlineWidth()

Outline width in units.

default: 1


setOutlineWidth

TextStyle setOutlineWidth(float outlineWidth)

See #getOutlineWidth().


getOutlineColor

int getOutlineColor()

Outline color.

default: white


setOutlineColor

TextStyle setOutlineColor(int 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(world.mappable.runtime.bindings.Archive archive)