Route
public class Route
A Route
representation which can be added and displayed on the map.
To show a Route
on the map, call the TomTomMap.addRoute(RouteOptions)
method.
You can configure its shape and appearance with the RouteOptions
class.
Drawing a Route
on the map requires a list with coordinates of the Route
points.
Important
This is a Public Preview API. It may be changed or removed at any time.-
Unique
Route
‘s identifier.Declaration
Swift
public var routeID: UUID
-
Returns the
Route
‘s tag.Declaration
Swift
public var tag: String?
-
Provides information about the color of an unreachable
Route
.Declaration
Swift
public var unreachableColor: UIColor?
-
Delegate of the
Route
.Declaration
Swift
public weak var delegate: RouteDelegate?
-
Returns a bounding box sized to the
Route
‘s geometry.If returning the route’s
CoordinateBounds
was unsuccessful in case of a faulty route, an emptyCoordinateBounds
will be returned.Declaration
Swift
public var bounds: CoordinateBounds { get }
-
Mutable property representing the current
Route
‘s progress.The progress made along the
Route
can be indicated on the drawn map. The traveled part of theRoute
is colored with the outline color. The progress can be updated by operating on theRoute
object returned during drawing, Its value is expressed in meters.Declaration
Swift
public var progressOnRoute: Measurement<UnitLength> { get set }
-
Mutable property representing the color of the
Route
‘s tube.The default color of the
Route
’s tube isUIColor.blue
.Declaration
Swift
public var color: UIColor { get set }
-
A method for clearing the current
Route
‘s progress.The color of the
Route
will return to the initial color.Declaration
Swift
public func clearProgress()
-
Mark this
Route
as followable.Followable
Route
is eligible to be followed byCameraTrackingMode.followRoute
. Only oneRoute
can be followed at a time. When thisRoute
is marked as followable, the previous one stops being followable.Declaration
Swift
public func follow()
-
Mark this
Route
as non followable.Declaration
Swift
public func unfollow()