Protocols

The following protocols are available globally.

RoutingVisualization

  • The Entry point for all methods related to the routing visualization. Instances of RoutingVisualization are created using create(map:styleConfiguration:). 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. 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. You can access the list of traffic incidents that are on a route using trafficIncidents(on:).

    See more

    Declaration

    Swift

    public protocol RoutingVisualization