TomTomSDKNavigationVisualization
-
Declaration
Swift
extension NavigationEventsConnector: NavigationStateChangeObserverextension NavigationEventsConnector: NavigationProgressObserverextension NavigationEventsConnector: NavigationRouteUpdateObserverextension NavigationEventsConnector: NavigationRouteAddObserverextension NavigationEventsConnector: NavigationRouteRemoveObserverextension NavigationEventsConnector: NavigationActiveRouteChangeObserverextension NavigationEventsConnector: NavigationDestinationArrivalObserverextension NavigationEventsConnector: NavigationWaypointArrivalObserverextension NavigationEventsConnector: NavigationHorizonObserver
-
Declaration
Swift
extension SafetyLocationDrawer: MapInteractionObserver
-
Addresses visualization of safety locations such as configuration, user interaction, etc.
See moreImportant
This is a Public Preview API. It may be changed or removed at any time.Declaration
Swift
public protocol SafetyLocationVisualization : AnyObject -
Enum representing options for the number of safety locations to display at the start of the route.
See moreImportant
This is a Public Preview API. It may be changed or removed at any time.Declaration
Swift
public enum SafetyLocationCountOptions
-
Defines the appearance and behavior of the safety location visualization on the route.
Important
Currently supported safety location types are:SafetyLocation/SafetyLocationType/speedEnforcementSafetyLocation/SafetyLocationType/averageSpeedSafetyLocation/SafetyLocationType/mobileRiskZoneSafetyLocation/SafetyLocationType/trafficLightSafetyLocation/SafetyLocationType/mobileSafetyLocation/SafetyLocationType/fixedDangerZone
See moreImportant
This is a Public Preview API. It may be changed or removed at any time.Declaration
Swift
public struct SafetyLocationStyle -
The type of navigation guidance. It defines the behavior of the camera and the route around navigation events such as start, end, reaching waypoint or destination, etc. It also defines route events like deviation, change, information update, progress change, and so on.
See moreDeclaration
Swift
public enum GuidanceType -
Errors that can be thrown during stylization.
See moreImportant
This is a Public Preview API. It may be changed or removed at any time.Declaration
Swift
public enum StyleConfigurationError : LocalizedError
-
Declaration
Swift
extension VisualSafetyLocationElement: Hashable, Equatable
-
Declaration
Swift
extension DefaultBetterRouteDataSource: NavigationRouteAddObserver, NavigationRouteRemoveObserver, NavigationRouteUpdateObserver, NavigationActiveRouteChangeObserver
-
Manages the visualization of better route proposals, e.g., visibility.
Important
To see the better route proposal theBetterProposalAcceptanceModeshould be set toBetterProposalAcceptanceMode.manualwhen configuring theTomTomNavigation.See moreImportant
This is a Public Preview API. It may be changed or removed at any time.Declaration
Swift
public protocol BetterRouteVisualization : AnyObject
-
Declaration
Swift
extension DefaultBetterRouteVisualizer: RouteDelegateextension DefaultBetterRouteVisualizer: MapInteractionObserver -
Represents the style used to display the better route.
See moreImportant
This is a Public Preview API. It may be changed or removed at any time.Declaration
Swift
public struct BetterRouteStyle -
A type alias for
TomTomSDKRoutingVisualization/TrafficIncidentImportant
This is a Public Preview API. It may be changed or removed at any time.Declaration
Swift
public typealias TrafficIncident = TomTomSDKRoutingVisualization.TrafficIncident
-
Declaration
Swift
extension DefaultNavigationVisualization: NavigationStateChangeObserverextension DefaultNavigationVisualization: NavigationHorizonObserverextension DefaultNavigationVisualization: NavigationProgressObserverextension DefaultNavigationVisualization: NavigationRouteUpdateObserverextension DefaultNavigationVisualization: NavigationActiveRouteChangeObserverextension DefaultNavigationVisualization: NavigationDestinationArrivalObserverextension DefaultNavigationVisualization: NavigationWaypointArrivalObserver
-
Entry point for all methods related to the navigation visualization module. Instances of
NavigationVisualizationare created usingcreate(map:navigation:styleConfiguration:).NavigationVisualizationshouldn’t be conformed outside the TomTom SDK frameworks. Inheritance fromTomTomSDKCommon/ConformanceLockedmakes it impossible to createNavigationVisualizationinstances outside the TomTomSDK frameworks. You should call methods on these instances from the main thread only, otherwise an exception can occur.A
NavigationVisualizationinstance is used by first providing aRoutePlanwithdisplayRoutePlan(:_). After that, theTomTomSDKRoute/Routes contained in theRoutePlanare displayed on the map, and you can usesetActiveRoute(_:)to select a route to navigate. You can access the list of route primitives displayed on the map usingroutes. The selected route and the alternative routes are styled with the properties contained in theStyleConfigurationprovided tocreate(map:navigation:styleConfiguration:). After selecting the type of navigation guidance with the propertyguidanceType, you can start the navigation session withTomTomSDKNavigation/Navigation/start(). Once the navigation session is started, the route that is set becomes the active route. When you’re finished usingNavigationVisualization, callTomTomSDKNavigation/Navigation/stop(). You can then callclearRoutePlan()to remove all the primitives that have been added to the map by the module.Visualization of on-route traffic incidents can be enabled or disabled using
areTrafficIncidentsEnabled. If aTomTomSDKRoute/Routecontained in theRoutePlanhas traffic data available andareTrafficIncidentsEnabledistrue, traffic incidents are displayed on the map on top of thatTomTomSDKRoute/Route. You can access the list of traffic incidents that are on a route usingtrafficIncidents(on:).The navigation visualization module subscribes to certain listeners during its life cycle, so that it can react automatically to important events:
TomTomSDKNavigation/NavigationStateChangeObserver- Notifies the module when a navigation state changes. The module reacts by removing the alternative routes from the map, setting the camera tracking mode toTomTomSDKMapsDisplay/CameraTrackingMode/followNorthUp, and setting a default tilt angle.TomTomSDKNavigation/NavigationProgressObserver- Notifies the module as the driver progresses on the route. The module reacts by updating the visual cue of the progress on the route (i.e., the grayed-out region behind the vehicle).TomTomSDKNavigation/GuidanceUpdateObserver- Notifies the module when new on-route instructions are available. The new instructions are provided along with the notification. The module reacts by updating the route with the new instructions.TomTomSDKNavigation/NavigationDestinationArrivalObserver- Notifies the module when the driver reaches the destination. The module reacts by removing the route from the map, setting camera tracking mode toTomTomSDKMapsDisplay/CameraTrackingMode/followNorthUp, and setting the default 2D view.TomTomSDKMapDisplay/CameraEventObserver- Notifies the module when a parameter of the camera changes. The module reacts by, for example, showing or hiding certain traffic markers (seemarkerVisibilityByCategory).
Declaration
Swift
public protocol NavigationVisualization : AnyObject, RoutingVisualization
-
Creates instances of
See moreNavigationVisualization.Declaration
Swift
public enum NavigationVisualizationFactory -
Represents a style configuration for the elements of the
See moreNavigationVisualization. When no arguments are provided to the constructor, it constructs the default style configuration.Declaration
Swift
public struct StyleConfiguration
TomTom SDK for iOS (0.53.1)
TomTomSDKNavigationVisualization