TomTomGuidanceEngine

public class TomTomGuidanceEngine : GuidanceEngine

TomTomGuidanceEngine generates Guidance using the list of TomTomSDKRoute.Instructions supplied within NavigationSnapshot.activeRoute.

TomTomGuidanceEngine depends on the TomTomSDKRoute.Announcements included in the supplied TomTomSDKRoute.Instructions. The engine continuously checks the active route progress to provide up-to-date Guidance information. When the vehicle reaches an announcement point, the generated Guidance includes the GuidanceAnnouncement to be announced. Note that the set of supported languages may differ between different GuidanceEngines.

TomTomGuidanceEngine should only be used with the online routing client that uses TomTomSDKRoutePlanner.GuidanceOnlineApiVersion.v1 as the TomTomSDKRoutePlanner.GuidanceOptions.guidanceVersion. This is because the instructions from offline and the online routing client configured with TomTomSDKRoutePlanner.GuidanceOnlineApiVersion.v1 are designed to be used by the DynamicGuidanceEngine and do not contain static announcement information.

Lifecycle

Public

  • Default distance threshold to be taken into account when creating a next instruction list.

    Declaration

    Swift

    public static let defaultAppendInstructionDistanceThreshold: Double
  • Defines whether generation of announcements is enabled.

    Declaration

    Swift

    public var announcementsEnabled: Bool { get set }
  • Defines the AnnouncementMode for this GuidanceEngine.

    Declaration

    Swift

    public var announcementMode: AnnouncementMode { get set }
  • Returns a list of languages (represented as Locale) supported by GuidanceEngine.

    Declaration

    Swift

    public var availableLanguages: [Locale] { get }
  • Generates guidance which might be a new upcoming maneuver or the same with updated distance to next maneuver.

    Declaration

    Swift

    public func generateGuidance(navigationSnapshot: NavigationSnapshot) throws -> Guidance

    Parameters

    navigationSnapshot

    The snapshot of the current navigation session.

    Return Value

    Guidance object containing guidance information related to the current position on the route.

  • Generates a lane guidance object related to the current position on the route based on input parameters.

    Declaration

    Swift

    public func generateLaneGuidance(navigationSnapshot: NavigationSnapshot) -> LaneGuidanceUpdate?

    Parameters

    navigationSnapshot

    The snapshot of the current navigation session.

    Return Value

    Lane guidance info object containing lane guidance information related to the current position on the route.

  • Resets the object to the default state.

    Declaration

    Swift

    public func reset()