SymbolLayerDsl

interface SymbolLayerDsl

This Interface contains all the functions that will be exposed to Koltin DSL.

Separated the DSL receiver class to this interface to avoid IDE code suggestion for property getters.

Functions

filter
Link copied to clipboard
abstract 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
abstract fun iconAllowOverlap(iconAllowOverlap: Expression): SymbolLayer
abstract fun iconAllowOverlap(iconAllowOverlap: Boolean = false): SymbolLayer

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

iconAnchor
Link copied to clipboard
abstract fun iconAnchor(iconAnchor: Expression): SymbolLayer
abstract fun iconAnchor(iconAnchor: IconAnchor = IconAnchor.CENTER): SymbolLayer

Part of the icon placed closest to the anchor.

iconColor
Link copied to clipboard
abstract fun iconColor(iconColor: Expression): SymbolLayer
abstract fun iconColor(@ColorInt iconColor: Int): SymbolLayer
abstract fun iconColor(iconColor: String = "#000000"): SymbolLayer

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

iconColorTransition
Link copied to clipboard
abstract fun iconColorTransition(options: StyleTransition): SymbolLayer
abstract fun iconColorTransition(block: StyleTransition.Builder.() -> Unit): SymbolLayer

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

iconHaloBlur
Link copied to clipboard
abstract fun iconHaloBlur(iconHaloBlur: Expression): SymbolLayer
abstract fun iconHaloBlur(iconHaloBlur: Double = 0.0): SymbolLayer

Fade out the halo towards the outside.

iconHaloBlurTransition
Link copied to clipboard
abstract fun iconHaloBlurTransition(options: StyleTransition): SymbolLayer
abstract fun iconHaloBlurTransition(block: StyleTransition.Builder.() -> Unit): SymbolLayer

Fade out the halo towards the outside.

iconHaloColor
Link copied to clipboard
abstract fun iconHaloColor(iconHaloColor: Expression): SymbolLayer
abstract fun iconHaloColor(@ColorInt iconHaloColor: Int): SymbolLayer
abstract fun iconHaloColor(iconHaloColor: String = "rgba(0, 0, 0, 0)"): SymbolLayer

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

iconHaloColorTransition
Link copied to clipboard
abstract fun iconHaloColorTransition(options: StyleTransition): SymbolLayer
abstract fun iconHaloColorTransition(block: StyleTransition.Builder.() -> Unit): SymbolLayer

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

iconHaloWidth
Link copied to clipboard
abstract fun iconHaloWidth(iconHaloWidth: Expression): SymbolLayer
abstract fun iconHaloWidth(iconHaloWidth: Double = 0.0): SymbolLayer

Distance of halo to the icon outline.

iconHaloWidthTransition
Link copied to clipboard
abstract fun iconHaloWidthTransition(options: StyleTransition): SymbolLayer
abstract fun iconHaloWidthTransition(block: StyleTransition.Builder.() -> Unit): SymbolLayer

Distance of halo to the icon outline.

iconIgnorePlacement
Link copied to clipboard
abstract fun iconIgnorePlacement(iconIgnorePlacement: Expression): SymbolLayer
abstract fun iconIgnorePlacement(iconIgnorePlacement: Boolean = false): SymbolLayer

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

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

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

iconKeepUpright
Link copied to clipboard
abstract fun iconKeepUpright(iconKeepUpright: Expression): SymbolLayer
abstract fun iconKeepUpright(iconKeepUpright: Boolean = false): SymbolLayer

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

iconOffset
Link copied to clipboard
abstract fun iconOffset(iconOffset: Expression): SymbolLayer
abstract fun iconOffset(iconOffset: List<Double> = listOf(0.0, 0.0)): 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
abstract fun iconOpacity(iconOpacity: Expression): SymbolLayer
abstract fun iconOpacity(iconOpacity: Double = 1.0): SymbolLayer

The opacity at which the icon will be drawn.

iconOpacityTransition
Link copied to clipboard
abstract fun iconOpacityTransition(options: StyleTransition): SymbolLayer
abstract fun iconOpacityTransition(block: StyleTransition.Builder.() -> Unit): SymbolLayer

The opacity at which the icon will be drawn.

iconOptional
Link copied to clipboard
abstract fun iconOptional(iconOptional: Expression): SymbolLayer
abstract fun iconOptional(iconOptional: Boolean = false): 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
abstract fun iconPadding(iconPadding: Expression): SymbolLayer
abstract fun iconPadding(iconPadding: Double = 2.0): SymbolLayer

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

iconPitchAlignment
Link copied to clipboard
abstract fun iconPitchAlignment(iconPitchAlignment: Expression): SymbolLayer
abstract fun iconPitchAlignment(iconPitchAlignment: IconPitchAlignment = IconPitchAlignment.AUTO): SymbolLayer

Orientation of icon when map is pitched.

iconRotate
Link copied to clipboard
abstract fun iconRotate(iconRotate: Expression): SymbolLayer
abstract fun iconRotate(iconRotate: Double = 0.0): SymbolLayer

Rotates the icon clockwise.

iconRotationAlignment
Link copied to clipboard
abstract fun iconRotationAlignment(iconRotationAlignment: Expression): SymbolLayer
abstract fun iconRotationAlignment(iconRotationAlignment: IconRotationAlignment = IconRotationAlignment.AUTO): SymbolLayer

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

iconSize
Link copied to clipboard
abstract fun iconSize(iconSize: Expression): SymbolLayer
abstract fun iconSize(iconSize: Double = 1.0): 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
abstract fun iconTextFit(iconTextFit: Expression): SymbolLayer
abstract fun iconTextFit(iconTextFit: IconTextFit = IconTextFit.NONE): SymbolLayer

Scales the icon to fit around the associated text.

iconTextFitPadding
Link copied to clipboard
abstract fun iconTextFitPadding(iconTextFitPadding: Expression): SymbolLayer
abstract fun iconTextFitPadding(iconTextFitPadding: List<Double> = listOf(0.0, 0.0, 0.0, 0.0)): 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
abstract fun iconTranslate(iconTranslate: Expression): SymbolLayer
abstract fun iconTranslate(iconTranslate: List<Double> = listOf(0.0, 0.0)): 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
abstract fun iconTranslateAnchor(iconTranslateAnchor: Expression): SymbolLayer
abstract fun iconTranslateAnchor(iconTranslateAnchor: IconTranslateAnchor = IconTranslateAnchor.MAP): SymbolLayer

Controls the frame of reference for icon-translate.

iconTranslateTransition
Link copied to clipboard
abstract fun iconTranslateTransition(options: StyleTransition): SymbolLayer
abstract fun iconTranslateTransition(block: StyleTransition.Builder.() -> Unit): 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.

maxZoom
Link copied to clipboard
abstract 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
abstract 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
abstract 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
abstract fun symbolAvoidEdges(symbolAvoidEdges: Expression): SymbolLayer
abstract fun symbolAvoidEdges(symbolAvoidEdges: Boolean = false): 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
abstract fun symbolPlacement(symbolPlacement: Expression): SymbolLayer
abstract fun symbolPlacement(symbolPlacement: SymbolPlacement = SymbolPlacement.POINT): SymbolLayer

Label placement relative to its geometry.

symbolSortKey
Link copied to clipboard
abstract fun symbolSortKey(symbolSortKey: Expression): SymbolLayer
abstract 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
abstract fun symbolSpacing(symbolSpacing: Expression): SymbolLayer
abstract fun symbolSpacing(symbolSpacing: Double = 250.0): SymbolLayer

Distance between two symbol anchors.

symbolZOrder
Link copied to clipboard
abstract fun symbolZOrder(symbolZOrder: Expression): SymbolLayer
abstract fun symbolZOrder(symbolZOrder: SymbolZOrder = SymbolZOrder.AUTO): 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
abstract fun textAllowOverlap(textAllowOverlap: Expression): SymbolLayer
abstract fun textAllowOverlap(textAllowOverlap: Boolean = false): SymbolLayer

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

textAnchor
Link copied to clipboard
abstract fun textAnchor(textAnchor: Expression): SymbolLayer
abstract fun textAnchor(textAnchor: TextAnchor = TextAnchor.CENTER): SymbolLayer

Part of the text placed closest to the anchor.

textColor
Link copied to clipboard
abstract fun textColor(textColor: Expression): SymbolLayer
abstract fun textColor(@ColorInt textColor: Int): SymbolLayer
abstract fun textColor(textColor: String = "#000000"): SymbolLayer

The color with which the text will be drawn.

textColorTransition
Link copied to clipboard
abstract fun textColorTransition(options: StyleTransition): SymbolLayer
abstract fun textColorTransition(block: StyleTransition.Builder.() -> Unit): SymbolLayer

The color with which the text will be drawn.

textField
Link copied to clipboard
abstract fun textField(textField: Expression): SymbolLayer
abstract fun textField(textField: Formatted): SymbolLayer
abstract fun textField(block: Formatted.() -> Unit): SymbolLayer
abstract 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.

textFont
Link copied to clipboard
abstract fun textFont(textFont: Expression): SymbolLayer
abstract fun textFont(textFont: List<String> = listOf("Open Sans Regular", "Arial Unicode MS Regular")): SymbolLayer

Font stack to use for displaying text.

textHaloBlur
Link copied to clipboard
abstract fun textHaloBlur(textHaloBlur: Expression): SymbolLayer
abstract fun textHaloBlur(textHaloBlur: Double = 0.0): SymbolLayer

The halo's fadeout distance towards the outside.

textHaloBlurTransition
Link copied to clipboard
abstract fun textHaloBlurTransition(options: StyleTransition): SymbolLayer
abstract fun textHaloBlurTransition(block: StyleTransition.Builder.() -> Unit): SymbolLayer

The halo's fadeout distance towards the outside.

textHaloColor
Link copied to clipboard
abstract fun textHaloColor(textHaloColor: Expression): SymbolLayer
abstract fun textHaloColor(@ColorInt textHaloColor: Int): SymbolLayer
abstract fun textHaloColor(textHaloColor: String = "rgba(0, 0, 0, 0)"): SymbolLayer

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

textHaloColorTransition
Link copied to clipboard
abstract fun textHaloColorTransition(options: StyleTransition): SymbolLayer
abstract fun textHaloColorTransition(block: StyleTransition.Builder.() -> Unit): SymbolLayer

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

textHaloWidth
Link copied to clipboard
abstract fun textHaloWidth(textHaloWidth: Expression): SymbolLayer
abstract fun textHaloWidth(textHaloWidth: Double = 0.0): SymbolLayer

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

textHaloWidthTransition
Link copied to clipboard
abstract fun textHaloWidthTransition(options: StyleTransition): SymbolLayer
abstract fun textHaloWidthTransition(block: StyleTransition.Builder.() -> Unit): SymbolLayer

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

textIgnorePlacement
Link copied to clipboard
abstract fun textIgnorePlacement(textIgnorePlacement: Expression): SymbolLayer
abstract fun textIgnorePlacement(textIgnorePlacement: Boolean = false): SymbolLayer

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

textJustify
Link copied to clipboard
abstract fun textJustify(textJustify: Expression): SymbolLayer
abstract fun textJustify(textJustify: TextJustify = TextJustify.CENTER): SymbolLayer

Text justification options.

textKeepUpright
Link copied to clipboard
abstract fun textKeepUpright(textKeepUpright: Expression): SymbolLayer
abstract fun textKeepUpright(textKeepUpright: Boolean = true): SymbolLayer

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

textLetterSpacing
Link copied to clipboard
abstract fun textLetterSpacing(textLetterSpacing: Expression): SymbolLayer
abstract fun textLetterSpacing(textLetterSpacing: Double = 0.0): SymbolLayer

Text tracking amount.

textLineHeight
Link copied to clipboard
abstract fun textLineHeight(textLineHeight: Expression): SymbolLayer
abstract fun textLineHeight(textLineHeight: Double = 1.2): SymbolLayer

Text leading value for multi-line text.

textMaxAngle
Link copied to clipboard
abstract fun textMaxAngle(textMaxAngle: Expression): SymbolLayer
abstract fun textMaxAngle(textMaxAngle: Double = 45.0): SymbolLayer

Maximum angle change between adjacent characters.

textMaxWidth
Link copied to clipboard
abstract fun textMaxWidth(textMaxWidth: Expression): SymbolLayer
abstract fun textMaxWidth(textMaxWidth: Double = 10.0): SymbolLayer

The maximum line width for text wrapping.

textOffset
Link copied to clipboard
abstract fun textOffset(textOffset: Expression): SymbolLayer
abstract fun textOffset(textOffset: List<Double> = listOf(0.0, 0.0)): 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
abstract fun textOpacity(textOpacity: Expression): SymbolLayer
abstract fun textOpacity(textOpacity: Double = 1.0): SymbolLayer

The opacity at which the text will be drawn.

textOpacityTransition
Link copied to clipboard
abstract fun textOpacityTransition(options: StyleTransition): SymbolLayer
abstract fun textOpacityTransition(block: StyleTransition.Builder.() -> Unit): SymbolLayer

The opacity at which the text will be drawn.

textOptional
Link copied to clipboard
abstract fun textOptional(textOptional: Expression): SymbolLayer
abstract fun textOptional(textOptional: Boolean = false): 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
abstract fun textPadding(textPadding: Expression): SymbolLayer
abstract fun textPadding(textPadding: Double = 2.0): SymbolLayer

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

textPitchAlignment
Link copied to clipboard
abstract fun textPitchAlignment(textPitchAlignment: Expression): SymbolLayer
abstract fun textPitchAlignment(textPitchAlignment: TextPitchAlignment = TextPitchAlignment.AUTO): SymbolLayer

Orientation of text when map is pitched.

textRadialOffset
Link copied to clipboard
abstract fun textRadialOffset(textRadialOffset: Expression): SymbolLayer
abstract fun textRadialOffset(textRadialOffset: Double = 0.0): 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
abstract fun textRotate(textRotate: Expression): SymbolLayer
abstract fun textRotate(textRotate: Double = 0.0): SymbolLayer

Rotates the text clockwise.

textRotationAlignment
Link copied to clipboard
abstract fun textRotationAlignment(textRotationAlignment: Expression): SymbolLayer
abstract fun textRotationAlignment(textRotationAlignment: TextRotationAlignment = TextRotationAlignment.AUTO): SymbolLayer

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

textSize
Link copied to clipboard
abstract fun textSize(textSize: Expression): SymbolLayer
abstract fun textSize(textSize: Double = 16.0): SymbolLayer

Font size.

textTransform
Link copied to clipboard
abstract fun textTransform(textTransform: Expression): SymbolLayer
abstract fun textTransform(textTransform: TextTransform = TextTransform.NONE): SymbolLayer

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

textTranslate
Link copied to clipboard
abstract fun textTranslate(textTranslate: Expression): SymbolLayer
abstract fun textTranslate(textTranslate: List<Double> = listOf(0.0, 0.0)): 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
abstract fun textTranslateAnchor(textTranslateAnchor: Expression): SymbolLayer
abstract fun textTranslateAnchor(textTranslateAnchor: TextTranslateAnchor = TextTranslateAnchor.MAP): SymbolLayer

Controls the frame of reference for text-translate.

textTranslateTransition
Link copied to clipboard
abstract fun textTranslateTransition(options: StyleTransition): SymbolLayer
abstract fun textTranslateTransition(block: StyleTransition.Builder.() -> Unit): 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.

textVariableAnchor
Link copied to clipboard
abstract fun textVariableAnchor(textVariableAnchor: Expression): SymbolLayer
abstract 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
abstract fun textWritingMode(textWritingMode: Expression): SymbolLayer
abstract 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.

visibility
Link copied to clipboard
abstract fun visibility(visibility: Visibility): SymbolLayer

Whether this layer is displayed.

Inheritors

SymbolLayer
Link copied to clipboard