RouteStyle

public struct RouteStyle

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.

Lifecycle

Public

  • The color of the active route. You can control the opacity of the route line by using the alpha component of the UIColor.

    Declaration

    Swift

    public let activeLineColor: UIColor
  • The line width (in point unit) of the active route. This parameter must be a non-empty array containing non-negative values for both the zoom and the width level at which the width is used.

    Declaration

    Swift

    public let activeLineWidths: [Double : Double]
  • The outline width (in point unit) of the active route.

    Warning

    The current implementation requires the size of this list to be 1. This parameter must be a non-empty array containing non-negative values for both the zoom and the width level at which the width is used.

    Declaration

    Swift

    public let activeOutlineWidths: [Double : Double]
  • The color of the alternative routes. This color may be overruled individually for each alternative route using alternativeLineColorOverrule. You can control the opacity of the route line by using the alpha component of the UIColor.

    Declaration

    Swift

    public let alternativeLineColor: UIColor
  • The outline width (in point unit) of the alternative routes. This parameter must be a non-empty array containing non-negative values for both the zoom and the width level at which the width is used.

    Warning

    The current implementation requires this list to be equal to activeLineWidths.

    Declaration

    Swift

    public let alternativeLineWidths: [Double : Double]
  • The outline width (in point unit) of the alternative routes. This parameter must be a non-empty array containing non-negative values for both the zoom and the width level at which the width is used.

    Warning

    The current implementation requires this list to be equal to activeOutlineWidths.

    Declaration

    Swift

    public let alternativeOutlineWidths: [Double : Double]
  • alternativeLineColorsets the same color for all the alternative routes. If it’s desired to overrule this semantic, this property can be used by specifying the color per the index of the alternative route.

    Declaration

    Swift

    public let alternativeLineColorOverrule: [Int : UIColor]
  • The image for the departure marker. By default, the departure marker is hidden.

    Declaration

    Swift

    public let departureMarkerImage: UIImage?
  • The image for the destination marker. By default, the default marker is used.

    Declaration

    Swift

    public let destinationMarkerImage: UIImage?
  • The image for the waypoint markers.

    Declaration

    Swift

    public let waypointsMarkerImage: UIImage?
  • A boolean flag for enabling or disabling the visualization of waypoint markers. By default, the waypoints are visible.

    Declaration

    Swift

    public let areWaypointsVisible: Bool

RouteStyle.Defaults

  • Contains default styling properties for route visualization.

    Important

    This is a Public Preview API. It may be changed or removed at any time.
    See more

    Declaration

    Swift

    public enum Defaults