TomTomSDKRoutingVisualization

  • Declaration

    Swift

    extension DefaultRoutingVisualization: CameraEventObserver
    extension DefaultRoutingVisualization: RouteDelegate
  • Represents a result of route planning.

    See more

    Declaration

    Swift

    public struct RoutePlan
  • Used to inform the caller that a route has been tapped.

    Important

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

    Declaration

    Swift

    public protocol RouteTapObserver : Observer
  • 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(_:) to select a route to be navigated on. You can access the list of route primitives displayed on the map using routes. 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. 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:).

    See more

    Declaration

    Swift

    public protocol RoutingVisualization : ConformanceLocked
  • Creates instances of RoutingVisualization.

    See more

    Declaration

    Swift

    public enum RoutingVisualizationFactory
  • The DestinationConnectionLineStyle struct represents the style of a dotted line connecting the drivable destination with the final destination. It allows the user to customize the dotted line by specifying various parameters such as line pattern, dash length, gap color, pattern length, pattern color, and pattern width.

    Important

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

    Declaration

    Swift

    public struct DestinationConnectionLineStyle
  • 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
  • Describes marker visibility setup by zoom level and camera tilt.

    Important

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

    Declaration

    Swift

    public struct MarkerVisibility
  • 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
  • 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.

    Important

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

    Declaration

    Swift

    public struct StyleConfiguration
  • 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
  • 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 RouteStyleError : LocalizedError
  • 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
  • Declaration

    Swift

    extension DefaultTrafficIncidentsVisualizer: MapInteractionObserver
  • 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.

    Important

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

    Declaration

    Swift

    public protocol TrafficVisualization : AnyObject