<p dir="auto">Part of <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="2459415506" data-permission-text="Title is private" data-url="https://github.com/openstreetmap/openstreetmap-website/issues/5064" data-hovercard-type="pull_request" data-hovercard-url="/openstreetmap/openstreetmap-website/pull/5064/hovercard" href="https://github.com/openstreetmap/openstreetmap-website/pull/5064">#5064</a>.</p>
<p dir="auto"><code class="notranslate">getRoute</code> shouldn't know anything about geocoding, doesn't need to wait for every kind of geocoding (namely for reverse one), therefore shouldn't command the endpoints to do it. All necessary geocoding is triggered by <code class="notranslate">endpoint.setValue</code> and input event listeners.</p>

<hr>

<h4>You can view, comment on, or merge this pull request online at:</h4>
<p>  <a href='https://github.com/openstreetmap/openstreetmap-website/pull/5083'>https://github.com/openstreetmap/openstreetmap-website/pull/5083</a></p>

<h4>Commit Summary</h4>
<ul>
  <li><a href="https://github.com/openstreetmap/openstreetmap-website/pull/5083/commits/e624871eb4d871ac4dcfefce3c279aac32c0496d" class="commit-link">e624871</a>  Remove endpoint.hasGeocode state and related getRoute code</li>
  <li><a href="https://github.com/openstreetmap/openstreetmap-website/pull/5083/commits/51cbbe6d5a86eaf34d507ab6e666772e2ffa439c" class="commit-link">51cbbe6</a>  Move empty value check out of endpoint.getGeocode</li>
  <li><a href="https://github.com/openstreetmap/openstreetmap-website/pull/5083/commits/89a35fe11f9d33c0a75f6b070de512480bc90029" class="commit-link">89a35fe</a>  Make getGeocode a private function</li>
</ul>

<h4 style="display: inline-block">File Changes </h4> <p style="display: inline-block">(<a href="https://github.com/openstreetmap/openstreetmap-website/pull/5083/files">2 files</a>)</p>
<ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/5083/files#diff-720e11d91a0c3a64a70dd6bfad46c242e9f4755b2470797031de5b55ff9a8c5d">app/assets/javascripts/index/directions-endpoint.js</a>
    (16)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/5083/files#diff-fdb9558c2ba79ddf9fbcb92594a8a8fa54abb1b3e25ce264de37951b428a958b">app/assets/javascripts/index/directions.js</a>
    (12)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/5083.patch'>https://github.com/openstreetmap/openstreetmap-website/pull/5083.patch</a></li>
  <li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/5083.diff'>https://github.com/openstreetmap/openstreetmap-website/pull/5083.diff</a></li>
</ul>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />Reply to this email directly, <a href="https://github.com/openstreetmap/openstreetmap-website/pull/5083">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLMDYURZYQTXLZ6IIO3ZRWJKNAVCNFSM6AAAAABMTOQ65OVHI2DSMVQWIX3LMV43ASLTON2WKOZSGQ3DSNJWGA3DIMA">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAK2OLNKMFMNZE2ILEJUNSDZRWJKNA5CNFSM6AAAAABMTOQ65OWGG33NNVSW45C7OR4XAZNFJFZXG5LFVJRW63LNMVXHIX3JMTHJGMUBIA.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><openstreetmap/openstreetmap-website/pull/5083</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/openstreetmap-website/pull/5083",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/5083",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>