Route Lab · from my flutterCon India 2026 talk

Plan a delivery route the way a rider app does.

Drop pickups and drops on the city. The optimiser is the one from my talk: nearest allowed stop first, a drop only after its pickup, then an Or-opt pass. Then the rider rides the roads, over the bridges and across the railway, not the straight line.

PARKPARKCREEKRAILWAYHUBP14D16P22D28P37D310P43D49P51D55

Tap a street corner to place a pickup, then its drop. Tap any stop to remove its parcel.

Optimised ride
9.5 km
about 32 min at 18 km/h
Saved by the order
57%
9.5 km vs 22.0 km in order
Road vs straight line
+23%
why a ruler line is useless here
Delivered this lap
0/5
1 routing call for the whole ride
HUB→P5→P2→P4→P1→D5→D1→P3→D2→D4→D3

The app never decides

In the rider app the phone asks the backend for its list and draws whatever comes back. Today a hub manager sets the order; the optimiser is moving to the backend, so heavy work stays off three-year-old Androids and the rules change without a Play Store release. Here it runs in your browser so you can watch it.

Greedy, improve, draw

Nearest allowed stop, repeated, gets a decent order fast. Or-opt then lifts runs of one to three stops and tries them everywhere else, keeping any move that shortens the ride without breaking pickup before drop. One routing call draws the whole sequence.

The route is a nice to have

Turn on “Signal lost”. The rider keeps going and the map falls back to a dotted direct line with one small message, because the delivery matters more than the polyline. A blank map on a timeout makes the wrong thing important.

The other half of the talk

What would Google Maps cost your rider app?

The paid product is good: tiles, routing and geocoding in one package, with support behind it. The catch is the shape of the bill. It grows with riders and minutes on the road, not with revenue, and in logistics the margin per delivery is thin.

80
35
30
2
2
1

Google Maps Platform, list price, every month

$2,103

about ₹1.81 lakh a month · 84K deliveries

  • Dynamic Maps (map loads)$1,011

    168K events, first 10K free

  • Routes API$722

    168K events, first 10K free

  • Geocoding$370

    84K events, first 10K free

The bill as you add riders
$0$3,000$6,0000100200 riders

List prices from Google Maps Platform’s pricing page, checked September 2026. Each SKU gets 10,000 free events a month (the $200 monthly credit ended on 1 March 2025). Then per 1,000: Dynamic Maps $7.00, Routes $5.00, Geocoding $5.00, falling at 100K, 500K and 1M events. Past 5M it is negotiated. There is no hard cap: you get billing alerts, not a stop. Rupees at ₹86 to the dollar. Check the current pricing before you decide anything.

The other way

flutter_map for the map, OpenStreetMap for tiles, OSRM for roads, and a backend for geocoding and stop order. The bill becomes a server. The trade is that you own the uptime, and free tiles come with rules: name your app in the User-Agent, cache for at least 7 days, show the credit, and expect the public servers to say no to heavy commercial use. At scale you host those too.

Questions people ask

How much does Google Maps cost for a delivery app?+

At list price, a rider app with 80 riders doing 35 deliveries a day each, with two map loads, two route calls and one geocode per delivery, makes about 84,000 deliveries a month and pays roughly $2,103 a month to Google Maps Platform. Each SKU gets 10,000 free events a month; the old $200 monthly credit ended on 1 March 2025. The calculator above lets you put in your own numbers.

How do you optimise the order of pickups and drops?+

It is the pickup and delivery problem, a cousin of the travelling salesman. Start from the rider, take the nearest stop that is allowed (a drop only after its pickup), repeat until every stop is placed, then run an Or-opt pass that tries moving each run of one to three stops to a better place in the sequence. One routing call then fetches the road geometry for the whole sequence.

Can I build a delivery map in Flutter without Google Maps?+

Yes. flutter_map draws the map, OpenStreetMap provides tiles (with a User-Agent, a cache of at least 7 days and visible attribution), OSRM gives real road routes, and a backend decides the heavy things like geocoding and stop order. This is the stack in my flutterCon India 2026 talk.

Built by Zaid Sayyed. Building a map-heavy app in Flutter? Tell me about it.