Class IsolineRoutingEngine

java.lang.Object
com.here.NativeBase
com.here.sdk.routing.IsolineRoutingEngine

public final class IsolineRoutingEngine extends NativeBase

Use the IsolineRoutingEngine to calculate a reachable area from a center point. The calculation is done asynchronously and requires an online connection.

  • Constructor Details

  • Method Details

    • calculateIsoline

      @NonNull public TaskHandle calculateIsoline(@NonNull Waypoint center, @NonNull IsolineOptions isolineOptions, @NonNull CalculateIsolineCallback callback)

      Asynchronously calculates isolines to indicate the reachable area from a center point. This finds all destinations that can be reached in a specific amount of time, a maximum travel distance, or even the charge level available in an electric vehicle. The result is a polygon area where each point is reachable within the provided limit.

      Parameters:
      center -

      Center point from which isolines are calculated. At minimum, the waypoint must contain the coordinates as point of origin.

      isolineOptions -

      Options for isoline calculation.

      callback -

      Callback object that will be invoked after isoline calculation. It is always invoked on the main thread.

      Returns:

      Handle that will be used to manipulate the execution of the task.

    • setCustomOption

      @Nullable public RoutingError setCustomOption(@NonNull String name, @Nullable String value)

      Sets a custom option for routing backend queries. The custom option is applied to all the queries that IsolineRoutingEngine performs. For a complete list of available parameter names and their valid values, refer to HERE Routing API v8. Note: It's easy to set a wrong option that makes queries invalid, so make sure you read and understand the backend documentation.

      Parameters:
      name -

      An option name. If the engine already has an option with the same name, the option will be overwritten. The option name must be a non-empty string. The option name should't duplicate option names that SDK creates by itself for usage in the query, otherwise the query will callback with the error RoutingError.INTERNAL_ERROR.

      value -

      An option value. If the value is null, the option will be removed. The option value must be a non-empty string.

      Returns:

      An optional error of setting the option. It's null if the option has been set successfully. It's RoutingError.INVALID_PARAMETER if the input name and/or value haven't passed internal validation.