MapLayer

public class MapLayer
extension MapLayer: NativeBase
extension MapLayer: Hashable

Interface for managing a map layer. A map layer can be created by using the MapLayerBuilder. At creation, the layer gets added to a map. The layer gets removed from the map upon instance destruction.

  • Sets whether or not the layer is enabled to be drawn.

    Declaration

    Swift

    public func setEnabled(_ enable: Bool)

    Parameters

    enable

    True to enable the layer, false to disable it.

  • Sets the style to be used by the layer. For more details see Custom Layer Style Reference in the documentation.

    Note: This is a beta release of this feature and may contain bugs or exhibit unexpected behaviour. Related APIs are subject to change without a deprecation process.

    Declaration

    Swift

    public func setStyle(_ style: Style)

    Parameters

    style

    Style for the layer.

  • Sets the render priority for the layer which replaces any previously defined priorities.

    Declaration

    Swift

    public func setPriority(_ priority: MapLayerPriority)

    Parameters

    priority

    Priority for the layer.