Traffic
-
This protocol provides traffic information from radio signals to other HERE SDK modules. For now, only the
OfflineRoutingEngineis supported.For more information, take a look at the
TrafficBroadcastclass, 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 TrafficDataProviderextension TrafficDataProvider: NativeBaseextension TrafficDataProvider: Hashable -
Use the TrafficEngine to get information about current traffic flow and incidents in an area specified by
GeoBox,GeoCircle, orGeoCorridor. Provides optional parameters given inTrafficIncidentsQueryOptionsandTrafficFlowQueryOptionsto 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
See moreSDKNativeEngine.passThroughFeaturesDeclaration
Swift
public class TrafficEngineextension TrafficEngine: NativeBaseextension TrafficEngine: Hashable -
This class provides details about traffic flow along a
GeoCorridor, inside aGeoCircleor aGeoBox, 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 moreDeclaration
Swift
public class TrafficFlow : TrafficFlowBaseextension TrafficFlow: NativeBaseextension 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 moreDeclaration
Swift
public protocol TrafficFlowBase : AnyObject -
The options to specify how traffic flow data should be queried.
See moreDeclaration
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 isnilfor an operation that succeeds. The second argument is the list of flow items in the case of the success. It isnilin 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]?) -> VoidParameters
queryErrorThe error in the case of the failure. It is
nilfor an operation that succeeds.resultThe list of incidents in the case of the success. It is
nilin case of an error. -
TrafficIncident provides details about a traffic incident.
See moreDeclaration
Swift
public class TrafficIncident : TrafficIncidentBaseextension TrafficIncident: NativeBaseextension TrafficIncident: Hashable -
TrafficIncident provides details about a traffic incident.
See moreDeclaration
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 isnilfor an operation that succeeds. The second argument is the incident in the case of the success. It isnilin case of an error.Declaration
Swift
public typealias TrafficIncidentCompletionHandler = (_ queryError: TrafficQueryError?, _ result: TrafficIncident?) -> VoidParameters
queryErrorThe error in the case of the failure. It is
nilfor an operation that succeeds.resultThe incident in the case of the success. It is
nilin case of an error. -
Impact of a traffic incident.
See moreDeclaration
Swift
public enum TrafficIncidentImpact : UInt32, CaseIterable, Codable -
All the options to specify how a single incident should be queried.
See moreDeclaration
Swift
public struct TrafficIncidentLookupOptions : Hashable -
Traffic incidents on a route. Use
See moreSection.trafficIncidentsto get a list of incidents on a route section. UseSpan.trafficIncidentIndexesto 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.Declaration
Swift
public class TrafficIncidentOnRoute : TrafficIncidentBaseextension TrafficIncidentOnRoute: NativeBaseextension TrafficIncidentOnRoute: Hashable -
Category of a traffic incident.
See moreDeclaration
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 isnilfor an operation that succeeds. The second argument is the list of incidents in the case of the success. It isnilin case of an error.Declaration
Swift
public typealias TrafficIncidentsQueryCompletionHandler = (_ queryError: TrafficQueryError?, _ result: [TrafficIncident]?) -> VoidParameters
queryErrorThe error in the case of the failure. It is
nilfor an operation that succeeds.resultThe list of incidents in the case of the success. It is
nilin case of an error. -
The options to specify how incidents should be queried.
See moreDeclaration
Swift
public struct TrafficIncidentsQueryOptions : Hashable -
The location reference to the traffic incident.
See moreDeclaration
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 moreDeclaration
Swift
public enum TrafficQueryError : UInt32, CaseIterable, Codable -
Junctions traversability of some traffic incident or flow section.
See moreDeclaration
Swift
public enum Traversability : UInt32, CaseIterable, Codable
Traffic Reference