750 B
750 B
Route Search
Route search samples waypoints along a route and runs a text search at each waypoint.
CLI
goplaces route "coffee" --from "Seattle, WA" --to "Portland, OR" --max-waypoints 5
Options:
--modetravel mode: DRIVE, WALK, BICYCLE, TWO_WHEELER, TRANSIT.--radius-msearch radius per waypoint.--limitresults per waypoint.
Library
response, err := client.Route(ctx, goplaces.RouteRequest{
Query: "coffee",
From: "Seattle, WA",
To: "Portland, OR",
Mode: "DRIVE",
RadiusM: 1000,
MaxWaypoints: 5,
Limit: 5,
})
Notes
- Requires the Google Routes API to be enabled.
- Waypoints are sampled evenly along the route polyline.