Routing API Developer's Guide

Optimizing Matrix Calculation by Limiting a Search Range

In cases where only destinations in a specific range are relevant, the matrix calculation may be optimized 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 specifed range will be interrupted at certain point and the corresponding MatrixEntry elements in the respone 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 entires in the resposne include the Status field with a rangeExceeded value.

https://matrix.route.cit.api.here.com/routing/7.2/calculatematrix.json
?app_id={YOUR_APP_ID}
&app_code={YOUR_APP_CODE}
&start0=52.43,13.4
&start1=52.5,13.4
&destination0=52.5,13.43
&destination1=52.5,13.46
&mode=fastest;car;traffic:disabled
&searchrange=5000

Response:

{
  response: {
  metaInfo: { /*content omitted*/ },
  matrixEntry: [
    {
    startIndex: 0,
    destinationIndex: 0,
    status: "rangeExceeded"
    },
    {
    startIndex: 0,
    destinationIndex: 1,
    status: "rangeExceeded"
    },
    {
    startIndex: 1,
    destinationIndex: 0,
    summary: { costFactor: 1020 }
    },
    {
    startIndex: 1,
    destinationIndex: 1,
    summary: { costFactor: 1314 }
    }
  ]
  }
}

You cannot use this account to purchase a commercial plan on Developer Portal, as it is already associated to plans with different payment methods.

To purchase a commercial plan on Developer Portal, please register for or sign in with a different HERE Account.

Something took longer than expected.

The project should be available soon under your projects page.

Sorry, our services are not available in this region.

Something seems to have gone wrong. Please try again later.

We've detected that your account is set to Australian Dollars (AUD).
Unfortunately, we do not offer checkouts in AUD anymore.
You can continue using your current plan as normal, but to subscribe to one of our new plans,
please register for a new HERE account or contact us for billing questions on selfservesupport@here.com.