SymbolLayer

class SymbolLayer(val layerId: String, val 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

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

Types

Link copied to clipboard
object Companion

Static variables and methods.

Functions

Link copied to clipboard
fun bindTo(delegate: MapboxStyleManager)

Bind the layer to the Style.

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

Bind the layer to the map controller.

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.

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.

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.

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 /help/troubleshooting/using-recolorable-images-in-mapbox-maps/.

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

Controls saturation level of the symbol icon. With the default value of 1 the icon color is preserved while with a value of 0 it is fully desaturated and looks black and white.

Link copied to clipboard

Set the IconColorSaturation property transition options

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

Set the IconColor property transition options

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

Controls the intensity of light emitted on the source features.

Link copied to clipboard

Set the IconEmissiveStrength property transition options

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.

Link copied to clipboard

Set the IconHaloBlur property transition options

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 /help/troubleshooting/using-recolorable-images-in-mapbox-maps/.

Link copied to clipboard

Set the IconHaloColor property transition options

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.

Link copied to clipboard

Set the IconHaloWidth property transition options

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.

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.

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

Controls the transition progress between the image variants of icon-image. Zero means the first variant is used, one is the second, and in between they are blended together.

Link copied to clipboard

Set the IconImageCrossFade property transition options

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.

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.

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.

Link copied to clipboard

Set the IconOpacity property transition options

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.

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.

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.

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

Rotates the icon clockwise.

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.

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.

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.

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.

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.

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.

Link copied to clipboard

Set the IconTranslate property transition options

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.

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.

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

The slot this layer is assigned to. If specified, and a slot with that name exists, it will be placed at that position in the layer order.

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.

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.

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

Label placement relative to its geometry.

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.

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

Distance between two symbol anchors.

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

Position symbol on buildings (both fill extrusions and models) rooftops. In order to have minimal impact on performance, this is supported only when fill-extrusion-height is not zoom-dependent and remains unchanged. For fading in buildings when zooming in, fill-extrusion-vertical-scale should be used and symbols would raise with building rooftops. Symbols are sorted by elevation, except in cases when viewport-y sorting or symbol-sort-key are applied.

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.

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.

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.

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.

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

Set the TextColor property transition options

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

Controls the intensity of light emitted on the source features.

Link copied to clipboard

Set the TextEmissiveStrength property transition options

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. SDF images are not supported in formatted text and will be ignored.

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

DSL for construct Formatted textField.

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.

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.

Link copied to clipboard

Set the TextHaloBlur property transition options

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.

Link copied to clipboard

Set the TextHaloColor property transition options

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.

Link copied to clipboard

Set the TextHaloWidth property transition options

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.

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

Text justification options.

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.

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

Text tracking amount.

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.

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

Maximum angle change between adjacent characters.

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.

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.

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.

Link copied to clipboard

Set the TextOpacity property transition options

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.

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.

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.

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.

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

Rotates the text clockwise.

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.

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

Font size.

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.

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.

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.

Link copied to clipboard

Set the TextTranslate property transition options

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.

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. For symbol with point placement, the order of elements in an array define priority order for the placement of an orientation variant. For symbol with line placement, the default text writing mode is either 'horizontal', 'vertical' or 'vertical', 'horizontal', the order doesn't affect the placement.

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

Whether this layer is displayed.

Properties

Link copied to clipboard

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

Link copied to clipboard

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

Link copied to clipboard

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

Link copied to clipboard

Part of the icon placed closest to the anchor.

Link copied to clipboard

Part of the icon placed closest to the anchor.

Link copied to clipboard

The color of the icon. This can only be used with /help/troubleshooting/using-recolorable-images-in-mapbox-maps/.

Link copied to clipboard

The color of the icon. This can only be used with /help/troubleshooting/using-recolorable-images-in-mapbox-maps/.

Link copied to clipboard

The color of the icon. This can only be used with /help/troubleshooting/using-recolorable-images-in-mapbox-maps/.

Link copied to clipboard

Controls saturation level of the symbol icon. With the default value of 1 the icon color is preserved while with a value of 0 it is fully desaturated and looks black and white.

Link copied to clipboard

Controls saturation level of the symbol icon. With the default value of 1 the icon color is preserved while with a value of 0 it is fully desaturated and looks black and white.

Link copied to clipboard

Transition options for IconColorSaturation.

Link copied to clipboard

Transition options for IconColor.

Link copied to clipboard

Controls the intensity of light emitted on the source features.

Link copied to clipboard

Controls the intensity of light emitted on the source features.

Link copied to clipboard

Transition options for IconEmissiveStrength.

Link copied to clipboard

Fade out the halo towards the outside.

Link copied to clipboard

Fade out the halo towards the outside.

Link copied to clipboard

Transition options for IconHaloBlur.

Link copied to clipboard

The color of the icon's halo. Icon halos can only be used with /help/troubleshooting/using-recolorable-images-in-mapbox-maps/.

Link copied to clipboard

The color of the icon's halo. Icon halos can only be used with /help/troubleshooting/using-recolorable-images-in-mapbox-maps/.

Link copied to clipboard

The color of the icon's halo. Icon halos can only be used with /help/troubleshooting/using-recolorable-images-in-mapbox-maps/.

Link copied to clipboard

Transition options for IconHaloColor.

Link copied to clipboard

Distance of halo to the icon outline.

Link copied to clipboard

Distance of halo to the icon outline.

Link copied to clipboard

Transition options for IconHaloWidth.

Link copied to clipboard

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

Link copied to clipboard

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

Link copied to clipboard

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

Link copied to clipboard

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

Link copied to clipboard

Controls the transition progress between the image variants of icon-image. Zero means the first variant is used, one is the second, and in between they are blended together.

Link copied to clipboard

Controls the transition progress between the image variants of icon-image. Zero means the first variant is used, one is the second, and in between they are blended together.

Link copied to clipboard

Transition options for IconImageCrossFade.

Link copied to clipboard

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

Link copied to clipboard

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

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.

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.

Link copied to clipboard

The opacity at which the icon will be drawn.

Link copied to clipboard

The opacity at which the icon will be drawn.

Link copied to clipboard

Transition options for IconOpacity.

Link copied to clipboard

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

Link copied to clipboard

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

Link copied to clipboard

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

Link copied to clipboard

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

Link copied to clipboard

Orientation of icon when map is pitched.

Link copied to clipboard

Orientation of icon when map is pitched.

Link copied to clipboard

Rotates the icon clockwise.

Link copied to clipboard

Rotates the icon clockwise.

Link copied to clipboard

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

Link copied to clipboard

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

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.

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.

Link copied to clipboard

Scales the icon to fit around the associated text.

Link copied to clipboard

Scales the icon to fit around the associated text.

Link copied to clipboard

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

Link copied to clipboard

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

Link copied to clipboard

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.

Link copied to clipboard

Controls the frame of reference for icon-translate.

Link copied to clipboard

Controls the frame of reference for icon-translate.

Link copied to clipboard

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.

Link copied to clipboard

Transition options for IconTranslate.

Link copied to clipboard
open override val layerId: String
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.

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.

Link copied to clipboard
open override val slot: String?

The slot this layer is assigned to. If specified, and a slot with that name exists, it will be placed at that position in the layer order.

Link copied to clipboard
Link copied to clipboard

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

Link copied to clipboard

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.

Link copied to clipboard

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.

Link copied to clipboard

Label placement relative to its geometry.

Link copied to clipboard

Label placement relative to its geometry.

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.

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.

Link copied to clipboard

Distance between two symbol anchors.

Link copied to clipboard

Distance between two symbol anchors.

Link copied to clipboard

Position symbol on buildings (both fill extrusions and models) rooftops. In order to have minimal impact on performance, this is supported only when fill-extrusion-height is not zoom-dependent and remains unchanged. For fading in buildings when zooming in, fill-extrusion-vertical-scale should be used and symbols would raise with building rooftops. Symbols are sorted by elevation, except in cases when viewport-y sorting or symbol-sort-key are applied.

Link copied to clipboard

Position symbol on buildings (both fill extrusions and models) rooftops. In order to have minimal impact on performance, this is supported only when fill-extrusion-height is not zoom-dependent and remains unchanged. For fading in buildings when zooming in, fill-extrusion-vertical-scale should be used and symbols would raise with building rooftops. Symbols are sorted by elevation, except in cases when viewport-y sorting or symbol-sort-key are applied.

Link copied to clipboard

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.

Link copied to clipboard

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.

Link copied to clipboard

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

Link copied to clipboard

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

Link copied to clipboard

Part of the text placed closest to the anchor.

Link copied to clipboard

Part of the text placed closest to the anchor.

Link copied to clipboard

The color with which the text will be drawn.

Link copied to clipboard

The color with which the text will be drawn.

Link copied to clipboard

The color with which the text will be drawn.

Link copied to clipboard

Transition options for TextColor.

Link copied to clipboard

Controls the intensity of light emitted on the source features.

Link copied to clipboard

Controls the intensity of light emitted on the source features.

Link copied to clipboard

Transition options for TextEmissiveStrength.

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. SDF images are not supported in formatted text and will be ignored.

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. SDF images are not supported in formatted text and will be ignored.

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. SDF images are not supported in formatted text and will be ignored.

Link copied to clipboard

Font stack to use for displaying text.

Link copied to clipboard

Font stack to use for displaying text.

Link copied to clipboard

The halo's fadeout distance towards the outside.

Link copied to clipboard

The halo's fadeout distance towards the outside.

Link copied to clipboard

Transition options for TextHaloBlur.

Link copied to clipboard

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

Link copied to clipboard

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

Link copied to clipboard

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

Link copied to clipboard

Transition options for TextHaloColor.

Link copied to clipboard

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

Link copied to clipboard

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

Link copied to clipboard

Transition options for TextHaloWidth.

Link copied to clipboard

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

Link copied to clipboard

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

Link copied to clipboard

Text justification options.

Link copied to clipboard

Text justification options.

Link copied to clipboard

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

Link copied to clipboard

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

Link copied to clipboard

Text tracking amount.

Link copied to clipboard

Text tracking amount.

Link copied to clipboard

Text leading value for multi-line text.

Link copied to clipboard

Text leading value for multi-line text.

Link copied to clipboard

Maximum angle change between adjacent characters.

Link copied to clipboard

Maximum angle change between adjacent characters.

Link copied to clipboard

The maximum line width for text wrapping.

Link copied to clipboard

The maximum line width for text wrapping.

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.

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.

Link copied to clipboard

The opacity at which the text will be drawn.

Link copied to clipboard

The opacity at which the text will be drawn.

Link copied to clipboard

Transition options for TextOpacity.

Link copied to clipboard

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

Link copied to clipboard

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

Link copied to clipboard

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

Link copied to clipboard

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

Link copied to clipboard

Orientation of text when map is pitched.

Link copied to clipboard

Orientation of text when map is pitched.

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.

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.

Link copied to clipboard

Rotates the text clockwise.

Link copied to clipboard

Rotates the text clockwise.

Link copied to clipboard

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

Link copied to clipboard

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

Link copied to clipboard

Font size.

Link copied to clipboard
Link copied to clipboard

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

Link copied to clipboard

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

Link copied to clipboard

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.

Link copied to clipboard

Controls the frame of reference for text-translate.

Link copied to clipboard

Controls the frame of reference for text-translate.

Link copied to clipboard

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.

Link copied to clipboard

Transition options for TextTranslate.

Link copied to clipboard

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.

Link copied to clipboard

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.

Link copied to clipboard

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. For symbol with point placement, the order of elements in an array define priority order for the placement of an orientation variant. For symbol with line placement, the default text writing mode is either 'horizontal', 'vertical' or 'vertical', 'horizontal', the order doesn't affect the placement.

Link copied to clipboard

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. For symbol with point placement, the order of elements in an array define priority order for the placement of an orientation variant. For symbol with line placement, the default text writing mode is either 'horizontal', 'vertical' or 'vertical', 'horizontal', the order doesn't affect the placement.

Link copied to clipboard
open override val visibility: Visibility?

Whether this layer is displayed.

Link copied to clipboard

Whether this layer is displayed.

Extensions

Link copied to clipboard

Get the persistent property as Boolean.