IsolineRoutingEngine
public class IsolineRoutingEngine
extension IsolineRoutingEngine: NativeBase
extension IsolineRoutingEngine: Hashable
Use the IsolineRoutingEngine to calculate a reachable area from a center point. The calculation is done asynchronously and requires an online connection.
-
Creates a new instance of this class.
Throws
InstantiationErrorIndicates what went wrong when the instantiation was attempted.Declaration
Swift
public init() throws -
Creates a new instance of RoutingEngine.
Throws
InstantiationErrorIndicates what went wrong when the instantiation was attempted.Declaration
Swift
public init(connectionSettings: RoutingConnectionSettings) throwsParameters
connectionSettingsSettings for the route calculation.
-
Creates a new instance of RoutingEngine.
Throws
InstantiationErrorIndicates what went wrong when the instantiation was attempted.Declaration
Swift
public init(_ sdkEngine: SDKNativeEngine, connectionSettings: RoutingConnectionSettings) throwsParameters
sdkEngineAn SDKEngine instance.
connectionSettingsSettings for the route calculation.
-
Creates a new instance of IsolineRoutingEngine.
Throws
InstantiationErrorIndicates what went wrong when the instantiation was attempted.Declaration
Swift
public init(_ sdkEngine: SDKNativeEngine) throwsParameters
sdkEngineAn SDKEngine instance.
-
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.
Declaration
Swift
@discardableResult public func calculateIsoline(center: Waypoint, isolineOptions: IsolineOptions, completion: @escaping CalculateIsolineCompletionHandler) -> TaskHandleParameters
centerCenter point from which isolines are calculated. At minimum, the waypoint must contain the coordinates as point of origin.
isolineOptionsOptions for isoline calculation.
completionCallback object that will be invoked after isoline calculation. It is always invoked on the main thread.
Return Value
Handle that will be used to manipulate the execution of the task.
-
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.Declaration
Swift
public func setCustomOption(name: String, value: String?) -> RoutingError?Parameters
nameAn 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.valueAn option value. If the value is
nil, the option will be removed. The option value must be a non-empty string.Return Value
An optional error of setting the option. It’s
nilif the option has been set successfully. It’sRoutingError.INVALID_PARAMETERif the input name and/or value haven’t passed internal validation.