Matrix

Computes distances and durations between origin-destination pairs, and returns the resulting distances in meters and durations in seconds.

  • A tuple type representing the matrix session that was generated from the request.

  • A closure (block) to be called when a matrix request is complete.

  • The Authorization & Authentication credentials that are used for this service.

    If nothing is provided, the default behavior is to read credential values from the developer’s Info.plist.

  • The shared matrix object.

    To use this object, a Mapbox access token should be specified in the MBXAccessToken key in the main application bundle’s Info.plist.

  • Creates a new instance of Matrix object.

  • Begins asynchronously calculating matrices using the given options and delivers the results to a closure.

    This method retrieves the matrices asynchronously from the Mapbox Matrix API over a network connection. If a connection error or server error occurs, details about the error are passed into the given completion handler in lieu of the contours.