Class

DistanceMatrixService

DistanceMatrixService

For creating distance matrix between the origins and destinations.

Methods

# async static getDistanceMatrix(args) → {Promise:.<DistanceMatrixResult:>}

Returns a matrix of distances and travel times between the origins and destinations.
Parameters:
Name Type Attributes Description
args Object
graphId string Id of the network graph to use for the calculation.
origins Array:.<string:> List of origins 'latitude,longitude,floor' pairs seperated by |
destinations Array:.<string:> List of destinations 'latitude,longitude,floor' pairs seperated by |
travelMode string <optional>
Which form of transportation should be used.
avoid string <optional>
Specify highway types to avoid. Supported types are: `steps`
avoidHighwayTypes Array:.<string:> <optional>
Specifies which highway types to avoid in the route. If a highway type is specified in the `avoidHighwayTypes` array, the service will try to calculate a distance matrix that minimizes the use of these types of highways.
excludeHighwayTypes Array:.<string:> <optional>
Specifies which highway types to exclude from the route. If a highway type is specified in the `excludeHighwayTypes` array, the service will calculate a distance matrix that does not include these types of highways at all.
userRoles Array:.<string:> <optional>
List of app user roles.
Promise:.<DistanceMatrixResult:>