SymbolOptions

Builder class from which a symbol is created.

class SymbolOptions : AnnotationOptions<Point, Symbol>

Constructors

SymbolOptions
Link copied to clipboard
fun SymbolOptions()

Types

Companion
Link copied to clipboard

Static variables and methods.

object Companion

Functions

build
Link copied to clipboard

Build an annotation

open override fun build(id: Long, annotationManager: AnnotationManager<Point, Symbol, *, *, *, *>): Symbol
equals
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
getData
Link copied to clipboard

Get the arbitrary json data of the annotation.

fun getData(): JsonElement?
getDraggable
Link copied to clipboard

Returns whether this symbol is draggable, meaning it can be dragged across the screen when touched and moved.

fun getDraggable(): Boolean
getGeometry
Link copied to clipboard

Get the geometry of the symbol, which represents the location of the symbol on the map

fun getGeometry(): Point?
getPoint
Link copied to clipboard

Get the Point of the symbol, which represents the location of the symbol on the map

fun getPoint(): Point?
hashCode
Link copied to clipboard
open override fun hashCode(): Int
toString
Link copied to clipboard
open override fun toString(): String
withData
Link copied to clipboard

Set the arbitrary json data of the annotation.

fun withData(jsonElement: JsonElement): SymbolOptions
withDraggable
Link copied to clipboard

Set whether this symbol should be draggable, meaning it can be dragged across the screen when touched and moved.

fun withDraggable(draggable: Boolean): SymbolOptions
withGeometry
Link copied to clipboard

Set the geometry of the symbol, which represents the location of the symbol on the map

fun withGeometry(geometry: Point): SymbolOptions
withIconAnchor
Link copied to clipboard

Set icon-anchor to initialise the symbol with.

<p> Part of the icon placed closest to the anchor. </p>

fun withIconAnchor(iconAnchor: IconAnchor): SymbolOptions
withIconColor
Link copied to clipboard

Set icon-color to initialise the symbol with.

<p> The color of the icon. This can only be used with sdf icons. </p>

fun withIconColor(iconColor: String): SymbolOptions
withIconHaloBlur
Link copied to clipboard

Set icon-halo-blur to initialise the symbol with.

<p> Fade out the halo towards the outside. </p>

fun withIconHaloBlur(iconHaloBlur: Double): SymbolOptions
withIconHaloColor
Link copied to clipboard

Set icon-halo-color to initialise the symbol with.

<p> The color of the icon's halo. Icon halos can only be used with SDF icons. </p>

fun withIconHaloColor(iconHaloColor: String): SymbolOptions
withIconHaloWidth
Link copied to clipboard

Set icon-halo-width to initialise the symbol with.

<p> Distance of halo to the icon outline. </p>

fun withIconHaloWidth(iconHaloWidth: Double): SymbolOptions
withIconImage
Link copied to clipboard

Set icon-image to initialise the symbol with.

<p> Name of image in sprite to use for drawing an image background. </p>

fun withIconImage(iconImage: String): SymbolOptions
withIconOffset
Link copied to clipboard

Set icon-offset to initialise the symbol with.

<p> Offset distance of icon from its anchor. Positive values indicate right and down, while negative values indicate left and up. Each component is multiplied by the value of {@link PropertyFactory#iconSize} to obtain the final offset in density-independent pixels. When combined with {@link PropertyFactory#iconRotate} the offset will be as if the rotated direction was up. </p>

fun withIconOffset(iconOffset: List<Double>): SymbolOptions
withIconOpacity
Link copied to clipboard

Set icon-opacity to initialise the symbol with.

<p> The opacity at which the icon will be drawn. </p>

fun withIconOpacity(iconOpacity: Double): SymbolOptions
withIconRotate
Link copied to clipboard

Set icon-rotate to initialise the symbol with.

<p> Rotates the icon clockwise. </p>

fun withIconRotate(iconRotate: Double): SymbolOptions
withIconSize
Link copied to clipboard

Set icon-size to initialise the symbol with.

<p> Scales the original size of the icon by the provided factor. The new pixel size of the image will be the original pixel size multiplied by {@link PropertyFactory#iconSize}. 1 is the original size; 3 triples the size of the image. </p>

fun withIconSize(iconSize: Double): SymbolOptions
withPoint
Link copied to clipboard

Set the Point of the symbol, which represents the location of the symbol on the map

fun withPoint(point: Point): SymbolOptions
withSymbolSortKey
Link copied to clipboard

Set symbol-sort-key to initialise the symbol with.

<p> Sorts features in ascending order based on this value. Features with lower sort keys are drawn and placed first. When {@link PropertyFactory#iconAllowOverlap} or {@link PropertyFactory#textAllowOverlap} is `false`, features with a lower sort key will have priority during placement. When {@link PropertyFactory#iconAllowOverlap} or {@link PropertyFactory#textAllowOverlap} is set to `true`, features with a higher sort key will overlap over features with a lower sort key. </p>

fun withSymbolSortKey(symbolSortKey: Double): SymbolOptions
withTextAnchor
Link copied to clipboard

Set text-anchor to initialise the symbol with.

<p> Part of the text placed closest to the anchor. </p>

fun withTextAnchor(textAnchor: TextAnchor): SymbolOptions
withTextColor
Link copied to clipboard

Set text-color to initialise the symbol with.

<p> The color with which the text will be drawn. </p>

fun withTextColor(textColor: String): SymbolOptions
withTextField
Link copied to clipboard

Set text-field to initialise the symbol with.

<p> Value to use for a text label. If a plain `string` is provided, it will be treated as a `formatted` with default/inherited formatting options. </p>

fun withTextField(textField: String): SymbolOptions
withTextFont
Link copied to clipboard

Set text-font to initialise the symbol with.

<p> Font stack to use for displaying text. </p>

fun withTextFont(textFont: List<String>): SymbolOptions
withTextHaloBlur
Link copied to clipboard

Set text-halo-blur to initialise the symbol with.

<p> The halo's fadeout distance towards the outside. </p>

fun withTextHaloBlur(textHaloBlur: Double): SymbolOptions
withTextHaloColor
Link copied to clipboard

Set text-halo-color to initialise the symbol with.

<p> The color of the text's halo, which helps it stand out from backgrounds. </p>

fun withTextHaloColor(textHaloColor: String): SymbolOptions
withTextHaloWidth
Link copied to clipboard

Set text-halo-width to initialise the symbol with.

<p> Distance of halo to the font outline. Max text halo width is 1/4 of the font-size. </p>

fun withTextHaloWidth(textHaloWidth: Double): SymbolOptions
withTextJustify
Link copied to clipboard

Set text-justify to initialise the symbol with.

<p> Text justification options. </p>

fun withTextJustify(textJustify: TextJustify): SymbolOptions
withTextLetterSpacing
Link copied to clipboard

Set text-letter-spacing to initialise the symbol with.

<p> Text tracking amount. </p>

fun withTextLetterSpacing(textLetterSpacing: Double): SymbolOptions
withTextMaxWidth
Link copied to clipboard

Set text-max-width to initialise the symbol with.

<p> The maximum line width for text wrapping. </p>

fun withTextMaxWidth(textMaxWidth: Double): SymbolOptions
withTextOffset
Link copied to clipboard

Set text-offset to initialise the symbol with.

<p> Offset distance of text from its anchor. Positive values indicate right and down, while negative values indicate left and up. If used with text-variable-anchor, input values will be taken as absolute values. Offsets along the x- and y-axis will be applied automatically based on the anchor position. </p>

fun withTextOffset(textOffset: List<Double>): SymbolOptions
withTextOpacity
Link copied to clipboard

Set text-opacity to initialise the symbol with.

<p> The opacity at which the text will be drawn. </p>

fun withTextOpacity(textOpacity: Double): SymbolOptions
withTextRadialOffset
Link copied to clipboard

Set text-radial-offset to initialise the symbol with.

<p> Radial offset of text, in the direction of the symbol's anchor. Useful in combination with {@link PropertyFactory#textVariableAnchor}, which defaults to using the two-dimensional {@link PropertyFactory#textOffset} if present. </p>

fun withTextRadialOffset(textRadialOffset: Double): SymbolOptions
withTextRotate
Link copied to clipboard

Set text-rotate to initialise the symbol with.

<p> Rotates the text clockwise. </p>

fun withTextRotate(textRotate: Double): SymbolOptions
withTextSize
Link copied to clipboard

Set text-size to initialise the symbol with.

<p> Font size. </p>

fun withTextSize(textSize: Double): SymbolOptions
withTextTransform
Link copied to clipboard

Set text-transform to initialise the symbol with.

<p> Specifies how to capitalize text, similar to the CSS {@link PropertyFactory#textTransform} property. </p>

fun withTextTransform(textTransform: TextTransform): SymbolOptions

Properties

iconAnchor
Link copied to clipboard

Part of the icon placed closest to the anchor.

var iconAnchor: IconAnchor
iconColor
Link copied to clipboard

The color of the icon. This can only be used with sdf icons.

var iconColor: String
iconHaloBlur
Link copied to clipboard

Fade out the halo towards the outside.

var iconHaloBlur: Double
iconHaloColor
Link copied to clipboard

The color of the icon's halo. Icon halos can only be used with SDF icons.

var iconHaloColor: String
iconHaloWidth
Link copied to clipboard

Distance of halo to the icon outline.

var iconHaloWidth: Double
iconImage
Link copied to clipboard

Name of image in sprite to use for drawing an image background.

var iconImage: String?
iconOffset
Link copied to clipboard

Offset distance of icon from its anchor. Positive values indicate right and down, while negative values indicate left and up. Each component is multiplied by the value of icon-size to obtain the final offset in pixels. When combined with icon-rotate the offset will be as if the rotated direction was up.

var iconOffset: List<Double>
iconOpacity
Link copied to clipboard

The opacity at which the icon will be drawn.

var iconOpacity: Double
iconRotate
Link copied to clipboard

Rotates the icon clockwise.

var iconRotate: Double
iconSize
Link copied to clipboard

Scales the original size of the icon by the provided factor. The new pixel size of the image will be the original pixel size multiplied by icon-size. 1 is the original size; 3 triples the size of the image.

var iconSize: Double
symbolSortKey
Link copied to clipboard

Sorts features in ascending order based on this value. Features with lower sort keys are drawn and placed first. When icon-allow-overlap or text-allow-overlap is false, features with a lower sort key will have priority during placement. When icon-allow-overlap or text-allow-overlap is set to true, features with a higher sort key will overlap over features with a lower sort key.

var symbolSortKey: Double?
textAnchor
Link copied to clipboard

Part of the text placed closest to the anchor.

var textAnchor: TextAnchor
textColor
Link copied to clipboard

The color with which the text will be drawn.

var textColor: String
textField
Link copied to clipboard

Value to use for a text label. If a plain string is provided, it will be treated as a formatted with default/inherited formatting options.

var textField: String?
textFont
Link copied to clipboard

Font stack to use for displaying text.

var textFont: List<String>
textHaloBlur
Link copied to clipboard

The halo's fadeout distance towards the outside.

var textHaloBlur: Double
textHaloColor
Link copied to clipboard

The color of the text's halo, which helps it stand out from backgrounds.

var textHaloColor: String
textHaloWidth
Link copied to clipboard

Distance of halo to the font outline. Max text halo width is 1/4 of the font-size.

var textHaloWidth: Double
textJustify
Link copied to clipboard

Text justification options.

var textJustify: TextJustify
textLetterSpacing
Link copied to clipboard

Text tracking amount.

var textLetterSpacing: Double
textMaxWidth
Link copied to clipboard

The maximum line width for text wrapping.

var textMaxWidth: Double
textOffset
Link copied to clipboard

Offset distance of text from its anchor. Positive values indicate right and down, while negative values indicate left and up. If used with text-variable-anchor, input values will be taken as absolute values. Offsets along the x- and y-axis will be applied automatically based on the anchor position.

var textOffset: List<Double>
textOpacity
Link copied to clipboard

The opacity at which the text will be drawn.

var textOpacity: Double
textRadialOffset
Link copied to clipboard

Radial offset of text, in the direction of the symbol's anchor. Useful in combination with text-variable-anchor, which defaults to using the two-dimensional text-offset if present.

var textRadialOffset: Double
textRotate
Link copied to clipboard

Rotates the text clockwise.

var textRotate: Double
textSize
Link copied to clipboard

Font size.

var textSize: Double
textTransform
Link copied to clipboard

Specifies how to capitalize text, similar to the CSS text-transform property.

var textTransform: TextTransform