RouteOptions
public struct RouteOptions
Class that contains configuration of the route that will be drawn on the map.
Example:
let routeOption: RouteOptions = RouteOptions(coordinates: route.geometry)
guard let mapRoute = try? self.mapView.map.addRoute(routeOption) else { return }
-
Initialization of the route object. Creates route regular route segment type that contains all provided coordinates.
Declaration
Swift
public init(coordinates: [CLLocationCoordinate2D])
Parameters
coordinates
Array of coordinates.
-
Initialization of the route object. Creates route regular route segment type that contains all provided coordinates.
Important
This is a Public Preview API. It may be changed or removed at any time.Declaration
Swift
public init(coordinates: [CLLocationCoordinate2D], sections: [RouteSection])
Parameters
coordinates
Array of route coordinates.
sections
Array of route sections.
-
Initialization of the polyline object.
Declaration
Swift
public init(polyline: String)
Parameters
polyline
String object containing an encoded polyline.
-
Width of the displayed route in dps.
Declaration
Swift
public var routeWidth: Double
-
Route tube width for the given zoom level into the width styling table.
Declaration
Swift
public var widthToZoomMap: [Double : Double]
-
Icon showing the beginning of the route.
Declaration
Swift
public var departureMarkerImage: UIImage?
-
Icon showing the end of the route.
Declaration
Swift
public var destinationMarkerImage: UIImage?
-
Color of the displayed route.
Declaration
Swift
public var color: UIColor
-
Color of any unreachable parts of the displayed route.
Declaration
Swift
public var unreachableColor: UIColor?
-
Outline width of the displayed route in dps.
Declaration
Swift
public var outlineWidth: Double
-
Icon to use for route waypoints.
Declaration
Swift
public var waypointMarker: UIImage?
-
Array of the coordinates of any waypoints along the route.
Declaration
Swift
public var waypoints: [CLLocationCoordinate2D]
-
Flag checking if route is followable. Set to false by default.
Declaration
Swift
public var isFollowable: Bool
-
Reachable distance.
Declaration
Swift
public var reachableDistance: Measurement<UnitLength>?
-
Instructions that needed for complex camera behaviour.
Declaration
Swift
public var instructions: [RouteInstruction]
-
Departure coordinate of the route. If no departure is explicitly set, this contains the first element in the coordinate array.
Declaration
Swift
public var departure: CLLocationCoordinate2D? { get }
-
Destination coordinate of the route. If no destination is explicitly set, this contains the last element in the coordinate array.
Declaration
Swift
public var destination: CLLocationCoordinate2D? { get }