Should I use Routing or Matrix?
Short answer: Routing returns a path. Matrix returns a cost table. If you’re discarding the path and reading onlyduration, you asked the wrong question.
One rule
The arithmetic
An n×m cost table costs n·m routing calls or 1 matrix call. A 20-depot, 500-stop assignment problem is 10,000 calls or 1. That’s a complexity difference, not a rate difference. No pricing negotiation closes it.Where the loop hides
- Nearest-driver assignment — one call per available driver
- Store locator ranking — one per candidate store
- Territory design — one per rep-base × unit centroid
- Delivery zone economics — one per zone per candidate
- Freight rating — one per lane, per quote, uncached
- Site selection — one per demand cell per candidate
Why the mistake is systemic, not careless
Routing is discoverable first. It’s what you reach for when you need a travel time. The loop works. Correct answers. No error, no warning, no degradation. The failure is asymptotic. At five stops it’s imperceptible. Growth rates are invisible in a code review of the diff that introduced them. Matrix is async at scale. Submit-poll-retrieve is more code and more state. Engineers optimizing for the shortest path to a green test choose synchronous. The response shape is unfamiliar. Flat, row-major arrays —travelTimes: [73, 1231, 983, 400] for a 2×2 — not nested objects.
None of these are unreasonable. Naming the pattern explicitly in your architecture review is worth more than any amount of documentation.
The inverse error
Matrix returns no geometry. If a driver follows it, you needed Routing.Size ceilings vary by mode
Common misconceptions
“I’ll parallelize the loop.” You’ve converted a cost problem into a429 problem.
“Matrix is only for huge problems.”
A 1×10 store ranking is one matrix call instead of ten routing calls. The ratio holds at every scale.
“The flat array is just a format detail.”
Index it wrong and you get a silently transposed matrix. Every travel time is plausible. Every assignment is wrong. Nothing throws.
Related
Routing vs Matrix
The full decision tree, and the indexing helper you write once.
Matrix Routing
Modes, async lifecycle, per-cell error codes.
Distance Matrix
Working code, with the indexing helper.
Fleet Routing
Where the matrix feeds the solver.
Need production HERE API keys or implementation support? Placematic is an official HERE Technologies reseller and implementation partner. Talk to us.