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.

  • Unique Route‘s identifier.

    Declaration

    Swift

    public var routeID: UUID
  • tag

    Returns the Route‘s tag.

    Declaration

    Swift

    public var tag: String?
  • Delegate of the Route.

    Declaration

    Swift

    public weak var delegate: RouteDelegate?
  • Sets the color of an unreachable Route.

    Declaration

    Swift

    public var unreachableColor: UIColor?
  • Returns a bounding box sized to the Route‘s geometry.

    If returning the route’s CoordinateBounds was unsuccessful because of a faulty route, an empty CoordinateBounds is 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 the Route is colored with the outline color. The progress can be updated by operating on the Route 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 is UIColor.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 by CameraTrackingMode.followRoute . Only one Route can be followed at a time. When this Route 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()