All apps

§ App / Fleet Optimizer

Check and solve a Google Route Optimization scenario with unmap

How the unmap Fleet Optimizer is put together: open a Route Optimization request file, see which fields unmap supports, solve it on Canadian roads, and review the plan on a map and a timeline.

Fleet Optimizer is for teams that already plan routes with Google Maps Platform Route Optimization. Open the request file your code sends, or the ZIP that Google's Fleet Routing App exports, and see at once what unmap supports. Then solve the scenario with the Optimize API and review the plan: which vehicle takes which shipment, in what order, with the schedule and the distances on a live map. It runs at apps.unmap.dev/fleet-optimizer, and its source is a standalone Next.js project you can clone and run with your own key.

Your file stays in your browser. It is read on the page and sent only to api.unmap.dev, to check it and to solve it, and nothing is stored. The scenarios it opens on are samples written by unmap. unmap is not affiliated with or endorsed by Google; Google Route Optimization is named only to say which request files the app reads.

What it does

  • Open a scenario: a .json file with one request, a .zip from the Fleet Routing App with scenario.json and, when you have it, solution.json, or one of three bundled samples (last-mile deliveries in Calgary, field service with breaks in Ottawa, a pickup and delivery courier in Montréal).
  • Check it, free: the request is sent with VALIDATE_ONLY, and a compatibility report says whether it is ready, needs changes or is out of reach. Every refused field is listed with its path, unmap's message and its code. Fields unmap accepts but ignores are listed as warnings.
  • Remove what is not supported yet: fields refused with FIELD_NOT_SUPPORTED_YET can be removed in one step, and the request is checked again. Anything else, such as a place ID or a malformed value, stays blocking and the report says what to change in the file. Once fields are removed, every result view and the downloaded scenario.json carry the removed paths. Your original file is never changed.
  • Solve settings: a timeout, the search mode, and road or straight-line travel. Straight line is forced, with a notice, when a stop lies outside Canada, where road travel ends.
  • The plan: one colour per vehicle on the map, numbered stops and depots, a timeline of each vehicle's visits, travel, waiting and breaks, the total cost and each cost component, and the shipments that were skipped with their reasons.
  • Compare with Google's plan: when the upload included solution.json, the two plans sit side by side. They were built on different travel times, so the view says so and does not name a winner.
  • Download: unmap's response as JSON, or a ZIP the Fleet Routing App can open.

What it costs in API calls

A check is free: VALIDATE_ONLY solves nothing and is never billed. A solve is billed for the shipments it performs, and the totals show that count. Checking again after removing fields is another free call. Loading a file, changing settings and downloading call nothing.

The hosted app uses its own key on the Hobby plan, so it solves up to 25 shipments and 5 vehicles. A larger scenario can still be checked; solve is off and the counts are shown. Clone the app and use your own key to get your plan's limits.

Built from the registry, unmodified

The map, the route lines and the stop popups are registry items copied in unmodified, and the app's own code calls the API only through @unmap/sdk. Installing the same pieces into your project is one command:

npx @unmap/cli add map route-line marker-popup

Reading a file, building the report, removing fields, applying the settings and summarizing a plan are plain TypeScript with no React in them (lib/scenario and lib/plan), unit-tested and easy to lift into your own app.

What it does not do

  • Edit the scenario. You can change the solve settings; shipments and vehicles are changed in the file.
  • Re-evaluate Google's plan on unmap's travel times. That needs injected solutions, which are not supported yet.
  • Travel by road outside Canada, or look up place IDs. Both are reported, not worked around.
  • Remove fields that change the problem itself. Only fields not supported yet can be removed.
  • Save anything. There are no accounts and no stored scenarios; everything stays in the browser.

Run it yourself

You need Git, Node.js 24, pnpm and a browser key from the dashboard that allows http://localhost:3208.

git clone --depth 1 https://github.com/unmap-dev/fleet-optimizer.git
cd fleet-optimizer
pnpm install --frozen-lockfile
cp .env.example .env.local

Set NEXT_PUBLIC_UNMAP_KEY in .env.local to your key, run pnpm dev, and open localhost:3208. The samples ship in data/. The Optimize API reference covers the request and the fields unmap supports, and the Maps API reference covers the basemaps.