TrafficIncident

public class TrafficIncident : TrafficIncidentBase
extension TrafficIncident: NativeBase
extension TrafficIncident: Hashable

TrafficIncident provides details about a traffic incident.

  • The impact of the incident. The value is TrafficIncidentImpact.unknown if it hasn’t been provided by the traffic incidents supplier.

    Declaration

    Swift

    public var impact: TrafficIncidentImpact { get }
  • The category of the incident. The value is TrafficIncidentType.unknown if it hasn’t been provided by the traffic incidents supplier.

    Declaration

    Swift

    public var type: TrafficIncidentType { get }
  • The human readable description of the incident, possibly with location information. The description is currently not present in our map data. Therefore, when accessing the data from a picked carto POI via TrafficIncidentResult, then always an empty string is returned. This does not apply when using the TrafficEngine.

    Declaration

    Swift

    public var description: LocalizedText { get }
  • The time from which the incident is valid, before this time the incident should not be considered. The value is nil if it hasn’t been provided by the traffic incidents supplier.

    Declaration

    Swift

    public var startTime: Date? { get }
  • The time until which the incident is valid, after this time the incident should not be considered. The value is nil if it hasn’t been provided by the traffic incidents supplier.

    Declaration

    Swift

    public var endTime: Date? { get }
  • id

    The unique current identifier for a traffic incident.

    Declaration

    Swift

    public var id: String { get }
  • The unique identifier of the first traffic incident. The original id remains the same whenever the traffic incident is updated and TrafficIncident.id is changed. Once an incident chain has been created, this value will never change. The traffic incident an be looked up by original id using TrafficEngine.lookupIncident(...).

    Declaration

    Swift

    public var originalId: String { get }
  • The identifier of another incident to which this incident is linked. The value is nil if the incident doesn’t have a parent.

    Declaration

    Swift

    public var parentId: String? { get }
  • The traversability of junctions along the affected road.

    Declaration

    Swift

    public var junctionsTraversability: JunctionsTraversability { get }
  • The flag indicates whether road is closed or not.

    Declaration

    Swift

    public var isRoadClosed: Bool { get }
  • The list of standardized codes as categorized in ISO 14819-2:2013 standard for this incident category. Codes are given in order of importance, so the first item in the list is considered the primary cause of the incident.

    Declaration

    Swift

    public var codes: [Int32] { get }
  • The human readable summary of the incident. The summary field provides a short version of the description containing no location information. The expected summary language can be managed via TrafficIncidentsQueryOptions.languageCode and TrafficIncidentLookupOptions.languageCode.

    Declaration

    Swift

    public var summary: LocalizedText { get }
  • The time the incident was entered into the system. The value is nil if it hasn’t been provided by the traffic incidents supplier.

    Declaration

    Swift

    public var entryTime: Date? { get }
  • The location of the incident.

    Declaration

    Swift

    public var location: TrafficLocation { get }
  • The map of restricted vehicle categories to restrictions. A vehicle is restricted if at least one restriction field is applicable for it. If the map is empty, there’re no restricted vehicles for the incident.

    Declaration

    Swift

    public var vehicleRestrictions: [TrafficIncident.RestrictedVehicleCategory : TrafficIncident.VehicleRestriction] { get }
  • The vehicle categories that can be restricted. Note, a vehicle can belong to several categories (e.g. a passenger motor car belongs to TrafficIncident.RestrictedVehicleCategory.car, TrafficIncident.RestrictedVehicleCategory.motorVehicle, and TrafficIncident.RestrictedVehicleCategory.all). A vehicle is restricted if it belongs to the category presented in the map TrafficIncident.vehicleRestrictions and at least one of the vehicle properties is under the matching TrafficIncident.VehicleRestriction.

    See more

    Declaration

    Swift

    public enum RestrictedVehicleCategory : UInt32, CaseIterable, Codable
  • The vehicle restriction representing a vehicle category and relevant restriction rules.

    See more

    Declaration

    Swift

    public struct VehicleRestriction : Hashable