ElectronicHorizon
public class ElectronicHorizon
extension ElectronicHorizon: NativeBase
extension ElectronicHorizon: Hashable
Electronic horizon is responsible for providing the road network ahead of a vehicle.
Subscribe to the updates of the electronic horizon path based on the position updates using ElectronicHorizonDelegate.
Refer to ElectronicHorizonOptions.lookAheadDistancesInMeters for the configuration of sub path levels.
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
ElectronicHorizon.Throws
InstantiationErrorIndicates what went wrong when the instantiation was attempted.Declaration
Swift
public init(sdkEngine: SDKNativeEngine, options: ElectronicHorizonOptions, transportMode: TransportMode, route: Route?) throwsParameters
sdkEngineA SDKEngine instance.
optionsAn instance of
ElectronicHorizonOptionsto configureElectronicHorizon.transportModeTransport mode to be used for the
ElectronicHorizon.routeRoute to improve the calculation of Most preferred path. based on the provided
Route. Ifnilis passed - Most preferred path could deviate from the route. -
Updates the electronic horizon paths based on the input location. Update method is not blocking. Callbacks will be called in the main thread when internal calculation is done. During location processing we don’t collect new locations in queue, but keep only last one, so some locations can be skipped.
Declaration
Swift
public func update(mapMatchedLocation: MapMatchedLocation)Parameters
mapMatchedLocationMap matched location for the update of electronic horizon paths.
-
Adds the
ElectronicHorizonDelegateto the subscribtion list.Declaration
Swift
public func addElectronicHorizonListener(electronicHorizonListener: ElectronicHorizonDelegate)Parameters
electronicHorizonListenerListener to be added to the electronic horizon paths updates.
-
Removes the
ElectronicHorizonDelegatefrom the subscribtion list.Declaration
Swift
public func removeElectronicHorizonListener(electronicHorizonListener: ElectronicHorizonDelegate)Parameters
electronicHorizonListenerListener to be removed from the electronic horizon paths updates.
-
Adds the
ElectronicHorizonPositionDelegateto the subscribtion list.Declaration
Swift
public func addElectronicHorizonPositionListener(electronicHorizonPositionListener: ElectronicHorizonPositionDelegate)Parameters
electronicHorizonPositionListenerListener to be added to the electronic horizon position on electronic horizon path updates.
-
Removes the
ElectronicHorizonPositionDelegatefrom the subscribtion list.Declaration
Swift
public func removeElectronicHorizonPositionListener(electronicHorizonPositionListener: ElectronicHorizonPositionDelegate)Parameters
electronicHorizonPositionListenerListener to be removed from the electronic horizon position on electronic horizon path updates.