TextSymbol

class TextSymbol : MarkerSymbol

Used to display text at points on a layer. Text symbols are used to display text for graphics. The graphics can be based on any type of geometry - point, multipoint, polyline, or polygon.

See also

Constructors

Link copied to clipboard
fun TextSymbol()

Creates a text symbol object.

Link copied to clipboard
fun TextSymbol(    text: String,     color: Color,     size: Float,     horizontalAlignment: HorizontalAlignment,     verticalAlignment: VerticalAlignment)

Creates a text symbol object with some initial values.

Functions

Link copied to clipboard
open override fun clone(): TextSymbol

Clones the TextSymbol.

Link copied to clipboard
suspend fun createSwatch(    screenScale: Float,     width: Float? = null,     height: Float? = null,     backgroundColor: Color = Color.transparent): Result<BitmapDrawable>

Creates a swatch of the symbol. This method will scale the symbol up or down in order to fit it in to the desired width and height of the swatch.

suspend fun createSwatch(    screenScale: Float,     width: Float,     height: Float,     geometry: Geometry,     backgroundColor: Color = Color.transparent): Result<BitmapDrawable>

Creates a swatch of the symbol.

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun toJson(): String

Convert an object to JSON string.

Properties

Link copied to clipboard
var angle: Float

The angle (in degrees) of the marker symbol.

Link copied to clipboard
var angleAlignment: SymbolAngleAlignment

The symbol angle alignment of the marker symbol. The angle alignment of the marker symbol. Returns SymbolAngleAlignment.Map if an error occurs.

Link copied to clipboard
var backgroundColor: Color

The color for the text symbol background.

Link copied to clipboard
var color: Color

The color for the text symbol.

Link copied to clipboard
var fontDecoration: FontDecoration

The type of font decoration for the text symbol. FontDecoration.None if an error occurs.

Link copied to clipboard
var fontFamily: String

The font family of the text symbol.

Link copied to clipboard
var fontStyle: FontStyle

The font style of the text symbol. Returns FontStyle.Normal if an error occurs.

Link copied to clipboard
var fontWeight: FontWeight

The font weight of the text symbol. Returns FontWeight.Normal if an error occurs.

Link copied to clipboard
var haloColor: Color?

The color for the halo around the text symbol.

Link copied to clipboard
var haloWidth: Float

The size of the halo around the text symbol, in DIPs.

Link copied to clipboard
var horizontalAlignment: HorizontalAlignment

The horizontal alignment of the text symbol. Returns HorizontalAlignment.Center if an error occurs.

Link copied to clipboard
var kerningEnabled: Boolean

If kerning needs to be enabled. It is disabled by default. Determines whether to adjust the spacing between characters in the text string.

Link copied to clipboard
var leaderOffsetX: Float

The leader offset X of the marker symbol.

Link copied to clipboard
var leaderOffsetY: Float

The leader offset Y of the marker symbol.

Link copied to clipboard
var offsetX: Float

The offset X of the marker symbol.

Link copied to clipboard
var offsetY: Float

The offset Y of the marker symbol.

Link copied to clipboard
var outlineColor: Color?

The color for the text symbol outline.

Link copied to clipboard
var outlineWidth: Float

The width of the text symbol outline, in DIPs.

Link copied to clipboard
var size: Float

The font size of the text symbol.

Link copied to clipboard
var text: String

The text of the text symbol.

Link copied to clipboard
open override val unknownJson: Map<String, Any>

Unknown data from the source JSON. Unknown JSON is a dictionary of values that was in the source JSON but was unparsed by this API.

Link copied to clipboard
open override val unsupportedJson: Map<String, Any>

Unsupported data from the source JSON. Unsupported JSON is a dictionary of values that are supported by web maps, but not exposed through this API.

Link copied to clipboard
var verticalAlignment: VerticalAlignment

The vertical alignment of the text symbol. Returns VerticalAlignment.Middle if an error occurs.