ElectronicHorizonDataLoader
public class ElectronicHorizonDataLoader
extension ElectronicHorizonDataLoader: NativeBase
extension ElectronicHorizonDataLoader: Hashable
Loads map data for segments that belong to the ElectronicHorizonEngine paths.
Note: This is a beta release of this feature and may contain bugs or exhibit unexpected behaviour. Related APIs are subject to change without a deprecation process.
Offline availability: This property is available online and offline.
-
Creates a new instance of
ElectronicHorizonDataLoader. The constructor accepts options to configure segment-data requests, caching, and corridor loading.Declaration
Swift
public init(_ sdkEngine: SDKNativeEngine, options: ElectronicHorizonDataLoaderOptions) throwsParameters
sdkEngineThe
SDKNativeEngineinstance that provides shared services, such as networking and map data.optionsThe
ElectronicHorizonDataLoaderOptionsinstance that configures the loader. -
Requests data for all added segments and removes cached data for segments that are not part of the horizon anymore.
Declaration
Swift
public func loadData(electronicHorizonUpdate: ElectronicHorizonUpdate)Parameters
electronicHorizonUpdateThe update that contains the segments to add to the cache and the segments to remove from the cache.
-
Returns loaded data for the given segment identifier. The result contains either the loaded data or an error code.
Declaration
Swift
@available(*, deprecated, message: "Will be removed in v4.30.0. Use `get_local_segment(﹚` instead.") public func getSegment(segmentId: DirectedOCMSegmentId) -> ElectronicHorizonDataLoaderResultParameters
segmentIdThe segment identifier for which to return the loaded data from the cache.
Return Value
The result object that contains either the loaded segment data or an error code.
-
Returns loaded data for the given local segment identifier. The result contains either the loaded data or an error code.
Declaration
Swift
public func getLocalSegment(segmentId: DirectedLocalSegmentId) -> ElectronicHorizonDataLoaderResultParameters
segmentIdThe local segment identifier for which to return the loaded data from the cache.
Return Value
The result object that contains either the loaded segment data or an error code.
-
Adds an
ElectronicHorizonDataLoaderStatusDelegateto the subscription list.Declaration
Swift
public func addElectronicHorizonDataLoaderStatusDelegate(_ electronicHorizonListener: ElectronicHorizonDataLoaderStatusDelegate)Parameters
electronicHorizonListenerThe listener that receives data loader status updates.
-
Removes an
ElectronicHorizonDataLoaderStatusDelegatefrom the subscription list.Declaration
Swift
public func removeElectronicHorizonDataLoaderStatusDelegate(_ electronicHorizonListener: ElectronicHorizonDataLoaderStatusDelegate)Parameters
electronicHorizonListenerThe listener that should no longer receive data loader status updates.