Skip to content

feat: add route command for searching places along a route#1

Closed
jamesbrooksco wants to merge 1 commit into
openclaw:mainfrom
jamesbrooksco:feat/route-command
Closed

feat: add route command for searching places along a route#1
jamesbrooksco wants to merge 1 commit into
openclaw:mainfrom
jamesbrooksco:feat/route-command

Conversation

@jamesbrooksco

@jamesbrooksco jamesbrooksco commented Jan 2, 2026

Copy link
Copy Markdown

Summary

Adds a new route command that searches for places along a driving route between two locations.

🤖 Note: This PR was generated with AI assistance (Claude + Codex CLI).

Features

  • Uses Google Routes API to get route polyline
  • Samples waypoints evenly along the route by distance
  • Searches for places at each waypoint with location bias
  • Supports all travel modes (DRIVE, WALK, BICYCLE, TWO_WHEELER, TRANSIT)
  • Configurable waypoint count, search radius, and result limit

Usage

goplaces route "coffee" --from "London, UK" --to "Bristol, UK"
goplaces route "gas station" --from "NYC" --to "Boston" --max-waypoints 5

Example Output

Route waypoints (3)
Waypoint 1 (51.507210, -0.127560)
1. Black Sheep Coffee — Unit UG12, Waterloo Station, London SE1 7BH
   Rating: 4.7 · Open now

Waypoint 2 (51.456353, -1.362228)  
1. BrewBlood — 152 Bartholomew St, Newbury RG14 5HB
   Rating: 5.0

Waypoint 3 (51.455150, -2.587460)
1. Playground Coffee & Bar — 45 St Nicholas St, Bristol BS1 1TP
   Rating: 4.7 · Open now

New Files

  • route.go - Core implementation (Routes API, polyline decoder, waypoint sampling)
  • internal/cli/route.go - CLI command definition

Requirements

Requires the Google Routes API to be enabled in addition to Places API (New).

Adds a new route command that searches for places along a driving route between two locations.

Features:
- Uses Google Routes API to get route polyline
- Samples waypoints evenly along the route by distance
- Searches for places at each waypoint with location bias
- Supports all travel modes (DRIVE, WALK, BICYCLE, TWO_WHEELER, TRANSIT)
- Configurable waypoint count, search radius, and result limit

Usage:
  goplaces route "coffee" --from "London, UK" --to "Bristol, UK"
  goplaces route "gas station" --from "NYC" --to "Boston" --max-waypoints 5
@steipete

steipete commented Jan 2, 2026

Copy link
Copy Markdown
Collaborator

Cherry-picked and integrated on main; closing PR.

@steipete steipete closed this Jan 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants