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: unreachableDestinationMarkerImage: waypointsMarkerImage: unreachableWaypointsMarkerImage: areWaypointsVisible: destinationConnectionLine: evWaypointMarker: isDepartureMarkerVisible: isDestinationMarkerVisible: vehicleRestrictionsLineStyle: ) Initializes
RouteStyle
with the given values.Throws
StyleConfigurationError/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: MapImage = Defaults.departureMarkerImage, destinationMarkerImage: MapImage = Defaults.destinationMarkerImage, unreachableDestinationMarkerImage: MapImage = Defaults.unreachableDestinationMarkerImage, waypointsMarkerImage: MapImage? = Defaults.waypointsMarkerImage, unreachableWaypointsMarkerImage: MapImage? = Defaults.unreachableWaypointsMarkerImage, areWaypointsVisible: Bool = Defaults.areWaypointsVisible, destinationConnectionLine: DestinationConnectionLineStyle = DestinationConnectionLineStyle(), evWaypointMarker: EVWaypointMarkerStyle = EVWaypointMarkerStyle(), isDepartureMarkerVisible: Bool = Defaults.isDepartureMarkerVisible, isDestinationMarkerVisible: Bool = Defaults.isDestinationMarkerVisible, vehicleRestrictionsLineStyle: RouteVehicleRestrictionsStyle = RouteVehicleRestrictionsStyle() ) throws
-
Initializes
RouteStyle
with values fromDefaults
.Declaration
Swift
public init()
-
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: MapImage
-
The image for the destination marker. By default, the preset marker image is used.
Declaration
Swift
public let destinationMarkerImage: MapImage
-
The image for the waypoint markers.
Declaration
Swift
public let waypointsMarkerImage: MapImage?
-
A boolean flag for enabling or disabling the visualization of waypoint markers. By default, the waypoints are visible.
Declaration
Swift
public let areWaypointsVisible: Bool
-
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
-
Represents the vehicle restrictions line style.
Declaration
Swift
public let vehicleRestrictionsLineStyle: RouteVehicleRestrictionsStyle
-
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