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. Visualization of the last reachable point on the route, denoted as a marker, can be toggled on or off usingisReachableDistanceMarkerVisible. If aTomTomSDKRoute/Routecontained in theRoutePlanhas traffic data available andareTrafficIncidentsEnabledis true, traffic incidents are displayed on the map on top of thatTomTomSDKRoute/Route. If aTomTomSDKRoute/Routecontained in theRoutePlanhas reachability information andisReachableDistanceMarkerVisibleis true, the reachable range marker is 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