Protocols
The following protocols are available globally.
-
The Entry point for all methods related to the routing visualization. Instances of
RoutingVisualizationare created usingcreate(map:styleConfiguration:). You should call methods on these instances from the main thread only, otherwise an exception can occur. ARoutingVisualizationinstance 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 be navigated on. You can access the list of route primitives displayed on the map usingroutes. The active route and the alternative routes are styled with the properties contained in theStyleConfigurationprovided tocreate(map:styleConfiguration:). 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
See moreareTrafficIncidentsEnabled. If aTomTomSDKRoute/Routecontained in theRoutePlanhas traffic data available andareTrafficIncidentsEnabledis true, 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:).Declaration
Swift
public protocol RoutingVisualization
Protocols Reference