<p dir="auto">This is on top of <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="2458878945" data-permission-text="Title is private" data-url="https://github.com/openstreetmap/openstreetmap-website/issues/5062" data-hovercard-type="pull_request" data-hovercard-url="/openstreetmap/openstreetmap-website/pull/5062/hovercard" href="https://github.com/openstreetmap/openstreetmap-website/pull/5062">#5062</a>.</p>
<p dir="auto">Now you only have to call <code class="notranslate">endpoint.setValue</code> with a single parameter. The parameter is checked if it's coordinates. If not, geocoding is performed.</p>
<p dir="auto">No reverse geocoding is done yet.</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/5064'>https://github.com/openstreetmap/openstreetmap-website/pull/5064</a></p>

<h4>Commit Summary</h4>
<ul>
  <li><a href="https://github.com/openstreetmap/openstreetmap-website/pull/5064/commits/d065f88b1a565d1b9c784d27993159bc64c926ec" class="commit-link">d065f88</a>  Remove references to global variables from endpoint drag listener</li>
  <li><a href="https://github.com/openstreetmap/openstreetmap-website/pull/5064/commits/567a9e5b23b07babe32381fd45647dc88ff1915e" class="commit-link">567a9e5</a>  Rename route request variable</li>
  <li><a href="https://github.com/openstreetmap/openstreetmap-website/pull/5064/commits/415f497d89b75466679841101bc14b0bb9662dcc" class="commit-link">415f497</a>  Move endpoints code to its own module</li>
  <li><a href="https://github.com/openstreetmap/openstreetmap-website/pull/5064/commits/37605ac039f6bb3e5a899f660d6c966ce0dd327e" class="commit-link">37605ac</a>  Don't call endpoint.setLatLng() from outside of endpoint module</li>
  <li><a href="https://github.com/openstreetmap/openstreetmap-website/pull/5064/commits/65bb751b748fa78765cb6a9e3eb966c96e04d9fc" class="commit-link">65bb751</a>  Don't set input value from endpoint.setLatLng()</li>
  <li><a href="https://github.com/openstreetmap/openstreetmap-website/pull/5064/commits/2a3ec22635a2a82f09df2b1cc561e140457e2da2" class="commit-link">2a3ec22</a>  Make setLatLng a private function</li>
  <li><a href="https://github.com/openstreetmap/openstreetmap-website/pull/5064/commits/8526b7029066e3757b5a99ef68be9ab4fc6c9ba2" class="commit-link">8526b70</a>  Remove latlng parameter from endpoint.setValue</li>
  <li><a href="https://github.com/openstreetmap/openstreetmap-website/pull/5064/commits/218e4b112cc5af0dc1b98b37bb0d8f36ce8a1e07" class="commit-link">218e4b1</a>  Rename geocodeCallback to changeCallback, call it from latlon setValue</li>
  <li><a href="https://github.com/openstreetmap/openstreetmap-website/pull/5064/commits/ae3ae71bacc7e263e0d43dc03c63a7485ee672c9" class="commit-link">ae3ae71</a>  Remove endpoint.hasGeocode state and related getRoute code</li>
  <li><a href="https://github.com/openstreetmap/openstreetmap-website/pull/5064/commits/90d87770b9ab1039781f07fb658f0bf2f5b4ca3a" class="commit-link">90d8777</a>  Move empty value check out of endpoint.getGeocode</li>
  <li><a href="https://github.com/openstreetmap/openstreetmap-website/pull/5064/commits/16d4433e6a0fc16475caa2bad680d621c71409a3" class="commit-link">16d4433</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/5064/files">2 files</a>)</p>
<ul>
  <li>
    <strong>A</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/5064/files#diff-720e11d91a0c3a64a70dd6bfad46c242e9f4755b2470797031de5b55ff9a8c5d">app/assets/javascripts/index/directions-endpoint.js</a>
    (88)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/5064/files#diff-fdb9558c2ba79ddf9fbcb92594a8a8fa54abb1b3e25ce264de37951b428a958b">app/assets/javascripts/index/directions.js</a>
    (140)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/5064.patch'>https://github.com/openstreetmap/openstreetmap-website/pull/5064.patch</a></li>
  <li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/5064.diff'>https://github.com/openstreetmap/openstreetmap-website/pull/5064.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/5064">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLLKSCHY7BRLLACE2Y3ZQ3R23AVCNFSM6AAAAABMKM6E5WVHI2DSMVQWIX3LMV43ASLTON2WKOZSGQ2TSNBRGU2TANQ">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAK2OLNAB3J2TII7STHYUJLZQ3R23A5CNFSM6AAAAABMKM6E5WWGG33NNVSW45C7OR4XAZNFJFZXG5LFVJRW63LNMVXHIX3JMTHJFF5T2I.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/5064</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/5064",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/5064",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>