Other Enumerations

The following enumerations are available globally.

  • A CongestionLevel indicates the level of traffic congestion along a road segment relative to the normal flow of traffic along that segment. You can color-code a route line according to the congestion level along each segment of the route.

    See more

    Declaration

    Swift

    public enum CongestionLevel : String, Codable, CaseIterable
  • An error that occurs when calculating directions.

    See more

    Declaration

    Swift

    public enum DirectionsError : LocalizedError
    extension DirectionsError: Equatable
  • An error that occurs when encoding or decoding a type defined by the MapboxDirections framework.

    See more

    Declaration

    Swift

    public enum DirectionsCodingError : Error
  • A RouteShapeFormat indicates the format of a route or match shape in the raw HTTP response.

    See more

    Declaration

    Swift

    public enum RouteShapeFormat : String, Codable
  • A RouteShapeResolution indicates the level of detail in a route’s shape, or whether the shape is present at all.

    See more

    Declaration

    Swift

    public enum RouteShapeResolution : String, Codable
  • A system of units of measuring distances and other quantities.

    See more

    Declaration

    Swift

    public enum MeasurementSystem : String, Codable
  • A DrivingSide indicates which side of the road cars and traffic flow.

    See more

    Declaration

    Swift

    public enum DrivingSide : String, Codable
  • A Weight enum represents the weight given to a specific Match by the Directions API. The default metric is a compound index called “routability”, which is duration-based with additional penalties for less desirable maneuvers.

    Declaration

    Swift

    public enum Weight : Equatable
  • A road classification according to the Mapbox Streets source , version 8.

    See more

    Declaration

    Swift

    public enum MapboxStreetsRoadClass : String, Codable
  • A TransportType specifies the mode of transportation used for part of a route.

    See more

    Declaration

    Swift

    public enum TransportType : String, Codable
  • A ManeuverType specifies the type of maneuver required to complete the route step. You can pair a maneuver type with a ManeuverDirection to choose an appropriate visual or voice prompt to present the user.

    To avoid a complex series of if-else-if statements or switch statements, use pattern matching with a single switch statement on a tuple that consists of the maneuver type and maneuver direction.

    See more

    Declaration

    Swift

    public enum ManeuverType : String, Codable
  • A ManeuverDirection clarifies a ManeuverType with directional information. The exact meaning of the maneuver direction for a given step depends on the step’s maneuver type; see the ManeuverType documentation for details.

    See more

    Declaration

    Swift

    public enum ManeuverDirection : String, Codable
  • A road sign design standard.

    A sign standard can affect how a user interface should display information related to the road. For example, a speed limit from the RouteLeg.segmentMaximumSpeedLimits property may appear in a different-looking view depending on the RouteStep.speedLimitSign property.

    See more

    Declaration

    Swift

    public enum SignStandard : String, Codable