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 type is 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 placement is point, the label is placed where the geometry is located If placement is line, the label is placed along the line of the geometry If placement is line-center, the label is placed on the center of the geometry

    See more

    Declaration

    Swift

    public enum Placement : String, Encodable
  • Sets the symbol and/or text placement (mapbox.layer.layout.symbol-placement).

    If placement is point, the label is placed where the geometry is located If placement is line, the label is placed along the line of the geometry If placement is line-center, the label is placed on the center of the geometry

    Declaration

    Swift

    public var placement: Placement?
  • Sets the icon text font (color=mapbox.layer.paint.text-color, size=mapbox.layer.layout.text-size).

    Has an effect only when type is set to symbol.

    Declaration

    Swift

    public var textFont: Font?
  • Sets the positions of the text elements with respects to the (x,y) coordinates.

    Declaration

    Swift

    public var textPosition: TextPosition?
  • Creates Symbol object 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

    icon

    Sets the symbol icon image (mapbox.layer.layout.icon-image).

    iconSize

    Sets the symbol icon size (mapbox.layer.layout.icon-size).

    text

    Sets the symbol text (mapbox.layer.layout.text-field).

    placement

    Sets the symbol and/or text placement (mapbox.layer.layout.symbol-placement).

    textFont

    Sets the icon text font (color=mapbox.layer.paint.text-color, size=mapbox.layer.layout.text-size).

    textPosition

    Sets the positions of the text elements with respects to the (x,y) coordinates.