# google-maps integration

Google Maps traffic/ETA helper CLI using Geocoding API and Routes API.

## What this integration is for

- Drive ETA between two places
- Leave-by time estimation for a target arrival
- Quick traffic-aware route summaries

## Runtime

- `node`
- no package dependencies beyond built-in runtime APIs on current Node

## Auth

Preferred:
- `GOOGLE_MAPS_API_KEY` environment variable

Preferred key file:
- `~/.openclaw/workspace/.clawdbot/credentials/google-maps/apikey.txt`

Legacy fallback key file:
- `~/.openclaw/credentials/google-maps/apikey.txt`

Required Google APIs for the key:
- Geocoding API
- Routes API

## Commands

```bash
node integrations/google-maps/traffic.js eta --from "DFW Airport" --to "Love Field" --departAt now
node integrations/google-maps/traffic.js eta --from "DFW Airport" --to "Love Field" --avoidTolls
node integrations/google-maps/traffic.js leave-by --from "Home" --to "DFW Airport" --arriveBy 2026-03-17T08:30:00-05:00
node integrations/google-maps/traffic.js leave-by --from "Home" --to "DFW Airport" --arriveBy 2026-03-17T08:30:00-05:00 --avoidTolls
```

## Optional route modifiers

- `--avoidTolls`
- `--avoidHighways`
- `--avoidFerries`

These flags are passed through to the Google Routes API `routeModifiers` field and work with both `eta` and `leave-by`.
