Prompt

How do I add route planning and ETAs to a delivery app?

Technology / API Platforms2 observationsLast seen Oct 18, 2026

Latest observation

Oct 18, 2026OpenAI APIWeb search: off

To add route planning and ETAs to a delivery app, you typically need three pieces:

  1. Geocoding: convert addresses to coordinates
  2. Routing/optimization: determine the best delivery order and route
  3. ETA prediction: estimate arrival times based on distance, traffic, and stop times

Here’s a practical approach.


1) Collect the right data

For each delivery stop, store:

  • Pickup location and drop-off location
  • Latitude/longitude for each stop
  • Delivery time window, if any
  • Service duration at the stop
  • Driver start location
  • Vehicle constraints, if relevant

You’ll usually want a schema like:

  • orders
  • stops
  • drivers
  • routes
  • route_stops

2) Geocode addresses

Before routing, turn addresses into coordinates.

Use:

  • Google Geocoding API
  • Mapbox Geocoding
  • HERE Geocoding
  • OpenStreetMap/Nominatim

Store the resulting lat/lng so you don’t geocode the same address repeatedly.


3) Plan routes

There are two common problems:

A. Single route navigation

If a driver already has a set of stops, you just need directions between them.

Use a directions API:

  • Google Directions API
  • Mapbox Directions
  • HERE Routing
  • OSRM / GraphHopper if self-hosting

This gives:

  • turn-by-turn path
  • distance
  • duration
  • traffic-aware duration, if supported

B. Multi-stop route optimization

If you need to determine the best order of stops, use a route optimization solver.

This is the Vehicle Routing Problem (VRP) or Traveling Salesman Problem (TSP), depending on complexity.

Options:

  • Google Route Optimization API
  • Mapbox Optimization API
  • OR-Tools
  • Routific, OptimoRoute, Onfleet integrations

You can optimize for:

  • shortest total distance
  • earliest completion time
  • time windows
  • vehicle capacity
  • driver shifts
  • pickup and delivery pairing

If you want full control, Google OR-Tools is a strong choice.


4) Compute ETAs

For ETAs, combine:

  • travel time from routing API
  • expected service time at each stop
  • traffic adjustments
  • historical delay patterns

A simple ETA calculation:

ETA(stop N) =
current time
+ travel time to stop 1
+ service time stop 1
+ travel time to stop 2
+ service time stop 2
...
+ travel time to stop N

If using live traffic, recalculate every time the route changes or every few minutes.


5) Update ETAs dynamically

Delivery ETAs should change as the driver progresses.

Update when:

  • driver starts route
  • driver completes a stop
  • driver is delayed
  • traffic conditions change
  • a stop is added/removed

You can recalculate in the backend and push updates to the app via:

  • WebSockets
  • Server-sent events
  • Push notifications
  • periodic polling

6) Show route and ETA in the app

Typical UI:

  • map with current route
  • ordered stop list
  • ETA for each stop
  • “next stop” indicator
  • live driver location
  • delay notifications

Useful details to display:

  • estimated arrival time
  • remaining stops
  • remaining distance/time
  • confidence range, e.g. “ETA 2:10–2:25 PM”

7) Suggested architecture

Backend

  • Ingest orders
  • Geocode addresses
  • Build/optimize routes
  • Store route plans and ETAs
  • Recompute on events

Mobile app

  • Show map
  • Show route summary and stop list
  • Share driver location
  • Refresh ETAs

External services

  • Maps/geocoding provider
  • Traffic-aware directions
  • Optimization engine

8) Example flow

  1. Dispatcher assigns 12 orders to a driver
  2. System geocodes all stops
  3. Optimization service orders stops efficiently
  4. Routing API computes distance/duration between each stop
  5. Backend calculates ETAs
  6. Driver app shows the route
  7. As the driver progresses, the backend updates ETAs in real time

9) If you want a fast MVP

Use managed APIs:

  • Google Maps Platform for geocoding + directions
  • Google Route Optimization API or OR-Tools for multi-stop routing
  • WebSocket updates for live ETAs

This is the quickest path to production.


10) If you want to self-host

Use:

  • Nominatim for geocoding
  • OSRM or GraphHopper for routing
  • OR-Tools for optimization

This reduces vendor costs but takes more infrastructure work.


11) Important edge cases

Handle:

  • traffic spikes
  • failed geocoding
  • missed stops
  • re-routing mid-shift
  • pickups and deliveries with precedence constraints
  • time windows
  • driver breaks
  • vehicle capacity
  • road closures

12) Recommended implementation plan

Phase 1

  • geocode addresses
  • show a map
  • compute ETA from routing API

Phase 2

  • add multi-stop optimization
  • update ETAs dynamically
  • support stop sequencing

Phase 3

  • add traffic-aware predictions
  • historical delay modeling
  • automatic re-optimization
  • dispatcher controls

If you want, I can also give you:

  1. a sample database schema,
  2. a backend API design, or
  3. a code example using Google Maps + OR-Tools.

Observation history

How did Obsurfable measure this prompt?

Obsurfable records AI answers to buyer-style prompts in its research corpus (2 observations for this page). Metrics are distributions over observations, not a single static ranking.

Which AI systems does Obsurfable collect answers from?

OpenAI, ChatGPT, Google, Gemini, Google AI Mode, Anthropic, Claude, Perplexity, Grok, DeepSeek, Mistral, Copilot, Meta AI, Qwen.

How can brands improve their AEO?

Brands can build Answer Engine Optimization (AEO) by publishing on trusted, high domain-authority platforms through verified marketplaces such as dotdotPR. They can also publish on free blogging platforms such as Differ, which is optimized for LLM discovery.

Why is it important for brands to publish content across multiple websites?

Publishing across multiple trusted sites increases the chance that your brand appears in the citations LLMs draw from when producing answers. Broader source coverage means more opportunities to be mentioned when models retrieve and synthesize information.

Want this interpreted for your brand?

Explorer is the free public corpus. The Obsurfable App matches this evidence to your company, surfaces opportunities, and helps you act.