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.-
init(activeLineColor:
activeLineWidths: activeOutlineWidths: alternativeLineColor: alternativeLineWidths: alternativeOutlineWidths: alternativeLineColorOverrule: departureMarkerImage: destinationMarkerImage: waypointsMarkerImage: areWaypointsVisible: unreachableColor: reachableDistanceMarkerImage: destinationConnectionLine: evWaypointMarker: isDepartureMarkerVisible: isDestinationMarkerVisible: ) Initializes route style.
Throws
RouteStyleError/invalidArgument
if any of the following requirements are not met:activeLineWidths
,alternativeLineWidths
,activeOutlineWidths
andalternativeOutlineWidths
should contain positive Double.activeOutlineWidths
should be equal to 1.activeLineWidths
should be equal toalternativeLineWidths
.activeOutlineWidths
should be equal toalternativeOutlineWidths
.
Declaration
Swift
public init( activeLineColor: UIColor = Defaults.activeLineColor, activeLineWidths: [Double: Double] = Defaults.activeLineWidths, activeOutlineWidths: [Double: Double] = Defaults.activeOutlineWidths, alternativeLineColor: UIColor = Defaults.alternativeLineColor, alternativeLineWidths: [Double: Double] = Defaults.alternativeLineWidths, alternativeOutlineWidths: [Double: Double] = Defaults.alternativeOutlineWidths, alternativeLineColorOverrule: [Int: UIColor] = [:], departureMarkerImage: UIImage = Defaults.departureMarkerImage, destinationMarkerImage: UIImage = Defaults.destinationMarkerImage, waypointsMarkerImage: UIImage? = Defaults.waypointsMarkerImage, areWaypointsVisible: Bool = Defaults.areWaypointsVisible, unreachableColor: UIColor = Defaults.unreachableColor, reachableDistanceMarkerImage: UIImage? = Defaults.endOfRangeMarkerImage, destinationConnectionLine: DestinationConnectionLineStyle = DestinationConnectionLineStyle(), evWaypointMarker: EVWaypointMarkerStyle = EVWaypointMarkerStyle(), isDepartureMarkerVisible: Bool = Defaults.isDepartureMarkerVisible, isDestinationMarkerVisible: Bool = Defaults.isDestinationMarkerVisible ) throws
-
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 theUIColor
.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 toactiveLineWidths
.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 toactiveOutlineWidths
.Declaration
Swift
public let alternativeOutlineWidths: [Double : Double]
-
alternativeLineColor
sets 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 preset marker image is used.
Declaration
Swift
public let departureMarkerImage: UIImage
-
The image for the destination marker. By default, the preset marker image 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
-
The color of the unreachable segment of the route.
Declaration
Swift
public let unreachableColor: UIColor
-
The pin image for the marker placed at the end of the reachable section of the route. If you pass
nil
the default icon will be used.Declaration
Swift
public let reachableDistanceMarkerImage: UIImage?
-
Style used for a dotted line connecting drivable and final destinations.
Declaration
Swift
public let destinationConnectionLine: DestinationConnectionLineStyle
-
Represents a style configuration for the EV charging station waypoint marker.
Declaration
Swift
public let evWaypointMarker: EVWaypointMarkerStyle
-
The visibility of the departure marker. Default value is
false
.Declaration
Swift
public let isDepartureMarkerVisible: Bool
-
The visibility of the destination marker. Default value is
true
Declaration
Swift
public let isDestinationMarkerVisible: Bool
-
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 style configuration for the EV charging station waypoint marker.
Important
This is a Public Preview API. It may be changed or removed at any time.Declaration
Swift
public struct EVWaypointMarkerStyle