Symbol
public struct Symbol : Encodable
Undocumented
-
Sets the symbol icon image (mapbox.layer.layout.icon-image).
Full list: https://www.mapbox.com/maki-icons/
Declaration
Swift
public var icon: String? -
Sets the symbol icon size (mapbox.layer.layout.icon-size).
Has an effect only when
typeis set to symbol.Declaration
Swift
public var iconSize: Double? -
Sets the symbol text (mapbox.layer.layout.text-field).
Declaration
Swift
public var text: String? -
Sets the symbol and/or text placement (mapbox.layer.layout.symbol-placement).
If
See moreplacementis point, the label is placed where the geometry is located Ifplacementis line, the label is placed along the line of the geometry Ifplacementis line-center, the label is placed on the center of the geometryDeclaration
Swift
public enum Placement : String, Encodable -
Sets the symbol and/or text placement (mapbox.layer.layout.symbol-placement).
If
placementis point, the label is placed where the geometry is located Ifplacementis line, the label is placed along the line of the geometry Ifplacementis line-center, the label is placed on the center of the geometryDeclaration
Swift
public var placement: Placement? -
Sets the positions of the
textelements with respects to the (x,y) coordinates.Declaration
Swift
public var textPosition: TextPosition? -
Creates
Symbolobject with specified properties.Declaration
Swift
public init(icon: String? = nil, iconSize: Double? = nil, text: String? = nil, placement: Placement? = nil, textFont: Font? = nil, textPosition: TextPosition? = nil)Parameters
iconSets the symbol icon image (mapbox.layer.layout.icon-image).
iconSizeSets the symbol icon size (mapbox.layer.layout.icon-size).
textSets the symbol text (mapbox.layer.layout.text-field).
placementSets the symbol and/or text placement (mapbox.layer.layout.symbol-placement).
textFontSets the icon text font (color=mapbox.layer.paint.text-color, size=mapbox.layer.layout.text-size).
textPositionSets the positions of the
textelements with respects to the (x,y) coordinates.
View on GitHub
Install in Dash
Symbol Structure Reference