Skip to main content
RadarRouteMatrix represents routes between multiple origins and destinations, allowing you to efficiently calculate routes for many origin-destination pairs.

Instance Methods

routeBetween(originIndex:destinationIndex:)

Returns the route between the specified origin and destination.

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

A RadarRoute object representing the route between the specified origin and destination, or nil if no route exists.

arrayValue

Converts the route matrix to a 2D array representation.

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.

See Also