goplaces/docs/commands/route.html
2026-05-04 23:12:11 +01:00

44 lines
3.0 KiB
HTML

<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>goplaces route</title>
<meta name="description" content="Search for places along a route with goplaces.">
<link rel="stylesheet" href="../assets/site.css">
</head>
<body>
<header class="topbar"><nav class="nav shell" aria-label="Primary"><a class="brand" href="../index.html"><span class="mark"></span><span>goplaces</span></a><div class="links"><a href="../index.html#commands">Commands</a><a href="../index.html#setup">Setup</a><a href="../index.html#library">Go API</a><a href="https://github.com/steipete/goplaces" rel="noopener">GitHub &nearr;</a></div></nav></header>
<main class="shell">
<section class="command-hero"><span class="pill">Routes + Places</span><h1>route</h1><p class="lede">Compute a route, sample waypoints along its polyline, then search for places near each waypoint.</p></section>
<div class="command-layout">
<aside class="side"><a href="search.html">search</a><a href="nearby.html">nearby</a><a href="autocomplete.html">autocomplete</a><a href="details.html">details</a><a href="photo.html">photo</a><a href="resolve.html">resolve</a><a href="route.html" aria-current="page">route</a><a href="directions.html">directions</a></aside>
<article>
<section class="section">
<h2>Usage</h2>
<p><code>goplaces route &lt;query&gt; [flags]</code></p>
<div class="panel"><div class="codebar"><span class="pill">shell</span><button class="copy" data-copy="#example">Copy</button></div><pre id="example">goplaces route "coffee" --from "Seattle, WA" --to "Portland, OR" --max-waypoints 5</pre></div>
</section>
<section class="section">
<h2>Flags</h2>
<table><tbody>
<tr><th><code>--from</code>, <code>--to</code></th><td>Origin and destination address or place name.</td></tr>
<tr><th><code>--mode</code></th><td>Travel mode: DRIVE, WALK, BICYCLE, TWO_WHEELER, TRANSIT. Default: DRIVE.</td></tr>
<tr><th><code>--radius-m</code></th><td>Search radius per sampled waypoint. Default: 1000.</td></tr>
<tr><th><code>--max-waypoints</code></th><td>Max sampled waypoints along the route. Default: 5.</td></tr>
<tr><th><code>--limit</code></th><td>Max results per waypoint, 1-20. Default: 5.</td></tr>
<tr><th><code>--language</code>, <code>--region</code></th><td>BCP-47 language and CLDR region hints.</td></tr>
</tbody></table>
</section>
<section class="section">
<h2>Requirements</h2>
<p>Requires both Places API (New) and Routes API enabled on the key.</p>
</section>
</article>
</div>
</main>
<footer class="footer"><div class="shell foot-bar"><a href="../index.html">&larr; Back to overview</a><a href="https://github.com/steipete/goplaces" rel="noopener">GitHub &nearr;</a></div></footer>
<script src="../assets/site.js"></script>
</body>
</html>