MatrixOptions
public class MatrixOptions : Codable
extension MatrixOptions: Equatable
Options for calculating matrices from the Mapbox Matrix service.
-
Initializes a matrix options object for matrices and a given profile identifier.
sourcesanddestinationsshould not be empty, otherwise matrix would not make sense. Total number of waypoints may differ depending on theprofileIdentifier. See documentation for details.Declaration
Swift
public init(sources: [Waypoint], destinations: [Waypoint], profileIdentifier: ProfileIdentifier)Parameters
sourcesAn array of
Waypointsobjects representing sources.destinationsAn array of
Waypointsobjects representing destinations.profileIdentifierA string specifying the primary mode of transportation for the routes.
-
A string specifying the primary mode of transportation for the contours.
Declaration
Swift
public var profileIdentifier: ProfileIdentifier -
An array of
Waypointsobjects representing locations that will be in the matrix.Declaration
Swift
public var waypoints: [Waypoint] { get } -
Attribute options for the matrix.
Only
distanceandexpectedTravelTimeare supported. EmptyattributeOptionswill result in default values assumed.Declaration
Swift
public var attributeOptions: AttributeOptions -
Declaration
Swift
public func encode(to encoder: Encoder) throws -
Declaration
Swift
public required init(from decoder: Decoder) throws
-
An array of URL query items (parameters) to include in an HTTP request.
Declaration
Swift
public var urlQueryItems: [URLQueryItem] { get } -
Declaration
Swift
public static func == (lhs: MatrixOptions, rhs: MatrixOptions) -> Bool
Install in Dash
MatrixOptions Class Reference