Layer

public protocol Layer : StyleDecodable, StyleEncodable, Decodable, Encodable

Undocumented

  • id

    Unique layer name

    Declaration

    Swift

    var id: String { get set }
  • Rendering type of this layer.

    Declaration

    Swift

    var type: LayerType { get }
  • Whether this layer is displayed.

    Declaration

    Swift

    var visibility: Value<Visibility> { get set }
  • The minimum zoom level for the layer. At zoom levels less than the minzoom, the layer will be hidden.

    Declaration

    Swift

    var minZoom: Double? { get set }
  • The maximum zoom level for the layer. At zoom levels equal to or greater than the maxzoom, the layer will be hidden.

    Declaration

    Swift

    var maxZoom: Double? { get set }
  • 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.

    Important

    The slot API is experimental and subject to change in future versions.

    Declaration

    Swift

    var slot: String? { get set }
  • init(jsonObject:) Extension method

    Initializes a Layer given a JSON dictionary

    Throws

    Errors occurring during decoding

    Declaration

    Swift

    public init(jsonObject: [String : Any]) throws