Structures

The following structures are available globally.

  • Important

    This is a Public Preview API. It may be changed or removed at any time.
    See more

    Declaration

    Swift

    public struct DestinationArrivalStatus
  • Holds arrival status to a unique waypoint.

    Important

    This is a Public Preview API. It may be changed or removed at any time.
    See more

    Declaration

    Swift

    public struct WaypointArrivalStatus

GuidanceAnnouncement

  • Guidance announcement relating to a maneuver during navigation. The announcement text message is provided in both Speech Synthesis Markup Language (SSML) and plain-text formats.

    See more

    Declaration

    Swift

    public struct GuidanceAnnouncement : Equatable

Guidance

  • Guidance update provided while navigating a route, including the list of upcoming instructions, guidance announcement and distance to the next maneuver.

    See more

    Declaration

    Swift

    public struct Guidance

ArrivalGuidanceInstruction

BorderCrossing

  • Indicates a border crossing between two countries.

    See more

    Declaration

    Swift

    public struct BorderCrossing

BorderCrossingGuidanceInstruction

Country

  • Country information.

    See more

    Declaration

    Swift

    public struct Country : Equatable

DepartureGuidanceInstruction

EnterAutoTransportGuidanceInstruction

EnterCarpoolLaneGuidanceInstruction

ExitCarpoolLaneGuidanceInstruction

ExitHighwayGuidanceInstruction

ExitRoundaboutGuidanceInstruction

FollowGuidanceInstruction

ForkGuidanceInstruction

MandatoryTurnGuidanceInstruction

MergeGuidanceInstruction

Road

RoundaboutGuidanceInstruction

Signpost

SwitchHighwayGuidanceInstruction

TollgateGuidanceInstruction

TurnAroundWhenPossibleGuidanceInstruction

TurnGuidanceInstruction

  • Guidance Instruction indicating a turn at a road junction.

    Important

    This is a Public Preview API. It may be changed or removed at any time.
    See more

    Declaration

    Swift

    public struct TurnGuidanceInstruction : GuidanceInstruction

WaypointGuidanceInstruction

  • Guidance Instruction indicating that a waypoint on the route is reached.

    See more

    Declaration

    Swift

    public struct WaypointGuidanceInstruction : GuidanceInstruction
  • Contains information about lane guidance.

    Lanes are stored in order from curb side to middle side. That is, in left-hand driving locales such as Japan, the lanes are ordered from left to right, while in right-hand driving locales such as the USA, the lanes are ordered from right to left.

    See more

    Declaration

    Swift

    public struct LaneGuidance

LaneGuidanceUpdate

LocationContext

  • LocationContext provides information about the driver’s location, which has been matched against the road network.

    Important

    This is a Public Preview API. It may be changed or removed at any time.
    See more

    Declaration

    Swift

    public struct LocationContext : Equatable

MapMatchingResult

  • The MapMatchingResult provides information about the matched location and its details.

    Important

    This is a Public Preview API. It may be changed or removed at any time.
    See more

    Declaration

    Swift

    public struct MapMatchingResult
  • The RouteProgress class provides information about the driver’s progress along the route.

    Important

    This is a Public Preview API. It may be changed or removed at any time.
    See more

    Declaration

    Swift

    public struct RouteProgress
  • Important

    This is a Public Preview API. It may be changed or removed at any time.

    Declaration

    Swift

    public struct RouteStopProgress
  • Represents a projected route with missing map reference data.

    Important

    This is a Public Preview API. It may be changed or removed at any time.
    See more

    Declaration

    Swift

    public struct ProjectedRoute
  • Describes part of the ProjectedRoute.

    Important

    This is a Public Preview API. It may be changed or removed at any time.
    See more

    Declaration

    Swift

    public struct ProjectedRouteSection
  • ActiveRouteData stores the active route and an optional better route proposal.

    Important

    This is a Public Preview API. It may be changed or removed at any time.
    See more

    Declaration

    Swift

    public struct ActiveRouteData

NavigationSnapshot

  • Navigation snapshot containing information about the state of the trip at a certain moment

    Important

    This is a Public Preview API. It may be changed or removed at any time.
    See more

    Declaration

    Swift

    public struct NavigationSnapshot
  • Keeps the state of the waypoints in the current route, providing methods to change the state (as necessary).

    Important

    This is a Public Preview API. It may be changed or removed at any time.
    See more

    Declaration

    Swift

    public struct RouteWaypointsState
  • Route plan defines parameters required for a single route in navigation session.

    To specify a route plan, first plan a TomTomSDKRoute/Route using TomTomSDKRoutePlanner/RoutePlanner and TomTomSDKRoutePlanner/RoutePlanningOptions.

    For more information on navigation session see TomTomNavigation/start(), TomTomNavigation/start(_:), TomTomNavigation/update(_:) and TomTomNavigation/stop().

    Important

    This is a Public Preview API. It may be changed or removed at any time.
    See more

    Declaration

    Swift

    public struct RoutePlan
  • Describes a city on the horizon element.

    This structure holds a horizon element with information regarding city. In case of this class, information consists only of the name of the city.

    To obtain CityElement horizon elements, the integrator must create an instance of HorizonEngine, register HorizonOptions including elementTypes containing HorizonElementType .cityType with a call to HorizonEngine .registerHorizonOptions, and request a HorizonResult using the previously registered HorizonOptions with a call to HorizonEngine .generateHorizon.

    Important

    This is a Public Preview API. It may be changed or removed at any time.
    See more

    Declaration

    Swift

    public struct CityElement : HorizonElement

CountryInformationElement

  • Describes the country information on the horizon element.

    This structure holds a horizon element with information regarding country. It contains information regarding country and region ISO codes, driving side, speed units and regional speed limits.

    To obtain CountryInformationElement horizon elements, the integrator must create an instance of HorizonEngine, register HorizonOptions including elementTypes containing HorizonElementType .countryInformationType with a call to HorizonEngine .registerHorizonOptions, and request a HorizonResult using the previously registered HorizonOptions with a call to HorizonEngine .generateHorizon.

    Important

    This is a Public Preview API. It may be changed or removed at any time.
    See more

    Declaration

    Swift

    public struct CountryInformationElement : HorizonElement

RegionalSpeedLimit

  • Describes speed limits for the region.

    Important

    This is a Public Preview API. It may be changed or removed at any time.
    See more

    Declaration

    Swift

    public struct RegionalSpeedLimit

DangerousGoodsRestrictionElement

  • Describes dangerous goods restrictions on the horizon element.

    This structure holds a horizon element with information regarding dangerous goods restriction. It contains information regarding exact type of dangerous goods restriction and flag indicating whether this restriction is violated with current configuration.

    To obtain DangerousGoodsRestrictionElement horizon elements, the integrator must create an instance of HorizonEngine, register HorizonOptions including elementTypes containing HorizonElementType .dangerousGoodsRestrictionType with a call to HorizonEngine .registerHorizonOptions, and request a HorizonResult using the previously registered HorizonOptions with a call to HorizonEngine .generateHorizon.

    Important

    This is a Public Preview API. It may be changed or removed at any time.
    See more

    Declaration

    Swift

    public struct DangerousGoodsRestrictionElement : HorizonElement

GeneralRoadPropertiesElement

  • Describes the general road properties on the horizon element.

    This structure holds a horizon element with information regarding general road elements. It contains information regarding number of lanes, functional road class, form of way, road condition, driving side and multiple flags indicating additional properites.

    To obtain GeneralRoadPropertiesElement horizon elements, the integrator must create an instance of HorizonEngine, register HorizonOptions including elementTypes containing HorizonElementType .generalRoadPropertiesType with a call to HorizonEngine .registerHorizonOptions, and request a HorizonResult using the previously registered HorizonOptions with a call to HorizonEngine .generateHorizon.

    Important

    This is a Public Preview API. It may be changed or removed at any time.
    See more

    Declaration

    Swift

    public struct GeneralRoadPropertiesElement : HorizonElement
  • Describes path geometry of the horizon element.

    This structure holds a horizon element with information regarding path geometry. It contains information regarding exact coordinates and altitude.

    To obtain PathGeometryElement horizon elements, the integrator must create an instance of HorizonEngine, register HorizonOptions including elementTypes containing HorizonElementType .pathGeometryType with a call to HorizonEngine .registerHorizonOptions, and request a HorizonResult using the previously registered HorizonOptions with a call to HorizonEngine .generateHorizon.

    Important

    This is a Public Preview API. It may be changed or removed at any time.
    See more

    Declaration

    Swift

    public struct PathGeometryElement : HorizonElement
  • Describes a region on the horizon element.

    This structure holds a horizon element with information regarding region. It contains information regarding country and subcountry name. Subcountry name can contain either state, province or region name.

    To obtain Region horizon elements, the integrator must create an instance of HorizonEngine, register HorizonOptions including elementTypes containing HorizonElementType .regionType with a call to HorizonEngine .registerHorizonOptions, and request a HorizonResult using the previously registered HorizonOptions with a call to HorizonEngine .generateHorizon.

    Important

    This is a Public Preview API. It may be changed or removed at any time.
    See more

    Declaration

    Swift

    public struct RegionElement : HorizonElement
  • Describes a safety location on the horizon element.

    This structure holds a horizon element with information regarding safety location. It contains information regarding safety location’s ID, start, end, bounding box, type, speed limit, recommended warning distance and flag indicating whether safety location is zone.

    To obtain SafetyLocationElement horizon elements, the integrator must create an instance of HorizonEngine, register HorizonOptions including elementTypes containing HorizonElementType .safetyLocationType with a call to HorizonEngine .registerHorizonOptions, and request a HorizonResult using the previously registered HorizonOptions with a call to HorizonEngine .generateHorizon.

    Important

    This is a Public Preview API. It may be changed or removed at any time.
    See more

    Declaration

    Swift

    public struct SafetyLocationElement : HorizonElement

SpeedLimitElement

  • Describes a speed limit on the horizon element.

    This structure holds a horizon element with information regarding speed limits. It contains information regarding speed limit value and type

    To obtain SpeedLimitElement horizon elements, the integrator must create an instance of HorizonEngine, register HorizonOptions including elementTypes containing HorizonElementType .speedLimitsType with a call to HorizonEngine .registerHorizonOptions, and request a HorizonResult using the previously registered HorizonOptions with a call to HorizonEngine .generateHorizon.

    To retrieve the speed limits for a specific vehicle type, create a TomTomSDKCommon.Vehicle of that type (e.g., for trucks, create a Truck instance). To create the vehicle instance, either use TomTomSDKVehicle.DefaultVehicleProvider or your own implementation of TomTomSDKVehicle.VehicleProvider. The TomTomSDKVehicle.VehicleProvider instance should be the same as the one provided to TomTomSDKNavigation.NavigationConfiguration.

    Attention

    speed limits are affected mostly by vehicle type TomTomSDKCommon.VehicleType, but apart from the vehicle type, some other vehicle characteristics might be considered, such as weight, type of load, and many others.

    Important

    This is a Public Preview API. It may be changed or removed at any time.

    See more

    Declaration

    Swift

    public struct SpeedLimitElement : HorizonElement, Equatable
  • Describes a street on the horizon element.

    This structure holds a horizon element with information regarding street. It contains information regarding street name/number and city name/block it belongs to.

    To obtain StreetElement horizon elements, the integrator must create an instance of HorizonEngine, register HorizonOptions including elementTypes containing HorizonElementType .streetType with a call to HorizonEngine .registerHorizonOptions, and request a HorizonResult using the previously registered HorizonOptions with a call to HorizonEngine .generateHorizon.

    Important

    This is a Public Preview API. It may be changed or removed at any time.
    See more

    Declaration

    Swift

    public struct StreetElement : HorizonElement
  • Describes a traffic sign on the horizon element.

    This structure holds a horizon element with information traffic sign. It contains information regarding traffic sign’s type category and location.

    To obtain TrafficSignElement horizon elements, the integrator must create an instance of HorizonEngine, register HorizonOptions including elementTypes containing HorizonElementType .trafficSignType with a call to HorizonEngine .registerHorizonOptions, and request a HorizonResult using the previously registered HorizonOptions with a call to HorizonEngine .generateHorizon.

    Important

    This is a Public Preview API. It may be changed or removed at any time.
    See more

    Declaration

    Swift

    public struct TrafficSignElement : HorizonElement

VehicleRestrictionElement

  • Describes vehicle restrictions on the horizon element.

    This structure holds a horizon element with information regarding vehicle restriction. It contains information regarding type of vehicle restriction and flag indicating whether vehicle restriction is violated with current configuration.

    To obtain VehicleRestrictionElement horizon elements, the integrator must create an instance of HorizonEngine, register HorizonOptions including elementTypes containing HorizonElementType .vehicleRestrictionType with a call to HorizonEngine .registerHorizonOptions, and request a HorizonResult using the previously registered HorizonOptions with a call to HorizonEngine .generateHorizon.

    Important

    This is a Public Preview API. It may be changed or removed at any time.
    See more

    Declaration

    Swift

    public struct VehicleRestrictionElement : HorizonElement
  • Policy that defines a search distance for the main path.

    The main path is the path the user currently follows, extending along the most likely trajectory. If the horizon options specify this policy, the HorizonEngine only searches within an explicitly specified distance when extending the main path. If a search distance is not provided, a default value will be used that corresponds to a maximum horizon length of Defaults.pathSearchDistance.

    For more information on horizon paths see HorizonEngine.

    For more information on horizon options see HorizonOptions.

    To search along the entire route use the RouteLengthPolicy.

    Important

    This is a Public Preview API. It may be changed or removed at any time.
    See more

    Declaration

    Swift

    public struct ExplicitDistancePolicy : PathSearchDistancePolicy

HorizonResult

HorizonOptions

  • Horizon configuration options.

    Horizon options define the extent of the HorizonPath in the horizon and the map attributes to be collected for these paths. A set of horizon options consists of the following:

    • the set of HorizonElementType the client is interested in,
    • the path search options for the main path,
    • the path search options for sub-paths,
    • the maximum number of paths the client can receive,
    • minimum length of the horizon ahead for which a horizon snapshot update is triggered.

    To specify horizon options, create an instance of this class:

    let mainPathSearchOptions = try MainPathSearchOptions(
        searchTime: .tt.minutes(10),
        searchDistancePolicy: ExplicitDistancePolicy(
            searchDistance: PathSearchDistance(
                maxHorizonLength: .tt.kilometers(5)
            )
        )
    )
    let subPathSearchOptionsLevel1 = try SubPathSearchOptions(
        searchTime: .tt.minutes(5),
        searchDistance: PathSearchDistance(
            maxHorizonLength: .tt.kilometers(2)
        )
    )
    let subPathSearchOptionsLevel2 = try SubPathSearchOptions(
        searchTime: .tt.minutes(3),
        searchDistance: PathSearchDistance(
            maxHorizonLength: .tt.kilometers(1)
        )
    )
    let horizonOptions = try HorizonOptions(
        id: UUID(),
        elementTypes: [.speedLimitsType, .regionType],
        mainPathSearchOptions: mainPathSearchOptions,
        subPathSearchOptions: [subPathSearchOptionsLevel1, subPathSearchOptionsLevel2],
        numberOfPaths: 4
        minDistanceAhead: .tt.meters(400)
    )
    

    For more information on horizon element types and horizon paths see HorizonEngine.

    A client application can register multiple sets of horizon options and request the engine to provide data for all or only some of the registered option sets. The engine generates a separate HorizonResult for each set of options in the request. The client can also update horizon configuration by registering a new set of options or unregistering a previously registered set.

    To register a set of horizon options, call the HorizonEngine .registerHorizonOptions function.

    To unregister a set of horizon options, call the HorizonEngine .unregisterHorizonOptions function.

    Important

    This is a Public Preview API. It may be changed or removed at any time.
    See more

    Declaration

    Swift

    public struct HorizonOptions
    extension HorizonOptions: Hashable

HorizonElementType

  • Defines the interface to horizon element types.

    Important

    This is a Public Preview API. It may be changed or removed at any time.
    See more

    Declaration

    Swift

    public struct HorizonElementType : RawRepresentable, Hashable

MainPathSearchOptions

  • Horizon search options for the main path.

    These options specify the PathSearchDistancePolicy and the search time for the main path. The main path is the path the user currently follows, extending along the most likely trajectory. The search distance policy and the search time define the extent of the main path.

    To specify horizon options for the main path, create an instance of this class:

    let mainPathSearchOptions = try MainPathSearchOptions(
        searchTime: .tt.minutes(10),
        searchDistancePolicy: ExplicitDistancePolicy(
            searchDistance: PathSearchDistance(
                maxHorizonLength: .tt.kilometers(5)
            )
        )
    )
    

    For more information on horizon paths see HorizonEngine.

    For more information on horizon options see HorizonOptions.

    The PathSearchDistancePolicy determines whether the horizon engine must search along the entire route (see RouteLengthPolicy) or within an explicitly specified distance (see ExplicitDistancePolicy).

    If both search time and search distance policy are provided (i.e., the options specify both a search time and a search distance policy) for the main path, the HorizonEngine extends the main path until time and distance have both reached their limits. If the search time is not specified, the horizon engine works with a default value of Defaults .pathSearchTime for the search time and extends the main path based on the search distance directly specified by or derived from the search policy.

    Important

    This is a Public Preview API. It may be changed or removed at any time.
    See more

    Declaration

    Swift

    public struct MainPathSearchOptions

SubPathSearchOptions

  • Horizon search options for a sub-path level.

    These options specify the search distance and the search time for a sub-path level. The level of a sub-path is the number of times the user would have to deviate, starting from the main path, in order to reach that sub-path. The search distance and the search time define the extent of sub-paths of that level in the horizon.

    To specify options for a sub-path level, create an instance of this class:

    let subPathSearchOptionsLevel1 = try SubPathSearchOptions(
        searchTime: .tt.minutes(5),
        searchDistance: PathSearchDistance(
            maxHorizonLength: .tt.kilometers(2)
        )
    )
    

    For more information on horizon paths see HorizonEngine.

    For more information on horizon options see HorizonOptions.

    If both search time and search distance are specified (i.e., the options specify both a search time and a search distance) for a given sub-path level, the HorizonEngine extends horizon sub-paths of that level until both time and distance have reached the limit. If only the search distance is specified for a given sub-path level, the horizon engine works with a default value Defaults .pathSearchTime for the search time and extends the sub-paths of that level based on the search distance. If only the search time is specified for a given sub-path level, the horizon engine works with a default value of Defaults .pathSearchDistance maximum extension length for the search distance and extends sub-paths of that level until both time and distance reach the limit.

    Important

    This is a Public Preview API. It may be changed or removed at any time.
    See more

    Declaration

    Swift

    public struct SubPathSearchOptions

HorizonSnapshot

  • Snapshot of the horizon.

    Horizon snapshot holds state of the horizon for HorizonOptions provided by user and current position. Snapshot contains data such as:

    • paths: List of HorizonPath including at least 1 main path and optional subpaths
    • state: Current HorizonSnapshotState holding incremental counter of horizon updates
    • mainPathID: ID of current main path, nil if current position is offroad

    Horizon snapshot can be extracted from HorizonResult, which can be obtained using instance of HorizonEngine, registering set of HorizonOptions and making call generateHorizon.

    Important

    This is a Public Preview API. It may be changed or removed at any time.
    See more

    Declaration

    Swift

    public struct HorizonSnapshot

HorizonPath

  • Path in the horizon.

    This class represent one path in horizon. Each entry contains information allowing to determine hierarchy of paths(parent-child relationship between paths), offset on parent path, set of horizon elements relevant to HorizonOptions provided by user to HorizonEngine, and path geometry. The length of the path as well as which types of horizon elements it contains are determined by the horizon options.

    Horizon path can be extracted from HorizonResult, which can be obtained using instance of HorizonEngine, registering set of HorizonOptions and making call generateHorizon.

    Important

    This is a Public Preview API. It may be changed or removed at any time.
    See more

    Declaration

    Swift

    public struct HorizonPath : Equatable

HorizonPosition

  • Position in the horizon.

    The best map-matched position on the horizon. It can be either on-road or off-road. If off-road, it can be either:

    • the likeliest on-road position on the horizon, but flagged as off-road, if there are on-road candidates. The user can extract horizon elements to facilitate the decision to join the road.
    • or an off-road position with an invalid path id and an unmatched raw location, if there are no on-road candidates on the horizon.

    Horizon position can be extracted from HorizonResult, which can be obtained using instance of HorizonEngine, registering set of HorizonOptions and making call generateHorizon.

    Important

    This is a Public Preview API. It may be changed or removed at any time.
    See more

    Declaration

    Swift

    public struct HorizonPosition
  • State of the horizon snapshot provided by the HorizonEngine. It is based on a set of previously registered horizon options.

    Important

    This is a Public Preview API. It may be changed or removed at any time.
    See more

    Declaration

    Swift

    public struct HorizonSnapshotState : Equatable

PathSearchDistance

  • Horizon path search distance configuration.

    The search distance defines the extent of the path in the horizon.

    For more information on horizon paths see HorizonEngine.

    For more information on horizon options see HorizonOptions.

    Important

    This is a Public Preview API. It may be changed or removed at any time.
    See more

    Declaration

    Swift

    public struct PathSearchDistance : Equatable
  • Policy that binds the horizon path to the entire route.

    The main path is the path the user currently follows, extending along the most likely trajectory. If the horizon options specify this policy, the HorizonEngine searches along the entire route when extending the main path.

    For more information on horizon paths see HorizonEngine.

    For more information on horizon options see HorizonOptions.

    To search within a specific distance use the ExplicitDistancePolicy.

    Important

    This is a Public Preview API. It may be changed or removed at any time.
    See more

    Declaration

    Swift

    public struct RouteLengthPolicy : PathSearchDistancePolicy