Traffic

  • This protocol provides traffic information from radio signals to other HERE SDK modules. For now, only the OfflineRoutingEngine is supported.

    For more information, take a look at the TrafficBroadcast class, if available for your license.

    Note: This is a beta release of this feature, so there could be a few bugs and unexpected behaviors. Related APIs may change for new releases without a deprecation process.

    Declaration

    Swift

    public class TrafficDataProvider
    extension TrafficDataProvider: NativeBase
    extension TrafficDataProvider: Hashable
  • Use the TrafficEngine to get information about current traffic flow and incidents in an area specified by GeoBox, GeoCircle, or GeoCorridor. Provides optional parameters given in TrafficIncidentsQueryOptions and TrafficFlowQueryOptions to filter the result.

    By default, incidents are localized based on their geographical location. You can override that behavior by specifying the desired language that should be used for the incidents description and summary.

    The resulting traffic data contains information on incident types such as congestion, construction for road works, road hazard, road closure, weather updates for road condition, lane restriction and others.

    Traffic data is fetched online to get the most precise and freshest data available. In offline mode, live traffic data can be fetched using the traffic pass-through features. See SDKNativeEngine.passThroughFeatures

    See more

    Declaration

    Swift

    public class TrafficEngine
    extension TrafficEngine: NativeBase
    extension TrafficEngine: Hashable
  • This class provides details about traffic flow along a GeoCorridor, inside a GeoCircle or a GeoBox, that represents particular path of the road network.
    Backends for TrafficEngine and traffic vector tiles are different however backends may share the same data.
    For additional information about fields, refer to Traffic API v7 API Reference: Traffic API v7.

    Note: This is a beta release of this feature, so there could be a few bugs and unexpected behaviors. Related APIs may change for new releases without a deprecation process.

    See more

    Declaration

    Swift

    public class TrafficFlow : TrafficFlowBase
    extension TrafficFlow: NativeBase
    extension TrafficFlow: Hashable
  • This interface provides details about a traffic flow.
    For additional information about fields, refer to Traffic API v7 API Reference: Traffic API v7.

    Note: This is a beta release of this feature, so there could be a few bugs and unexpected behaviors. Related APIs may change for new releases without a deprecation process.

    See more

    Declaration

    Swift

    public protocol TrafficFlowBase : AnyObject
  • The options to specify how traffic flow data should be queried.

    See more

    Declaration

    Swift

    public struct TrafficFlowQueryOptions : Hashable
  • Callback passed to following functions: TrafficEngine.queryForFlow(GeoBox, TrafficFlowQueryOptions, TrafficFlowQueryCompletionHandler) TrafficEngine.queryForFlow(GeoCircle, TrafficFlowQueryOptions, TrafficFlowQueryCompletionHandler) TrafficEngine.queryForFlow(GeoCorridor, TrafficFlowQueryOptions, TrafficFlowQueryCompletionHandler) The method will be called on the main thread when a search call has been completed. The first argument is the error in the case of the failure. It is nil for an operation that succeeds. The second argument is the list of flow items in the case of the success. It is nil in case of an error.

    Note: This is a beta release of this feature, so there could be a few bugs and unexpected behaviors. Related APIs may change for new releases without a deprecation process.

    Declaration

    Swift

    public typealias TrafficFlowQueryCompletionHandler = (_ queryError: TrafficQueryError?, _ result: [TrafficFlow]?) -> Void

    Parameters

    queryError

    The error in the case of the failure. It is nil for an operation that succeeds.

    result

    The list of incidents in the case of the success. It is nil in case of an error.

  • TrafficIncident provides details about a traffic incident.

    See more

    Declaration

    Swift

    public class TrafficIncident : TrafficIncidentBase
    extension TrafficIncident: NativeBase
    extension TrafficIncident: Hashable
  • TrafficIncident provides details about a traffic incident.

    See more

    Declaration

    Swift

    public protocol TrafficIncidentBase : AnyObject
  • Callback passed to TrafficEngine.lookupIncident(...). The method will be called on the main thread when a search call has been completed. The first argument is the error in the case of the failure. It is nil for an operation that succeeds. The second argument is the incident in the case of the success. It is nil in case of an error.

    Declaration

    Swift

    public typealias TrafficIncidentCompletionHandler = (_ queryError: TrafficQueryError?, _ result: TrafficIncident?) -> Void

    Parameters

    queryError

    The error in the case of the failure. It is nil for an operation that succeeds.

    result

    The incident in the case of the success. It is nil in case of an error.

  • Impact of a traffic incident.

    See more

    Declaration

    Swift

    public enum TrafficIncidentImpact : UInt32, CaseIterable, Codable
  • All the options to specify how a single incident should be queried.

    See more

    Declaration

    Swift

    public struct TrafficIncidentLookupOptions : Hashable
  • Traffic incidents on a route. Use Section.trafficIncidents to get a list of incidents on a route section. Use Span.trafficIncidentIndexes to associate incidents with spans. Each incident takes at least the whole geometry of matching spans. Also, an incident can take some place out of the built route.

    See more

    Declaration

    Swift

    public class TrafficIncidentOnRoute : TrafficIncidentBase
    extension TrafficIncidentOnRoute: NativeBase
    extension TrafficIncidentOnRoute: Hashable
  • Category of a traffic incident.

    See more

    Declaration

    Swift

    public enum TrafficIncidentType : UInt32, CaseIterable, Codable
  • Callback passed to TrafficEngine.queryForIncidents(GeoCorridor, TrafficIncidentsQueryOptions, TrafficIncidentsQueryCompletionHandler). The method will be called on the main thread when a search call has been completed. The first argument is the error in the case of the failure. It is nil for an operation that succeeds. The second argument is the list of incidents in the case of the success. It is nil in case of an error.

    Declaration

    Swift

    public typealias TrafficIncidentsQueryCompletionHandler = (_ queryError: TrafficQueryError?, _ result: [TrafficIncident]?) -> Void

    Parameters

    queryError

    The error in the case of the failure. It is nil for an operation that succeeds.

    result

    The list of incidents in the case of the success. It is nil in case of an error.

  • The options to specify how incidents should be queried.

    See more

    Declaration

    Swift

    public struct TrafficIncidentsQueryOptions : Hashable
  • The location reference to the traffic incident.

    See more

    Declaration

    Swift

    public struct TrafficLocation : Hashable
  • Represents various errors that could occur from a traffic queries.

    Note: This is a beta release of this feature, so there could be a few bugs and unexpected behaviors. Related APIs may change for new releases without a deprecation process.

    See more

    Declaration

    Swift

    public enum TrafficQueryError : UInt32, CaseIterable, Codable
  • Junctions traversability of some traffic incident or flow section.

    See more

    Declaration

    Swift

    public enum Traversability : UInt32, CaseIterable, Codable