MapView

extension MapView

An extension on MapView that allows for toggling traffic on a map style that contains a Mapbox Traffic source.

  • A Boolean value indicating whether traffic congestion lines are visible in the map view’s style.

    Declaration

    Swift

    public var showsTraffic: Bool { get set }
  • A Boolean value indicating whether incidents, such as road closures and detours, are visible in the map view’s style.

    Declaration

    Swift

    public var showsIncidents: Bool { get set }