<p><strong>Issue</strong></p>
<p>While the search endpoint (<code>GeocoderController</code>) sends the current map bounding box to the geocoder (Nominatim), the geocoding AJAX request in <code>directions.js</code> doesn't.</p>
<p><strong>To reproduce</strong></p>
<p>Normal search</p>
<ol>
<li>Search for Manchester <a href="https://www.openstreetmap.org/search?query=manchester" rel="nofollow">https://www.openstreetmap.org/search?query=manchester</a></li>
<li>Search for King Street <a href="https://www.openstreetmap.org/search?query=king+street" rel="nofollow">https://www.openstreetmap.org/search?query=king+street</a></li>
<li>a King Street in Manchester is found (<a href="https://www.openstreetmap.org/way/4961636" rel="nofollow">https://www.openstreetmap.org/way/4961636</a>)</li>
</ol>
<p>vs</p>
<p>Directions search</p>
<ol>
<li>Search for Manchester <a href="https://www.openstreetmap.org/search?query=manchester" rel="nofollow">https://www.openstreetmap.org/search?query=manchester</a></li>
<li>Open directions dialog, it shows start and destination fields. Start is now prefilled with <code>Manchester, Greater Manchester, North West England, England, United Kingdom</code></li>
<li>In the destination field type in "King Street" and press <code>[TAB]</code> or unfocus the input field</li>
<li>a King Street in Derby is found, far away</li>
</ol>
<p><strong>Expected behavior</strong></p>
<p>King Street near Manchester should be set as destination.</p>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/openstreetmap/openstreetmap-website/issues/2327?email_source=notifications&email_token=AAK2OLPECXB2FEQRV7HVJDTQBD6NFA5CNFSM4IGWBYJ2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HBLT54A">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLPN2Q4ISVZUNHCWAH3QBD6NFANCNFSM4IGWBYJQ">mute the thread</a>.<img src="https://github.com/notifications/beacon/AAK2OLMDMQAZE5JIJPSMT73QBD6NFA5CNFSM4IGWBYJ2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HBLT54A.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/openstreetmap-website/issues/2327?email_source=notifications\u0026email_token=AAK2OLPECXB2FEQRV7HVJDTQBD6NFA5CNFSM4IGWBYJ2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HBLT54A",
"url": "https://github.com/openstreetmap/openstreetmap-website/issues/2327?email_source=notifications\u0026email_token=AAK2OLPECXB2FEQRV7HVJDTQBD6NFA5CNFSM4IGWBYJ2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HBLT54A",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>