AreaAlongRoute
public struct AreaAlongRoute
Defines an area along a route for prefetching.
Determinates the minimum corridor length to prefetch,
ensuring it’s downloaded and available even in case of later connectivity loss.
Eg. on 200km route, we will prefetch at least the first corridorMinLength
.
Updating route current position will effectively move the ‘sliding window’.
Important
This is a Public Preview API. It may be changed or removed at any time.Declaration
Swift
public let corridorMinLength: Measurement<UnitLength>
The ‘corridor’ is defined as the sum of the areas to the left and to the right of
the central route polyline. corridorWidth
measures its total width.
(Another way to think about this is to say that the corridor consists of all places
within [corridorWidth / 2] of the central route polyline, in all directions equally.)
The default value is 0 meters, making the corridor very narrow (but still existent) which
means that no extra tiles will be downloaded on top of those through which the polyline
passes already. The larger the area, the more robust the system is to temporary
unavailability of the map data source, but at a greater memory and bandwidth cost.
Declaration
Swift
public let corridorWidth: Measurement<UnitLength>
Default value constants for AreaAlongRoute
parameters.
Declaration
Swift
public enum Defaults
Creates a new instance of AreaAlongRoute
.
Declaration
Swift
public init(
corridorWidth: Measurement<UnitLength> = Defaults.corridorWidth
)
Parameters
corridorWidth
|
The width of the corridor, defaults to |
Creates a new instance of AreaAlongRoute
.
Important
This is a Public Preview API. It may be changed or removed at any time.Declaration
Swift
public init(
corridorWidth: Measurement<UnitLength> = Defaults.corridorWidth,
corridorMinLength: Measurement<UnitLength> = Defaults.corridorMinLength
)
Parameters
corridorWidth
|
The width of the corridor, defaults to |
corridorMinLength
|
The length of the corridor, defaults to |