Class ElectronicHorizonEngine

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

public final class ElectronicHorizonEngine extends NativeBase

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 ElectronicHorizonListener. 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.

  • Constructor Details

  • Method Details

    • update

      public void update(@NonNull MapMatchedLocation mapMatchedLocation)

      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.

      Parameters:
      mapMatchedLocation -

      The map-matched location that defines the current vehicle position on the road network.

    • addElectronicHorizonListener

      public void addElectronicHorizonListener(@NonNull ElectronicHorizonListener electronicHorizonListener)

      Adds an ElectronicHorizonListener to the subscription list.

      Parameters:
      electronicHorizonListener -

      The listener that receives electronic horizon path updates.

    • removeElectronicHorizonListener

      public void removeElectronicHorizonListener(@NonNull ElectronicHorizonListener electronicHorizonListener)

      Removes an ElectronicHorizonListener from the subscription list.

      Parameters:
      electronicHorizonListener -

      The listener that should no longer receive electronic horizon path updates.

    • getRoute

      @Nullable public Route getRoute()

      Gets the instance of Route or null if Route is not set.

      You can override this property to rebuild the electronic horizon based on a different route.

      Returns:

      The instance of Route that is being used by ElectronicHorizonEngine.

    • setRoute

      public void setRoute(@Nullable Route value)

      Sets the instance of Route to be used by ElectronicHorizonEngine or null if no route should be used.

      You can override this property to rebuild the electronic horizon based on a different route.

      Parameters:
      value -

      The instance of Route that is being used by ElectronicHorizonEngine.