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

    InstantiationError Indicates what went wrong when the instantiation was attempted.

    Declaration

    Swift

    public init() throws
  • Creates a new instance of RoutingEngine.

    Throws

    InstantiationError Indicates what went wrong when the instantiation was attempted.

    Declaration

    Swift

    public init(connectionSettings: RoutingConnectionSettings) throws

    Parameters

    connectionSettings

    Settings for the route calculation.

  • Creates a new instance of RoutingEngine.

    Throws

    InstantiationError Indicates what went wrong when the instantiation was attempted.

    Declaration

    Swift

    public init(_ sdkEngine: SDKNativeEngine, connectionSettings: RoutingConnectionSettings) throws

    Parameters

    sdkEngine

    An SDKEngine instance.

    connectionSettings

    Settings for the route calculation.

  • Creates a new instance of IsolineRoutingEngine.

    Throws

    InstantiationError Indicates what went wrong when the instantiation was attempted.

    Declaration

    Swift

    public init(_ sdkEngine: SDKNativeEngine) throws

    Parameters

    sdkEngine

    An 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) -> TaskHandle

    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.

    completion

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

    Declaration

    Swift

    public func setCustomOption(name: String, value: String?) -> RoutingError?

    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 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 nil if the option has been set successfully. It’s RoutingError.INVALID_PARAMETER if the input name and/or value haven’t passed internal validation.