ElectronicHorizonEngine
public class ElectronicHorizonEngine
extension ElectronicHorizonEngine: NativeBase
extension ElectronicHorizonEngine: Hashable
Provides an electronic horizon engine that continuously predicts
the road network ahead of the vehicle by using detailed map data, including road topography that is
currently out of sight.
You can subscribe to electronic horizon updates based on position updates by using ElectronicHorizonDelegate.
For more information about sub path levels, see ElectronicHorizonOptions.lookAheadDistancesInMeters.
The electronic horizon engine uses map-matched locations and can optionally use a Route
to improve the most-preferred path (MPP).
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.
-
Creates a new instance of
ElectronicHorizonEngine.Declaration
Swift
public init(sdkEngine: SDKNativeEngine, options: ElectronicHorizonOptions, transportMode: TransportMode, route: Route?) throwsParameters
sdkEngineThe
SDKNativeEngineinstance that provides shared services, such as networking and map data.optionsThe
ElectronicHorizonOptionsinstance that configures how the electronic horizon is calculated, including look-ahead distances.transportModeThe
TransportModethat is used when building the electronic horizon paths.routeThe
Routethat improves the calculation of the most-preferred path (MPP). Ifnilis passed, the most-preferred path can deviate from the route. -
Updates the electronic horizon paths based on the provided map-matched location. This method returns immediately and does not block. When internal calculation is complete, callbacks are called on the main thread. When multiple updates are triggered while processing is still running, intermediate locations are skipped and only the last location is processed.
Declaration
Swift
public func update(mapMatchedLocation: MapMatchedLocation)Parameters
mapMatchedLocationThe map-matched location that defines the current vehicle position on the road network.
-
Adds an
ElectronicHorizonDelegateto the subscription list.Declaration
Swift
public func addElectronicHorizonListener(electronicHorizonListener: ElectronicHorizonDelegate)Parameters
electronicHorizonListenerThe listener that receives electronic horizon path updates.
-
Removes an
ElectronicHorizonDelegatefrom the subscription list.Declaration
Swift
public func removeElectronicHorizonListener(electronicHorizonListener: ElectronicHorizonDelegate)Parameters
electronicHorizonListenerThe listener that should no longer receive electronic horizon path updates.