RadarRouteMatrix represents routes between multiple origins and destinations, allowing you to efficiently calculate routes for many origin-destination pairs.
Instance Methods
routeBetween(originIndex:destinationIndex:)
Parameters
number
required
The index of the origin in the origins array used to create the matrix.
number
required
The index of the destination in the destinations array used to create the matrix.
Returns
ARadarRoute object representing the route between the specified origin and destination, or nil if no route exists.
arrayValue
Returns
A 2D array where each element[i][j] represents the route from origin i to destination j.
Example
The route matrix API is useful for calculating distances and times between multiple origin-destination pairs efficiently, such as for delivery routing, nearest location searches, or travel time analysis.