Class ElectronicHorizonDataLoader

java.lang.Object
com.here.NativeBase
com.here.sdk.electronichorizon.ElectronicHorizonDataLoader

public final class ElectronicHorizonDataLoader extends NativeBase

Loads map data for segments that belong to the ElectronicHorizonEngine paths.

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.

Offline availability: This property is available online and offline.

  • Constructor Details

  • Method Details

    • loadData

      public void loadData(@NonNull ElectronicHorizonUpdate electronicHorizonUpdate)

      Requests data for all added segments and removes cached data for segments that are not part of the horizon anymore.

      Parameters:
      electronicHorizonUpdate -

      The update that contains the segments to add to the cache and the segments to remove from the cache.

    • getSegment

      @NonNull public ElectronicHorizonDataLoaderResult getSegment(@NonNull DirectedOCMSegmentId segmentId)

      Returns loaded data for the given segment identifier. The result contains either the loaded data or an error code.

      Parameters:
      segmentId -

      The segment identifier for which to return the loaded data from the cache.

      Returns:

      The result object that contains either the loaded segment data or an error code.

    • addElectronicHorizonDataLoaderStatusListener

      public void addElectronicHorizonDataLoaderStatusListener(@NonNull ElectronicHorizonDataLoaderStatusListener electronicHorizonListener)

      Adds an ElectronicHorizonDataLoaderStatusListener to the subscription list.

      Parameters:
      electronicHorizonListener -

      The listener that receives data loader status updates.

    • removeElectronicHorizonDataLoaderStatusListener

      public void removeElectronicHorizonDataLoaderStatusListener(@NonNull ElectronicHorizonDataLoaderStatusListener electronicHorizonListener)

      Removes an ElectronicHorizonDataLoaderStatusListener from the subscription list.

      Parameters:
      electronicHorizonListener -

      The listener that should no longer receive data loader status updates.