SymbolLayer

class SymbolLayer(layerId: String, sourceId: String) : Layer, SymbolLayerDsl

An icon or a text label.

See also

Parameters

layerId

the ID of the layer

sourceId

the ID of the source

Constructors

SymbolLayer
Link copied to clipboard
fun SymbolLayer(layerId: String, sourceId: String)

Types

Companion
Link copied to clipboard
object Companion

Static variables and methods.

Functions

bindTo
Link copied to clipboard
fun bindTo(delegate: StyleInterface)

Bind the layer to the Style.

open override fun bindTo(delegate: StyleInterface, position: LayerPosition?)

Bind the layer to the map controller.

filter
Link copied to clipboard
open override fun filter(filter: Expression): SymbolLayer

A filter is a property at the layer level that determines which features should be rendered in a style layer.

iconAllowOverlap
Link copied to clipboard
open override fun iconAllowOverlap(iconAllowOverlap: Expression): SymbolLayer
open override fun iconAllowOverlap(iconAllowOverlap: Boolean): SymbolLayer

If true, the icon will be visible even if it collides with other previously drawn symbols.

iconAnchor
Link copied to clipboard
open override fun iconAnchor(iconAnchor: Expression): SymbolLayer
open override fun iconAnchor(iconAnchor: IconAnchor): SymbolLayer

Part of the icon placed closest to the anchor.

iconColor
Link copied to clipboard
open override fun iconColor(iconColor: Expression): SymbolLayer
open override fun iconColor(@ColorInt iconColor: Int): SymbolLayer
open override fun iconColor(iconColor: String): SymbolLayer

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

iconColorTransition
Link copied to clipboard
open override fun iconColorTransition(options: StyleTransition): SymbolLayer

Set the IconColor property transition options

open override fun iconColorTransition(block: StyleTransition.Builder.() -> Unit): SymbolLayer
iconHaloBlur
Link copied to clipboard
open override fun iconHaloBlur(iconHaloBlur: Expression): SymbolLayer
open override fun iconHaloBlur(iconHaloBlur: Double): SymbolLayer

Fade out the halo towards the outside.

iconHaloBlurTransition
Link copied to clipboard
open override fun iconHaloBlurTransition(options: StyleTransition): SymbolLayer

Set the IconHaloBlur property transition options

open override fun iconHaloBlurTransition(block: StyleTransition.Builder.() -> Unit): SymbolLayer
iconHaloColor
Link copied to clipboard
open override fun iconHaloColor(iconHaloColor: Expression): SymbolLayer
open override fun iconHaloColor(@ColorInt iconHaloColor: Int): SymbolLayer
open override fun iconHaloColor(iconHaloColor: String): SymbolLayer

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

iconHaloColorTransition
Link copied to clipboard
open override fun iconHaloColorTransition(options: StyleTransition): SymbolLayer

Set the IconHaloColor property transition options

open override fun iconHaloColorTransition(block: StyleTransition.Builder.() -> Unit): SymbolLayer
iconHaloWidth
Link copied to clipboard
open override fun iconHaloWidth(iconHaloWidth: Expression): SymbolLayer
open override fun iconHaloWidth(iconHaloWidth: Double): SymbolLayer

Distance of halo to the icon outline.

iconHaloWidthTransition
Link copied to clipboard
open override fun iconHaloWidthTransition(options: StyleTransition): SymbolLayer

Set the IconHaloWidth property transition options

open override fun iconHaloWidthTransition(block: StyleTransition.Builder.() -> Unit): SymbolLayer
iconIgnorePlacement
Link copied to clipboard
open override fun iconIgnorePlacement(iconIgnorePlacement: Expression): SymbolLayer
open override fun iconIgnorePlacement(iconIgnorePlacement: Boolean): SymbolLayer

If true, other symbols can be visible even if they collide with the icon.

iconImage
Link copied to clipboard
open override fun iconImage(iconImage: Expression): SymbolLayer
open override fun iconImage(iconImage: String): SymbolLayer

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

iconKeepUpright
Link copied to clipboard
open override fun iconKeepUpright(iconKeepUpright: Expression): SymbolLayer
open override fun iconKeepUpright(iconKeepUpright: Boolean): SymbolLayer

If true, the icon may be flipped to prevent it from being rendered upside-down.

iconOffset
Link copied to clipboard
open override fun iconOffset(iconOffset: Expression): SymbolLayer
open override fun iconOffset(iconOffset: List<Double>): SymbolLayer

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.

iconOpacity
Link copied to clipboard
open override fun iconOpacity(iconOpacity: Expression): SymbolLayer
open override fun iconOpacity(iconOpacity: Double): SymbolLayer

The opacity at which the icon will be drawn.

iconOpacityTransition
Link copied to clipboard
open override fun iconOpacityTransition(options: StyleTransition): SymbolLayer

Set the IconOpacity property transition options

open override fun iconOpacityTransition(block: StyleTransition.Builder.() -> Unit): SymbolLayer
iconOptional
Link copied to clipboard
open override fun iconOptional(iconOptional: Expression): SymbolLayer
open override fun iconOptional(iconOptional: Boolean): SymbolLayer

If true, text will display without their corresponding icons when the icon collides with other symbols and the text does not.

iconPadding
Link copied to clipboard
open override fun iconPadding(iconPadding: Expression): SymbolLayer
open override fun iconPadding(iconPadding: Double): SymbolLayer

Size of the additional area around the icon bounding box used for detecting symbol collisions.

iconPitchAlignment
Link copied to clipboard
open override fun iconPitchAlignment(iconPitchAlignment: Expression): SymbolLayer
open override fun iconPitchAlignment(iconPitchAlignment: IconPitchAlignment): SymbolLayer

Orientation of icon when map is pitched.

iconRotate
Link copied to clipboard
open override fun iconRotate(iconRotate: Expression): SymbolLayer
open override fun iconRotate(iconRotate: Double): SymbolLayer

Rotates the icon clockwise.

iconRotationAlignment
Link copied to clipboard
open override fun iconRotationAlignment(iconRotationAlignment: Expression): SymbolLayer
open override fun iconRotationAlignment(iconRotationAlignment: IconRotationAlignment): SymbolLayer

In combination with symbol-placement, determines the rotation behavior of icons.

iconSize
Link copied to clipboard
open override fun iconSize(iconSize: Expression): SymbolLayer
open override fun iconSize(iconSize: Double): SymbolLayer

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.

iconTextFit
Link copied to clipboard
open override fun iconTextFit(iconTextFit: Expression): SymbolLayer
open override fun iconTextFit(iconTextFit: IconTextFit): SymbolLayer

Scales the icon to fit around the associated text.

iconTextFitPadding
Link copied to clipboard
open override fun iconTextFitPadding(iconTextFitPadding: Expression): SymbolLayer
open override fun iconTextFitPadding(iconTextFitPadding: List<Double>): SymbolLayer

Size of the additional area added to dimensions determined by icon-text-fit, in clockwise order: top, right, bottom, left.

iconTranslate
Link copied to clipboard
open override fun iconTranslate(iconTranslate: Expression): SymbolLayer
open override fun iconTranslate(iconTranslate: List<Double>): SymbolLayer

Distance that the icon's anchor is moved from its original placement. Positive values indicate right and down, while negative values indicate left and up.

iconTranslateAnchor
Link copied to clipboard
open override fun iconTranslateAnchor(iconTranslateAnchor: Expression): SymbolLayer
open override fun iconTranslateAnchor(iconTranslateAnchor: IconTranslateAnchor): SymbolLayer

Controls the frame of reference for icon-translate.

iconTranslateTransition
Link copied to clipboard
open override fun iconTranslateTransition(options: StyleTransition): SymbolLayer

Set the IconTranslate property transition options

open override fun iconTranslateTransition(block: StyleTransition.Builder.() -> Unit): SymbolLayer
maxZoom
Link copied to clipboard
open override fun maxZoom(maxZoom: Double): SymbolLayer

The maximum zoom level for the layer. At zoom levels equal to or greater than the maxzoom, the layer will be hidden.

minZoom
Link copied to clipboard
open override fun minZoom(minZoom: Double): SymbolLayer

The minimum zoom level for the layer. At zoom levels less than the minzoom, the layer will be hidden.

sourceLayer
Link copied to clipboard
open override fun sourceLayer(sourceLayer: String): SymbolLayer

A source layer is an individual layer of data within a vector source. A vector source can have multiple source layers.

symbolAvoidEdges
Link copied to clipboard
open override fun symbolAvoidEdges(symbolAvoidEdges: Expression): SymbolLayer
open override fun symbolAvoidEdges(symbolAvoidEdges: Boolean): SymbolLayer

If true, the symbols will not cross tile edges to avoid mutual collisions. Recommended in layers that don't have enough padding in the vector tile to prevent collisions, or if it is a point symbol layer placed after a line symbol layer. When using a client that supports global collision detection, like Mapbox GL JS version 0.42.0 or greater, enabling this property is not needed to prevent clipped labels at tile boundaries.

symbolPlacement
Link copied to clipboard
open override fun symbolPlacement(symbolPlacement: Expression): SymbolLayer
open override fun symbolPlacement(symbolPlacement: SymbolPlacement): SymbolLayer

Label placement relative to its geometry.

symbolSortKey
Link copied to clipboard
open override fun symbolSortKey(symbolSortKey: Expression): SymbolLayer
open override fun symbolSortKey(symbolSortKey: Double): SymbolLayer

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.

symbolSpacing
Link copied to clipboard
open override fun symbolSpacing(symbolSpacing: Expression): SymbolLayer
open override fun symbolSpacing(symbolSpacing: Double): SymbolLayer

Distance between two symbol anchors.

symbolZOrder
Link copied to clipboard
open override fun symbolZOrder(symbolZOrder: Expression): SymbolLayer
open override fun symbolZOrder(symbolZOrder: SymbolZOrder): SymbolLayer

Determines whether overlapping symbols in the same layer are rendered in the order that they appear in the data source or by their y-position relative to the viewport. To control the order and prioritization of symbols otherwise, use symbol-sort-key.

textAllowOverlap
Link copied to clipboard
open override fun textAllowOverlap(textAllowOverlap: Expression): SymbolLayer
open override fun textAllowOverlap(textAllowOverlap: Boolean): SymbolLayer

If true, the text will be visible even if it collides with other previously drawn symbols.

textAnchor
Link copied to clipboard
open override fun textAnchor(textAnchor: Expression): SymbolLayer
open override fun textAnchor(textAnchor: TextAnchor): SymbolLayer

Part of the text placed closest to the anchor.

textColor
Link copied to clipboard
open override fun textColor(textColor: Expression): SymbolLayer
open override fun textColor(@ColorInt textColor: Int): SymbolLayer
open override fun textColor(textColor: String): SymbolLayer

The color with which the text will be drawn.

textColorTransition
Link copied to clipboard
open override fun textColorTransition(options: StyleTransition): SymbolLayer

Set the TextColor property transition options

open override fun textColorTransition(block: StyleTransition.Builder.() -> Unit): SymbolLayer
textField
Link copied to clipboard
open override fun textField(textField: Expression): SymbolLayer
open override fun textField(textField: Formatted): SymbolLayer
open override fun textField(textField: String): SymbolLayer

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.

open override fun textField(block: Formatted.() -> Unit): SymbolLayer

DSL for construct Formatted textField.

textFont
Link copied to clipboard
open override fun textFont(textFont: Expression): SymbolLayer
open override fun textFont(textFont: List<String>): SymbolLayer

Font stack to use for displaying text.

textHaloBlur
Link copied to clipboard
open override fun textHaloBlur(textHaloBlur: Expression): SymbolLayer
open override fun textHaloBlur(textHaloBlur: Double): SymbolLayer

The halo's fadeout distance towards the outside.

textHaloBlurTransition
Link copied to clipboard
open override fun textHaloBlurTransition(options: StyleTransition): SymbolLayer

Set the TextHaloBlur property transition options

open override fun textHaloBlurTransition(block: StyleTransition.Builder.() -> Unit): SymbolLayer
textHaloColor
Link copied to clipboard
open override fun textHaloColor(textHaloColor: Expression): SymbolLayer
open override fun textHaloColor(@ColorInt textHaloColor: Int): SymbolLayer
open override fun textHaloColor(textHaloColor: String): SymbolLayer

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

textHaloColorTransition
Link copied to clipboard
open override fun textHaloColorTransition(options: StyleTransition): SymbolLayer

Set the TextHaloColor property transition options

open override fun textHaloColorTransition(block: StyleTransition.Builder.() -> Unit): SymbolLayer
textHaloWidth
Link copied to clipboard
open override fun textHaloWidth(textHaloWidth: Expression): SymbolLayer
open override fun textHaloWidth(textHaloWidth: Double): SymbolLayer

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

textHaloWidthTransition
Link copied to clipboard
open override fun textHaloWidthTransition(options: StyleTransition): SymbolLayer

Set the TextHaloWidth property transition options

open override fun textHaloWidthTransition(block: StyleTransition.Builder.() -> Unit): SymbolLayer
textIgnorePlacement
Link copied to clipboard
open override fun textIgnorePlacement(textIgnorePlacement: Expression): SymbolLayer
open override fun textIgnorePlacement(textIgnorePlacement: Boolean): SymbolLayer

If true, other symbols can be visible even if they collide with the text.

textJustify
Link copied to clipboard
open override fun textJustify(textJustify: Expression): SymbolLayer
open override fun textJustify(textJustify: TextJustify): SymbolLayer

Text justification options.

textKeepUpright
Link copied to clipboard
open override fun textKeepUpright(textKeepUpright: Expression): SymbolLayer
open override fun textKeepUpright(textKeepUpright: Boolean): SymbolLayer

If true, the text may be flipped vertically to prevent it from being rendered upside-down.

textLetterSpacing
Link copied to clipboard
open override fun textLetterSpacing(textLetterSpacing: Expression): SymbolLayer
open override fun textLetterSpacing(textLetterSpacing: Double): SymbolLayer

Text tracking amount.

textLineHeight
Link copied to clipboard
open override fun textLineHeight(textLineHeight: Expression): SymbolLayer
open override fun textLineHeight(textLineHeight: Double): SymbolLayer

Text leading value for multi-line text.

textMaxAngle
Link copied to clipboard
open override fun textMaxAngle(textMaxAngle: Expression): SymbolLayer
open override fun textMaxAngle(textMaxAngle: Double): SymbolLayer

Maximum angle change between adjacent characters.

textMaxWidth
Link copied to clipboard
open override fun textMaxWidth(textMaxWidth: Expression): SymbolLayer
open override fun textMaxWidth(textMaxWidth: Double): SymbolLayer

The maximum line width for text wrapping.

textOffset
Link copied to clipboard
open override fun textOffset(textOffset: Expression): SymbolLayer
open override fun textOffset(textOffset: List<Double>): SymbolLayer

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.

textOpacity
Link copied to clipboard
open override fun textOpacity(textOpacity: Expression): SymbolLayer
open override fun textOpacity(textOpacity: Double): SymbolLayer

The opacity at which the text will be drawn.

textOpacityTransition
Link copied to clipboard
open override fun textOpacityTransition(options: StyleTransition): SymbolLayer

Set the TextOpacity property transition options

open override fun textOpacityTransition(block: StyleTransition.Builder.() -> Unit): SymbolLayer
textOptional
Link copied to clipboard
open override fun textOptional(textOptional: Expression): SymbolLayer
open override fun textOptional(textOptional: Boolean): SymbolLayer

If true, icons will display without their corresponding text when the text collides with other symbols and the icon does not.

textPadding
Link copied to clipboard
open override fun textPadding(textPadding: Expression): SymbolLayer
open override fun textPadding(textPadding: Double): SymbolLayer

Size of the additional area around the text bounding box used for detecting symbol collisions.

textPitchAlignment
Link copied to clipboard
open override fun textPitchAlignment(textPitchAlignment: Expression): SymbolLayer
open override fun textPitchAlignment(textPitchAlignment: TextPitchAlignment): SymbolLayer

Orientation of text when map is pitched.

textRadialOffset
Link copied to clipboard
open override fun textRadialOffset(textRadialOffset: Expression): SymbolLayer
open override fun textRadialOffset(textRadialOffset: Double): SymbolLayer

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.

textRotate
Link copied to clipboard
open override fun textRotate(textRotate: Expression): SymbolLayer
open override fun textRotate(textRotate: Double): SymbolLayer

Rotates the text clockwise.

textRotationAlignment
Link copied to clipboard
open override fun textRotationAlignment(textRotationAlignment: Expression): SymbolLayer
open override fun textRotationAlignment(textRotationAlignment: TextRotationAlignment): SymbolLayer

In combination with symbol-placement, determines the rotation behavior of the individual glyphs forming the text.

textSize
Link copied to clipboard
open override fun textSize(textSize: Expression): SymbolLayer
open override fun textSize(textSize: Double): SymbolLayer

Font size.

textTransform
Link copied to clipboard
open override fun textTransform(textTransform: Expression): SymbolLayer
open override fun textTransform(textTransform: TextTransform): SymbolLayer

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

textTranslate
Link copied to clipboard
open override fun textTranslate(textTranslate: Expression): SymbolLayer
open override fun textTranslate(textTranslate: List<Double>): SymbolLayer

Distance that the text's anchor is moved from its original placement. Positive values indicate right and down, while negative values indicate left and up.

textTranslateAnchor
Link copied to clipboard
open override fun textTranslateAnchor(textTranslateAnchor: Expression): SymbolLayer
open override fun textTranslateAnchor(textTranslateAnchor: TextTranslateAnchor): SymbolLayer

Controls the frame of reference for text-translate.

textTranslateTransition
Link copied to clipboard
open override fun textTranslateTransition(options: StyleTransition): SymbolLayer

Set the TextTranslate property transition options

open override fun textTranslateTransition(block: StyleTransition.Builder.() -> Unit): SymbolLayer
textVariableAnchor
Link copied to clipboard
open override fun textVariableAnchor(textVariableAnchor: Expression): SymbolLayer
open override fun textVariableAnchor(textVariableAnchor: List<String>): SymbolLayer

To increase the chance of placing high-priority labels on the map, you can provide an array of text-anchor locations: the renderer will attempt to place the label at each location, in order, before moving onto the next label. Use text-justify: auto to choose justification based on anchor position. To apply an offset, use the text-radial-offset or the two-dimensional text-offset.

textWritingMode
Link copied to clipboard
open override fun textWritingMode(textWritingMode: Expression): SymbolLayer
open override fun textWritingMode(textWritingMode: List<String>): SymbolLayer

The property allows control over a symbol's orientation. Note that the property values act as a hint, so that a symbol whose language doesn’t support the provided orientation will be laid out in its natural orientation. Example: English point symbol will be rendered horizontally even if array value contains single 'vertical' enum value. The order of elements in an array define priority order for the placement of an orientation variant.

visibility
Link copied to clipboard
open override fun visibility(visibility: Visibility): SymbolLayer

Whether this layer is displayed.

Properties

filter
Link copied to clipboard
val filter: Expression?

A filter is a property at the layer level that determines which features should be rendered in a style layer.

iconAllowOverlap
Link copied to clipboard
val iconAllowOverlap: Boolean?

If true, the icon will be visible even if it collides with other previously drawn symbols.

iconAllowOverlapAsExpression
Link copied to clipboard
val iconAllowOverlapAsExpression: Expression?

If true, the icon will be visible even if it collides with other previously drawn symbols.

iconAnchor
Link copied to clipboard
val iconAnchor: IconAnchor?

Part of the icon placed closest to the anchor.

iconAnchorAsExpression
Link copied to clipboard
val iconAnchorAsExpression: Expression?

Part of the icon placed closest to the anchor.

iconColor
Link copied to clipboard
val iconColor: String?

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

iconColorAsColorInt
Link copied to clipboard
val iconColorAsColorInt: Int?

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

iconColorAsExpression
Link copied to clipboard
val iconColorAsExpression: Expression?

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

iconColorTransition
Link copied to clipboard
val iconColorTransition: StyleTransition?

Transition options for IconColor.

iconHaloBlur
Link copied to clipboard
val iconHaloBlur: Double?

Fade out the halo towards the outside.

iconHaloBlurAsExpression
Link copied to clipboard
val iconHaloBlurAsExpression: Expression?

Fade out the halo towards the outside.

iconHaloBlurTransition
Link copied to clipboard
val iconHaloBlurTransition: StyleTransition?

Transition options for IconHaloBlur.

iconHaloColor
Link copied to clipboard
val iconHaloColor: String?

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

iconHaloColorAsColorInt
Link copied to clipboard
val iconHaloColorAsColorInt: Int?

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

iconHaloColorAsExpression
Link copied to clipboard
val iconHaloColorAsExpression: Expression?

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

iconHaloColorTransition
Link copied to clipboard
val iconHaloColorTransition: StyleTransition?

Transition options for IconHaloColor.

iconHaloWidth
Link copied to clipboard
val iconHaloWidth: Double?

Distance of halo to the icon outline.

iconHaloWidthAsExpression
Link copied to clipboard
val iconHaloWidthAsExpression: Expression?

Distance of halo to the icon outline.

iconHaloWidthTransition
Link copied to clipboard
val iconHaloWidthTransition: StyleTransition?

Transition options for IconHaloWidth.

iconIgnorePlacement
Link copied to clipboard
val iconIgnorePlacement: Boolean?

If true, other symbols can be visible even if they collide with the icon.

iconIgnorePlacementAsExpression
Link copied to clipboard
val iconIgnorePlacementAsExpression: Expression?

If true, other symbols can be visible even if they collide with the icon.

iconImage
Link copied to clipboard
val iconImage: String?

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

iconImageAsExpression
Link copied to clipboard
val iconImageAsExpression: Expression?

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

iconKeepUpright
Link copied to clipboard
val iconKeepUpright: Boolean?

If true, the icon may be flipped to prevent it from being rendered upside-down.

iconKeepUprightAsExpression
Link copied to clipboard
val iconKeepUprightAsExpression: Expression?

If true, the icon may be flipped to prevent it from being rendered upside-down.

iconOffset
Link copied to clipboard
val iconOffset: List<Double>?

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.

iconOffsetAsExpression
Link copied to clipboard
val iconOffsetAsExpression: Expression?

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.

iconOpacity
Link copied to clipboard
val iconOpacity: Double?

The opacity at which the icon will be drawn.

iconOpacityAsExpression
Link copied to clipboard
val iconOpacityAsExpression: Expression?

The opacity at which the icon will be drawn.

iconOpacityTransition
Link copied to clipboard
val iconOpacityTransition: StyleTransition?

Transition options for IconOpacity.

iconOptional
Link copied to clipboard
val iconOptional: Boolean?

If true, text will display without their corresponding icons when the icon collides with other symbols and the text does not.

iconOptionalAsExpression
Link copied to clipboard
val iconOptionalAsExpression: Expression?

If true, text will display without their corresponding icons when the icon collides with other symbols and the text does not.

iconPadding
Link copied to clipboard
val iconPadding: Double?

Size of the additional area around the icon bounding box used for detecting symbol collisions.

iconPaddingAsExpression
Link copied to clipboard
val iconPaddingAsExpression: Expression?

Size of the additional area around the icon bounding box used for detecting symbol collisions.

iconPitchAlignment
Link copied to clipboard
val iconPitchAlignment: IconPitchAlignment?

Orientation of icon when map is pitched.

iconPitchAlignmentAsExpression
Link copied to clipboard
val iconPitchAlignmentAsExpression: Expression?

Orientation of icon when map is pitched.

iconRotate
Link copied to clipboard
val iconRotate: Double?

Rotates the icon clockwise.

iconRotateAsExpression
Link copied to clipboard
val iconRotateAsExpression: Expression?

Rotates the icon clockwise.

iconRotationAlignment
Link copied to clipboard
val iconRotationAlignment: IconRotationAlignment?

In combination with symbol-placement, determines the rotation behavior of icons.

iconRotationAlignmentAsExpression
Link copied to clipboard
val iconRotationAlignmentAsExpression: Expression?

In combination with symbol-placement, determines the rotation behavior of icons.

iconSize
Link copied to clipboard
val iconSize: Double?

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.

iconSizeAsExpression
Link copied to clipboard
val iconSizeAsExpression: Expression?

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.

iconTextFit
Link copied to clipboard
val iconTextFit: IconTextFit?

Scales the icon to fit around the associated text.

iconTextFitAsExpression
Link copied to clipboard
val iconTextFitAsExpression: Expression?

Scales the icon to fit around the associated text.

iconTextFitPadding
Link copied to clipboard
val iconTextFitPadding: List<Double>?

Size of the additional area added to dimensions determined by icon-text-fit, in clockwise order: top, right, bottom, left.

iconTextFitPaddingAsExpression
Link copied to clipboard
val iconTextFitPaddingAsExpression: Expression?

Size of the additional area added to dimensions determined by icon-text-fit, in clockwise order: top, right, bottom, left.

iconTranslate
Link copied to clipboard
val iconTranslate: List<Double>?

Distance that the icon's anchor is moved from its original placement. Positive values indicate right and down, while negative values indicate left and up.

iconTranslateAnchor
Link copied to clipboard
val iconTranslateAnchor: IconTranslateAnchor?

Controls the frame of reference for icon-translate.

iconTranslateAnchorAsExpression
Link copied to clipboard
val iconTranslateAnchorAsExpression: Expression?

Controls the frame of reference for icon-translate.

iconTranslateAsExpression
Link copied to clipboard
val iconTranslateAsExpression: Expression?

Distance that the icon's anchor is moved from its original placement. Positive values indicate right and down, while negative values indicate left and up.

iconTranslateTransition
Link copied to clipboard
val iconTranslateTransition: StyleTransition?

Transition options for IconTranslate.

layerId
Link copied to clipboard
open override val layerId: String
maxZoom
Link copied to clipboard
open override val maxZoom: Double?

The maximum zoom level for the layer. At zoom levels equal to or greater than the maxzoom, the layer will be hidden.

minZoom
Link copied to clipboard
open override val minZoom: Double?

The minimum zoom level for the layer. At zoom levels less than the minzoom, the layer will be hidden.

sourceId
Link copied to clipboard
val sourceId: String
sourceLayer
Link copied to clipboard
val sourceLayer: String?

A source layer is an individual layer of data within a vector source. A vector source can have multiple source layers.

symbolAvoidEdges
Link copied to clipboard
val symbolAvoidEdges: Boolean?

If true, the symbols will not cross tile edges to avoid mutual collisions. Recommended in layers that don't have enough padding in the vector tile to prevent collisions, or if it is a point symbol layer placed after a line symbol layer. When using a client that supports global collision detection, like Mapbox GL JS version 0.42.0 or greater, enabling this property is not needed to prevent clipped labels at tile boundaries.

symbolAvoidEdgesAsExpression
Link copied to clipboard
val symbolAvoidEdgesAsExpression: Expression?

If true, the symbols will not cross tile edges to avoid mutual collisions. Recommended in layers that don't have enough padding in the vector tile to prevent collisions, or if it is a point symbol layer placed after a line symbol layer. When using a client that supports global collision detection, like Mapbox GL JS version 0.42.0 or greater, enabling this property is not needed to prevent clipped labels at tile boundaries.

symbolPlacement
Link copied to clipboard
val symbolPlacement: SymbolPlacement?

Label placement relative to its geometry.

symbolPlacementAsExpression
Link copied to clipboard
val symbolPlacementAsExpression: Expression?

Label placement relative to its geometry.

symbolSortKey
Link copied to clipboard
val symbolSortKey: Double?

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.

symbolSortKeyAsExpression
Link copied to clipboard
val symbolSortKeyAsExpression: Expression?

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.

symbolSpacing
Link copied to clipboard
val symbolSpacing: Double?

Distance between two symbol anchors.

symbolSpacingAsExpression
Link copied to clipboard
val symbolSpacingAsExpression: Expression?

Distance between two symbol anchors.

symbolZOrder
Link copied to clipboard
val symbolZOrder: SymbolZOrder?

Determines whether overlapping symbols in the same layer are rendered in the order that they appear in the data source or by their y-position relative to the viewport. To control the order and prioritization of symbols otherwise, use symbol-sort-key.

symbolZOrderAsExpression
Link copied to clipboard
val symbolZOrderAsExpression: Expression?

Determines whether overlapping symbols in the same layer are rendered in the order that they appear in the data source or by their y-position relative to the viewport. To control the order and prioritization of symbols otherwise, use symbol-sort-key.

textAllowOverlap
Link copied to clipboard
val textAllowOverlap: Boolean?

If true, the text will be visible even if it collides with other previously drawn symbols.

textAllowOverlapAsExpression
Link copied to clipboard
val textAllowOverlapAsExpression: Expression?

If true, the text will be visible even if it collides with other previously drawn symbols.

textAnchor
Link copied to clipboard
val textAnchor: TextAnchor?

Part of the text placed closest to the anchor.

textAnchorAsExpression
Link copied to clipboard
val textAnchorAsExpression: Expression?

Part of the text placed closest to the anchor.

textColor
Link copied to clipboard
val textColor: String?

The color with which the text will be drawn.

textColorAsColorInt
Link copied to clipboard
val textColorAsColorInt: Int?

The color with which the text will be drawn.

textColorAsExpression
Link copied to clipboard
val textColorAsExpression: Expression?

The color with which the text will be drawn.

textColorTransition
Link copied to clipboard
val textColorTransition: StyleTransition?

Transition options for TextColor.

textField
Link copied to clipboard
val textField: Formatted?

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.

textFieldAsExpression
Link copied to clipboard
val textFieldAsExpression: Expression?

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.

textFieldAsString
Link copied to clipboard
val textFieldAsString: String?

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.

textFont
Link copied to clipboard
val textFont: List<String>?

Font stack to use for displaying text.

textFontAsExpression
Link copied to clipboard
val textFontAsExpression: Expression?

Font stack to use for displaying text.

textHaloBlur
Link copied to clipboard
val textHaloBlur: Double?

The halo's fadeout distance towards the outside.

textHaloBlurAsExpression
Link copied to clipboard
val textHaloBlurAsExpression: Expression?

The halo's fadeout distance towards the outside.

textHaloBlurTransition
Link copied to clipboard
val textHaloBlurTransition: StyleTransition?

Transition options for TextHaloBlur.

textHaloColor
Link copied to clipboard
val textHaloColor: String?

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

textHaloColorAsColorInt
Link copied to clipboard
val textHaloColorAsColorInt: Int?

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

textHaloColorAsExpression
Link copied to clipboard
val textHaloColorAsExpression: Expression?

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

textHaloColorTransition
Link copied to clipboard
val textHaloColorTransition: StyleTransition?

Transition options for TextHaloColor.

textHaloWidth
Link copied to clipboard
val textHaloWidth: Double?

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

textHaloWidthAsExpression
Link copied to clipboard
val textHaloWidthAsExpression: Expression?

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

textHaloWidthTransition
Link copied to clipboard
val textHaloWidthTransition: StyleTransition?

Transition options for TextHaloWidth.

textIgnorePlacement
Link copied to clipboard
val textIgnorePlacement: Boolean?

If true, other symbols can be visible even if they collide with the text.

textIgnorePlacementAsExpression
Link copied to clipboard
val textIgnorePlacementAsExpression: Expression?

If true, other symbols can be visible even if they collide with the text.

textJustify
Link copied to clipboard
val textJustify: TextJustify?

Text justification options.

textJustifyAsExpression
Link copied to clipboard
val textJustifyAsExpression: Expression?

Text justification options.

textKeepUpright
Link copied to clipboard
val textKeepUpright: Boolean?

If true, the text may be flipped vertically to prevent it from being rendered upside-down.

textKeepUprightAsExpression
Link copied to clipboard
val textKeepUprightAsExpression: Expression?

If true, the text may be flipped vertically to prevent it from being rendered upside-down.

textLetterSpacing
Link copied to clipboard
val textLetterSpacing: Double?

Text tracking amount.

textLetterSpacingAsExpression
Link copied to clipboard
val textLetterSpacingAsExpression: Expression?

Text tracking amount.

textLineHeight
Link copied to clipboard
val textLineHeight: Double?

Text leading value for multi-line text.

textLineHeightAsExpression
Link copied to clipboard
val textLineHeightAsExpression: Expression?

Text leading value for multi-line text.

textMaxAngle
Link copied to clipboard
val textMaxAngle: Double?

Maximum angle change between adjacent characters.

textMaxAngleAsExpression
Link copied to clipboard
val textMaxAngleAsExpression: Expression?

Maximum angle change between adjacent characters.

textMaxWidth
Link copied to clipboard
val textMaxWidth: Double?

The maximum line width for text wrapping.

textMaxWidthAsExpression
Link copied to clipboard
val textMaxWidthAsExpression: Expression?

The maximum line width for text wrapping.

textOffset
Link copied to clipboard
val textOffset: List<Double>?

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.

textOffsetAsExpression
Link copied to clipboard
val textOffsetAsExpression: Expression?

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.

textOpacity
Link copied to clipboard
val textOpacity: Double?

The opacity at which the text will be drawn.

textOpacityAsExpression
Link copied to clipboard
val textOpacityAsExpression: Expression?

The opacity at which the text will be drawn.

textOpacityTransition
Link copied to clipboard
val textOpacityTransition: StyleTransition?

Transition options for TextOpacity.

textOptional
Link copied to clipboard
val textOptional: Boolean?

If true, icons will display without their corresponding text when the text collides with other symbols and the icon does not.

textOptionalAsExpression
Link copied to clipboard
val textOptionalAsExpression: Expression?

If true, icons will display without their corresponding text when the text collides with other symbols and the icon does not.

textPadding
Link copied to clipboard
val textPadding: Double?

Size of the additional area around the text bounding box used for detecting symbol collisions.

textPaddingAsExpression
Link copied to clipboard
val textPaddingAsExpression: Expression?

Size of the additional area around the text bounding box used for detecting symbol collisions.

textPitchAlignment
Link copied to clipboard
val textPitchAlignment: TextPitchAlignment?

Orientation of text when map is pitched.

textPitchAlignmentAsExpression
Link copied to clipboard
val textPitchAlignmentAsExpression: Expression?

Orientation of text when map is pitched.

textRadialOffset
Link copied to clipboard
val textRadialOffset: Double?

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.

textRadialOffsetAsExpression
Link copied to clipboard
val textRadialOffsetAsExpression: Expression?

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.

textRotate
Link copied to clipboard
val textRotate: Double?

Rotates the text clockwise.

textRotateAsExpression
Link copied to clipboard
val textRotateAsExpression: Expression?

Rotates the text clockwise.

textRotationAlignment
Link copied to clipboard
val textRotationAlignment: TextRotationAlignment?

In combination with symbol-placement, determines the rotation behavior of the individual glyphs forming the text.

textRotationAlignmentAsExpression
Link copied to clipboard
val textRotationAlignmentAsExpression: Expression?

In combination with symbol-placement, determines the rotation behavior of the individual glyphs forming the text.

textSize
Link copied to clipboard
val textSize: Double?

Font size.

textSizeAsExpression
Link copied to clipboard
val textSizeAsExpression: Expression?

Font size.

textTransform
Link copied to clipboard
val textTransform: TextTransform?

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

textTransformAsExpression
Link copied to clipboard
val textTransformAsExpression: Expression?

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

textTranslate
Link copied to clipboard
val textTranslate: List<Double>?

Distance that the text's anchor is moved from its original placement. Positive values indicate right and down, while negative values indicate left and up.

textTranslateAnchor
Link copied to clipboard
val textTranslateAnchor: TextTranslateAnchor?

Controls the frame of reference for text-translate.

textTranslateAnchorAsExpression
Link copied to clipboard
val textTranslateAnchorAsExpression: Expression?

Controls the frame of reference for text-translate.

textTranslateAsExpression
Link copied to clipboard
val textTranslateAsExpression: Expression?

Distance that the text's anchor is moved from its original placement. Positive values indicate right and down, while negative values indicate left and up.

textTranslateTransition
Link copied to clipboard
val textTranslateTransition: StyleTransition?

Transition options for TextTranslate.

textVariableAnchor
Link copied to clipboard
val textVariableAnchor: List<String>?

To increase the chance of placing high-priority labels on the map, you can provide an array of text-anchor locations: the renderer will attempt to place the label at each location, in order, before moving onto the next label. Use text-justify: auto to choose justification based on anchor position. To apply an offset, use the text-radial-offset or the two-dimensional text-offset.

textVariableAnchorAsExpression
Link copied to clipboard
val textVariableAnchorAsExpression: Expression?

To increase the chance of placing high-priority labels on the map, you can provide an array of text-anchor locations: the renderer will attempt to place the label at each location, in order, before moving onto the next label. Use text-justify: auto to choose justification based on anchor position. To apply an offset, use the text-radial-offset or the two-dimensional text-offset.

textWritingMode
Link copied to clipboard
val textWritingMode: List<String>?

The property allows control over a symbol's orientation. Note that the property values act as a hint, so that a symbol whose language doesn’t support the provided orientation will be laid out in its natural orientation. Example: English point symbol will be rendered horizontally even if array value contains single 'vertical' enum value. The order of elements in an array define priority order for the placement of an orientation variant.

textWritingModeAsExpression
Link copied to clipboard
val textWritingModeAsExpression: Expression?

The property allows control over a symbol's orientation. Note that the property values act as a hint, so that a symbol whose language doesn’t support the provided orientation will be laid out in its natural orientation. Example: English point symbol will be rendered horizontally even if array value contains single 'vertical' enum value. The order of elements in an array define priority order for the placement of an orientation variant.

visibility
Link copied to clipboard
open override val visibility: Visibility?

Whether this layer is displayed.