TomTomSDKRoutingVisualization
-
Declaration
Swift
extension DefaultRoutingVisualization: CameraEventObserver
extension DefaultRoutingVisualization: RouteDelegate
-
Represents a result of route planning.
See moreDeclaration
Swift
public struct RoutePlan
-
The Entry point for all methods related to the routing visualization. Instances of
RoutingVisualization
are created usingcreate(map:styleConfiguration:)
. You should call methods on these instances from the main thread only, otherwise an exception can occur. ARoutingVisualization
instance is used by first providing aRoutePlan
withdisplayRoutePlan(_:)
. After that, theTomTomSDKRoute/Route
s contained in theRoutePlan
are 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 theStyleConfiguration
provided 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/Route
contained in theRoutePlan
has traffic data available andareTrafficIncidentsEnabled
is true, traffic incidents are displayed on the map on top of thatTomTomSDKRoute/Route
. If aTomTomSDKRoute/Route
contained in theRoutePlan
has reachability information andisReachableDistanceMarkerVisible
is 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
-
Creates instances of
See moreRoutingVisualization
.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.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.Declaration
Swift
public struct LinePatternDisplay
-
Key for the magnitude of delay of traffic incidents used in
RouteTrafficIncidentStyle
.Important
This is a Public Preview API. It may be changed or removed at any time.Declaration
Swift
public enum MagnitudeOfDelayKey
-
Key for categories of on-route traffic incidents used in
RouteTrafficIncidentStyle
Important
This is a Public Preview API. It may be changed or removed at any time.Declaration
Swift
public enum TrafficIncidentCategoryKey
-
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.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.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.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.Declaration
Swift
public struct StyleConfiguration
-
Represents a traffic incident.
See moreDeclaration
Swift
public struct TrafficIncident
-
Category for on-route traffic incidents.
Important
This is a Public Preview API. It may be changed or removed at any time.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.Declaration
Swift
public enum RouteStyleError : LocalizedError
-
Declaration
Swift
extension DefaultTrafficIncidentsVisualizer: MapInteractionObserver