IsolineRoutingEngine (API Reference)
Class IsolineRoutingEngine
Use the IsolineRoutingEngine to calculate a reachable area from a center point. The calculation is done asynchronously and requires an online connection.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new instance of this class.IsolineRoutingEngine(SDKNativeEngine sdkEngine) Creates a new instance of IsolineRoutingEngine.IsolineRoutingEngine(SDKNativeEngine sdkEngine, RoutingConnectionSettings connectionSettings) Creates a new instance of RoutingEngine.IsolineRoutingEngine(RoutingConnectionSettings connectionSettings) Creates a new instance of RoutingEngine. -
Method Summary
Modifier and TypeMethodDescriptioncalculateIsoline(Waypoint center, IsolineOptions isolineOptions, CalculateIsolineCallback callback) Asynchronously calculates isolines to indicate the reachable area from a center point.setCustomOption(String name, String value) Sets a custom option for routing backend queries.
-
Constructor Details
-
IsolineRoutingEngine
Creates a new instance of this class.
- Throws:
InstantiationErrorException-Indicates what went wrong when the instantiation was attempted.
-
IsolineRoutingEngine
public IsolineRoutingEngine(@NonNull RoutingConnectionSettings connectionSettings) throws InstantiationErrorException Creates a new instance of RoutingEngine.
- Parameters:
connectionSettings-Settings for the route calculation.
- Throws:
InstantiationErrorException-Indicates what went wrong when the instantiation was attempted.
-
IsolineRoutingEngine
public IsolineRoutingEngine(@NonNull SDKNativeEngine sdkEngine, @NonNull RoutingConnectionSettings connectionSettings) throws InstantiationErrorException Creates a new instance of RoutingEngine.
- Parameters:
sdkEngine-An SDKEngine instance.
connectionSettings-Settings for the route calculation.
- Throws:
InstantiationErrorException-Indicates what went wrong when the instantiation was attempted.
-
IsolineRoutingEngine
Creates a new instance of IsolineRoutingEngine.
- Parameters:
sdkEngine-An SDKEngine instance.
- Throws:
InstantiationErrorException-Indicates what went wrong when the instantiation was attempted.
-
-
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
Sets a custom option for routing backend queries. The custom option is applied to all the queries that
IsolineRoutingEngineperforms. 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
nullif the option has been set successfully. It'sRoutingError.INVALID_PARAMETERif the input name and/or value haven't passed internal validation.
-