Layer
public protocol Layer : AnyObject
The Layer
protocol that represents map layer.
Important
This is a Public Preview API. It may be changed or removed at any time.-
Returns the ID (a human-readable name) of the layer.
Declaration
Swift
var id: String { get }
-
Returns the visibility of this layer.
Declaration
Swift
var isVisible: Bool { get set }
-
Layer source states which data the map should display.
Declaration
Swift
var source: String? { get }
-
Returns the ID (a human-readable name) of the source of data for this layer.
Declaration
Swift
var sourceLayer: String? { get }
-
Arbitrary property, used to carry extra information.
Declaration
Swift
var metadata: Metadata? { get }
-
Type of this layer. Can be one of “fill”, “line”, “symbol”, “circle”, “heatmap”, “fill-extrusion”, “raster”, “hillshade”, “background”, “sky”.
Declaration
Swift
var type: LayerType? { get }