There is a question I get asked almost every time I talk about maps in backend systems:
"Why not just use Google Maps?"
And honestly? For most teams, that is exactly the right call. Google Maps is incredible. Use it. Ship fast.
But here is the thing nobody tells you upfront: at a certain point, the map stops being a feature and starts being the product itself.
And that changes everything.
The Day The Map Becomes The Business
Picture a food delivery app doing 50,000 orders a day.
Riders are on bikes, not cars. Half the deliveries are inside gated societies. Restaurants are in malls with three different pickup gates. And every minute of delay hits the P&L.
Now ask yourself:
Is the standard Google Maps directions API built for that world?
It is built for you trying to find a Starbucks.
That is not a knock on Google Maps. It is just the wrong tool for the job.
Generic maps are built for general navigation. Delivery routing is built for business outcomes. Those two things sound similar, but they are fundamentally different problems.
What Goes Wrong At Scale
When you first build with a map provider directly, the architecture is beautifully simple:
text1Customer App / Rider App -> Google Maps API -> Route + ETA
Clean. Fast to build. Totally reasonable.
Then the cracks start showing.
The route is correct for a car but a disaster for a delivery bike. The ETA does not account for the 4-minute wait at Gate 2 of every housing society in South Delhi. The map does not know about the shortcut through the market that every experienced rider takes. The pickup pin drops the rider at the wrong entrance of the mall and now there is a customer support ticket.
Each of these individually is a minor annoyance.
Collectively, at scale, they become operational bleeding.
- Wrong ETA -> delayed delivery -> bad rating
- Bad pickup point -> rider calls customer -> cancellation
- Inefficient route -> more fuel, more time, lower earnings
- Wrong distance calculation -> pricing errors
Suddenly the routing system is not just a feature.
It is a source of business pain.
And that is when the engineering conversation changes.
What A Custom Routing Layer Actually Looks Like
Let me be clear: nobody builds their own Google Maps.
That would be insane.
What delivery companies build is an intelligence layer on top of existing map data.
The distinction matters.
text1OpenStreetMap / Base Map Data 2 -> Road Graph Builder 3 -> Fleet GPS Data 4 -> Correction Layer 5 -> Routing Engine 6 -> ETA Model 7 -> Navigation API
The base map still exists. The roads are still roads.
But now there is a layer sitting on top that says:
Yes, this road exists, but should this rider take it right now?
That second question is where the real work lives.
The Four Data Sources That Make It Smart
A delivery routing system becomes useful when it stops treating the map as the only source of truth.
At scale, the best signal comes from combining public map data, fleet movement, delivery outcomes, and operational corrections.
1. Public Map Data
Your starting point.
OpenStreetMap, or a licensed provider, gives you the road graph: nodes, intersections, edge distances, and one-way rules.
It is necessary but not sufficient.
Think of it as the skeleton. The rest is what gives it muscle.
2. Fleet GPS Pings
This is where it gets interesting.
Every rider app pings GPS continuously. At any real scale, that is millions of data points per hour.
Hidden inside all that data is ground truth about how roads actually work.
- Riders consistently taking a shortcut the map does not know about
- A road marked open that nobody ever uses, probably because it is actually blocked
- A particular turn that always adds two minutes
- Bikes moving significantly faster than cars on certain stretches
Over time, this becomes private intelligence.
Google Maps knows the world broadly.
You know your delivery network deeply.
That is a real advantage.
3. Delivery Outcomes
GPS tells you movement.
Outcomes tell you whether it worked.
Did the delivery complete on time? Did the rider call the customer, which is usually a bad sign? Did the order get cancelled? Was the actual travel time 40% higher than estimated?
This feedback loop is how you improve ETA models beyond just:
text1distance / average speed
4. Manual Corrections
Some things algorithms cannot figure out alone.
Society Gate 2 is the right entrance. The pickup zone at that mall is behind the building, not at the main entrance. This road is technically open but effectively impassable during monsoon. The apartment tower on that street has two buildings with the same address.
Operations teams know these things.
Building tools for them to encode that knowledge into the system, and then letting the data learn from it, is underrated engineering work.
The Bike Problem
A car and a delivery bike do not experience the same city.
Cars avoid narrow lanes. Bikes prefer them. Bikes can squeeze through shortcuts that are physically impossible for cars. Delivery riders care about the fastest path to a gate, not a comfortable driving experience. Parking means something completely different.
Using the same routing algorithm for both is lazy design.
A proper routing layer stores metadata on every road edge:
yaml1from: A 2to: B 3distance_meters: 400 4avg_speed_kmph: 22 5allowed_vehicle_types: [bike, scooter] 6is_shortcut: true 7is_blocked: false 8confidence_score: 0.91 9historical_delay_seconds: 45
Now the routing engine can make actually different decisions for different vehicle types.
A car skips the shortcut. A bike takes it.
Both get the right answer.
Why Not Just Stay On Google Maps Forever?
There are five reasons companies eventually make the switch.
Control
When routing is core to your business, you cannot afford to be blocked by a third-party API's design decisions.
You need to add bike-specific rules, merchant-specific pickup logic, and society-specific entry points.
A generic API was not built for your edge cases.
Cost
Every route request, every distance matrix call, and every autocomplete event has a price.
At millions of deliveries, even tiny per-call costs compound into something real.
After a certain scale, owning parts of the stack makes economic sense.
ETA Is A Marketplace Problem
Generic ETA is "distance over speed."
Real ETA is distance plus rider behavior, restaurant prep time, parking time, society entry delay, time-of-day effects, demand surge, and the fact that Tuesday evenings at that specific restaurant always run 8 minutes late.
You cannot buy that model.
You build it.
Last-Mile Accuracy
Almost all delivery failures happen in the final few hundred meters.
This is where generic maps are weakest.
Wrong gate. Wrong tower entrance. Wrong floor.
These seem like small problems until you are handling the support tickets.
Competitive Moat
After millions of trips, you have private knowledge about your cities.
Which shortcuts work. Which ETAs are always wrong. Which merchants have chaotic pickup flow. Which localities run late on weekends.
This data does not exist anywhere else.
It came from your operations.
The Build Vs. Buy Decision
Here is the thing I want to be honest about:
Most teams should not build this.
Not because it is too hard.
Because building it before you need it is a waste of engineering capital that could be used to actually grow the business.
The practical path looks more like this:
| Stage | What You Do |
|---|---|
| 1 | Use Google Maps or similar. Move fast. |
| 2 | Start storing GPS traces and delivery outcomes. |
| 3 | Build internal ETA correction models. |
| 4 | Add manual map corrections via an ops dashboard. |
| 5 | Build custom routing for bike vs. car. |
| 6 | Move to an internal routing engine for high-scale cases. |
You do not jump from Stage 1 to Stage 6.
Each transition is justified by business pain, not engineering ambition.
The question to ask is:
Is routing a feature, or is routing the business?
If it is a feature, use an API.
If it is the business, you will eventually need to own it.
That last part, the reason, is important.
A good routing system should not just give you an answer. It should be auditable.
Why did it choose this road? Why did it skip that shortcut? Why is the ETA 18 minutes and not 12?
Prototype Architecture
The architecture looks like this:
text1Rider App -> GPS Ping API -> Fleet Pipeline -> Speed Aggregator -> ETA Model 2 3Operations Dashboard -> Map Correction API -> Correction Store 4 5Open Map Data -> Road Graph Builder -> Corrected Road Graph 6 | 7 v 8 Routing Engine 9 | 10 v 11 Route API 12 | 13 v 14 Customer App / Rider App
The graph keeps learning.
Real movement corrects the model.
Manual fixes fill the gaps algorithms cannot see.
The Actual Lesson
The best routing systems are not map systems.
They are feedback systems.
They observe the real world, compare their predictions against outcomes, and continuously correct themselves.
That is the design principle that makes them valuable.
Not the algorithm. Not the map data. Not the infrastructure.
The routing layer is where engineering meets operations.
It is where the gap between "what the map says" and "what actually happens" gets closed, one data point at a time.
Start with maps.
Get scale.
Then build the intelligence.
That is the real arc.
I am building fleetnav-go to explore these ideas further. I will write more as the prototype takes shape.

