TomTomSDKRoutingVisualization

  • The Entry point for all methods related to the routing visualization. Instances of RoutingVisualization are created using create(map:styleConfiguration:). RoutingVisualization shouldn’t be conformed outside the TomTom SDK frameworks. Inheritance from TomTomSDKCommon/ConformanceLocked makes it impossible to create RoutingVisualization instances outside the TomTomSDK frameworks. You should call methods on these instances from the main thread only, otherwise an exception can occur. A RoutingVisualization instance is used by first providing a RoutePlan with displayRoutePlan(_:). After that, the TomTomSDKRoute/Routes contained in the RoutePlan are displayed on the map, and you can use setActiveRoute(_:) or selectRoute(_:) to select a route to be navigated on. You can access the list of route primitives displayed on the map using routes or plannedRoutes. The active route and the alternative routes are styled with the properties contained in the StyleConfiguration provided to create(map:styleConfiguration:). You can then call clearRoutePlan() 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 or traffic api. Visualization of the last reachable point on the route, denoted as a marker, can be toggled on or off using isReachableDistanceMarkerVisible. If a TomTomSDKRoute/Routecontained in the RoutePlan has traffic data available and areTrafficIncidentsEnabled is true, traffic incidents are displayed on the map on top of that TomTomSDKRoute/Route. If a TomTomSDKRoute/Routecontained in the RoutePlan has reachability information and isReachableDistanceMarkerVisible is true, the reachable range marker is displayed on the map on top of that TomTomSDKRoute/Route. You can access the list of traffic incidents that are on a route using trafficIncidents(on:) or using traffic api.

    See more

    Declaration

    Swift

    public protocol RoutingVisualization : ConformanceLocked
  • Creates instances of RoutingVisualization.

    See more

    Declaration

    Swift

    public enum RoutingVisualizationFactory
  • Image to be visualized on a map.

    Important

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

    Declaration

    Swift

    public enum MapImage
    extension MapImage: Equatable
  • Represents a line pattern display configuration for a specific zoom range.

    Important

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

    Declaration

    Swift

    public struct LinePatternDisplay
  • Represents a style configuration for the routes. The properties related to the active route (i.e., the properties prefixed with “active”) also apply to the selected route during the route planning phase. During instance construction, certain input values are checked against the range of values expected for that field (e.g., width values must be positive). Default assets and resources are bundled into the library. You do not need to supply any asset/resource files unless you want to customize something (for example, the icon of waypoint markers).

    Important

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

    Declaration

    Swift

    public struct RouteStyle
  • Represents a style configuration for the vehicle restriction line.

    Important

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

    Declaration

    Swift

    public struct RouteVehicleRestrictionsStyle
  • Style configuration for on-route traffic incidents. During instance construction, certain input values are checked against the range of values expected for that field (e.g., width values must be non-negative).

    Default assets such as fonts and icons are bundled into the framework. You can provide custom icons in propertiesByMagnitudeOfDelay

    Important

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

    Declaration

    Swift

    public struct RouteTrafficIncidentStyle
  • Represents a style configuration for the elements of the routing visualization. When no arguments are provided to the constructor, it constructs the default style configuration.

    See more

    Declaration

    Swift

    public struct StyleConfiguration
  • Errors which are able to be thrown during stylization.

    Important

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

    Declaration

    Swift

    public enum StyleConfigurationError : LocalizedError
  • Category for on-route traffic incidents.

    Important

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

    Declaration

    Swift

    public enum TrafficIncidentCategory
  • Protocol defining the behavior for observers of traffic incident tap events.

    Conforming to TrafficIncidentTapObserver allows an object to respond to user interactions with traffic incidents displayed on map.

    Important

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

    Declaration

    Swift

    public protocol TrafficIncidentTapObserver : Observer
  • TrafficVisualization defines the protocol for managing and interacting with traffic incident visualizations on a route map.

    This protocol provides an interface for enabling/disabling traffic incident visualizations, retrieving traffic incidents for specific routes, and managing observers for tap events on traffic incidents.

    See more

    Declaration

    Swift

    public protocol TrafficVisualization : AnyObject, ConformanceLocked