Optimizing Matrix Calculation by Limiting a Search Range
- Last UpdatedDec 16, 2024
- 2 minute read

In cases where only destinations in a specific range are relevant, you can optimize the matrix calculation
by limiting the search range. To limit the search range, include a
searchrange
parameter with a desired value in the
calculatematrix
request. Calculation of routes to destinations which
are beyond the specified range will be interrupted at certain point and the corresponding
MatrixEntry
elements in the response will include the
Status
field with a rangeExceeded
value instead of
Summary
.
The following example demonstrates a request of a matrix of routes between two start
points and two destinations with a search range limited to 5 kilometers. Both
destinations are beyond the first start point range. Note that the corresponding matrix
entries in the response include the Status
field with
a rangeExceeded
value.
Response: