maps · ecowell · testing

Multi-Stop Routes in Google Maps Without Paying for an API

2 December 2026 · 2 min read

A field technician has a list of customers to visit today. What they want is simple: tap once and have turn-by-turn navigation start. We did not need maps embedded in our app, and we did not need a paid maps SDK for this. Google Maps already supports a documented URL scheme that opens the Maps app with directions. We just had to build the right URL.

A rabbit courier holds a map with a route through five stops

The URL

https://www.google.com/maps/dir/?api=1
  &origin=...&destination=...
  &waypoints=stop2|stop3|stop4
  &travelmode=driving

Each stop is either coordinates (12.9716,77.5946) or the raw address text. Coordinates are precise; an address is a fallback that Google resolves itself.

The catch: waypoints are limited

Google Maps accepts a limited number of intermediate waypoints per link (we use 9). A busy day can have more stops than origin + 9 + destination = 11. If you just cut the list at 11, the technician silently loses the rest of their day.

The fix: overlapping legs

We split the day into consecutive legs and let the last stop of one leg be the first stop of the next:

Stops: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Leg 1:  1 ................... 11
Leg 2:                        11 ........ 15

The overlap is the important detail. Without it, the technician finishes leg 1 and leg 2 starts somewhere they are not. With it, “Next leg” starts exactly where they are standing. The core loop is only a few lines:

for (let start = 0; start < usable.length;) {
  const end = Math.min(start + maxStops, usable.length);
  const points = usable.slice(start, end);
  // build one URL from points[0] to points.at(-1), middle points as waypoints
  if (end === usable.length) break;
  start = end - 1;          // overlap: reuse the boundary stop
}

Stops with no usable location

Some customers have no address coordinates and no address text. We do not drop them quietly. Each leg reports which stop indices were unmapped, so the app can show “2 stops have no address” instead of pretending the route is complete.

Single stop, single tap

For one customer we build a Google Maps search link, so “Navigate to customer” is one button.

Why this is the right size of solution

  • Zero cost, zero key, zero quota. Nothing to rotate, nothing to bill.
  • Native navigation. The technician gets live traffic and voice guidance for free, from an app they already trust.
  • Easy to test. The function is pure: stops in, URLs out. We test the leg splitting at the boundaries (exactly 11 stops, 12 stops, missing coordinates) without ever calling Google.

The trade-off: we do not learn how long the route is from a URL. That needs the Routes API, which is the subject of the next post.

Takeaways

  1. Before reaching for a maps SDK, check whether a URL does the job.
  2. When a provider has a hard limit, chunk with overlap so no item is lost.
  3. Make “this stop is unmapped” visible. Missing data should be reported, not skipped.
  4. Pure functions that return URLs are easy to test without network access.

AI use: Written with AI assistance from my own notes and project facts, then reviewed by me. Images are AI-generated. How I use AI

Loading reactions…

Working on something similar? Let's talk.

Same problem, a question about this article, a collaboration, or an open-source project you would like me to contribute to. Pick whichever door you like: