🗺️

Pest Control Route Optimization

One click reorders your stops by shortest drive. Print route sheets, then watch your whole fleet move live on a real-time dispatch map.

What route optimization covers

Every capability below is grounded in verified code — no marketing copy without a file path behind it.

Google Maps Directions Engine
Uses Google Maps DirectionsService with optimizeWaypoints: true and DRIVING travel mode to reorder your stops by shortest total drive.
One-Click Route Reorder
Hit "✨ AI Optimize Route" and Bug HQ resequences every stop in driving order — no manual drag-and-drop required.
Per-Stop Drive Time
Each stop shows the drive time from the previous stop, pulled from Google Maps leg.duration.text, so techs know exactly when to leave.
Route Summary Stats
Total stops, total miles, and total drive time display at the top of every route view so you can see the day at a glance.
Per-Technician Route Filter
Switch between "All Techs" or a single technician. Optimize and view each tech's route independently.
Live Dispatch Map
A full-screen dispatch map at /office/schedule/map shows every tech's real-time position via Supabase Realtime, speed in mph, and today's job pins.
Printable Route Sheet PDFs
Generate a printable PDF grouped by technician — stop number, scheduled time, customer name, address, phone, and service type per stop.
Traffic Layer and Satellite View
Toggle traffic conditions and switch between roadmap and satellite on the live dispatch map to spot slowdowns before they hit your team.
Deep dive

The live dispatch map: your fleet, right now

Route optimization tells your technicians where to go. The live dispatch map tells you whether they got there.

Bug HQ’s live dispatch map lives at /office/schedule/map — a full-screen view separate from the scheduling calendar. It subscribes to the technician_locations table via Supabase Realtime. That means positions update continuously as techs move, live as the database row changes.

Each technician marker shows current speed in mph and a last-updated timestamp. All eight technician colors are distinct, so you can track six techs at once without confusing their pins. Today’s jobs — both inspections and work orders — appear as location pins on the same map, so you can see how close a tech is to their next stop without calling them.

The map includes a traffic layer toggle and a roadmap/satellite switch. When there’s an accident on the highway between a tech and their next stop, you can see it on the same screen. You can call the tech, suggest an alternate route, and update the schedule — all without the tech ever stopping.

Combined with route sheet PDFs — which include stop number, scheduled time, customer address, phone number, and service type — you have a complete dispatch loop: optimize in the morning, print sheets for the field, monitor live all day. No GPS hardware or third-party tracking service required — technician location tracking is built into Bug HQ.

How it works

1

Build the schedule normally

Add jobs to technician calendars the same way you always do — by day, by tech, using the scheduling page. Route optimization is a separate step you run when you're ready, not something that interferes with how you schedule.

2

Click Optimize Route

Open the route view, select a technician, and click "✨ AI Optimize Route." Google Maps DirectionsService calculates the most efficient stop order and resequences the list immediately. Total miles and drive time update in the stats bar.

3

Dispatch and track live

Print route sheets for each tech or send them off with the app. Open the live dispatch map and watch real-time GPS positions update as your team moves — speed, heading, and color-coded pins for every active job.

Who uses this

Operations Manager

Runs route optimization for all six techs each morning before dispatch, prints route sheets, then monitors the live map to catch delays before customers call.

Lead Technician

Checks the optimized stop order before leaving the shop. Knows the drive time to each stop so they can pace the day and flag if the last stop is unreachable before close.

Owner

Reviews total-miles-per-tech in the route stats to spot inefficient territory overlap and realign zones before the next week's scheduling cycle begins.

What this looks like in your day

It’s 7:45 a.m. You have five techs heading out in the next hour. You open the schedule, switch to route view, and filter to the first tech. You click “✨ AI Optimize Route.” The stop list reorders — the two jobs on the east side of town shuffle to the front, shaving 12 miles off the day. You check the stats bar: 9 stops, 41 miles, 1 hr 22 min of drive time. You print the route sheet and hand it to the tech on their way out the door.

You repeat for the other four. By 8:15 everyone is dispatched. You open the live dispatch map. Five colored dots are moving south on the interstate. You can see speeds — 67, 72, 64 mph. Around 10:30, a customer calls asking for an ETA on their tech. You check the map: the tech just finished stop three and is heading to stop four, three blocks away. “About eight minutes,” you tell the customer. You didn’t have to call anyone.

Frequently asked questions

Is route optimization automatic, or do I have to trigger it?

Manual trigger. Open the route view, select a technician, and click "✨ AI Optimize Route." There is no nightly automatic reorder — you control when routes are optimized. This means you can make last-minute schedule changes first, then optimize once the day is locked.

How many stops can it handle in one route?

Route optimization handles standard daily route sizes for residential and commercial pest control operations. For unusually large routes — multiple full-day territories merged into one — split into morning and afternoon batches and optimize each pass separately.

Can I see where my technicians are right now?

Yes. The live dispatch map at /office/schedule/map shows every technician's real-time position using Supabase Realtime — positions update continuously as techs move. Each marker displays current speed in mph, last-update time, and is color-coded by technician.

Can I print the optimized route for a technician?

Yes. The /api/pdf/route-sheet endpoint generates a PDF grouped by technician. Each stop includes: stop number, scheduled time, customer name, address, phone number, service type, notes, and job status. The PDF is built server-side using Puppeteer.

Can I optimize routes for one technician without affecting the others?

Yes. Use the technician filter dropdown to select one tech, optimize their route, then switch to the next. Each optimization is independent — reordering one tech's stops has no effect on other technicians' schedules.

Optimize routes and track your team live

Free 14-day trial. Credit card required — cancel free anytime before trial ends. Setup in under an hour.

Get Started →