X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/a41f3e97b19dc8df018f49f282a6e58b397fc21f..12206d6b7a55eea1abd8e25b3a8c6301abef620f:/app/assets/javascripts/index/directions-endpoint.js diff --git a/app/assets/javascripts/index/directions-endpoint.js b/app/assets/javascripts/index/directions-endpoint.js index 97b841f14..785613b7a 100644 --- a/app/assets/javascripts/index/directions-endpoint.js +++ b/app/assets/javascripts/index/directions-endpoint.js @@ -97,7 +97,7 @@ OSM.DirectionsEndpoint = function Endpoint(map, input, marker, dragCallback, cha function getGeocode() { const viewbox = map.getBounds().toBBoxString(), // ,,, - geocodeUrl = OSM.NOMINATIM_URL + "search?" + new URLSearchParams({ q: endpoint.value, format: "json", viewbox }); + geocodeUrl = OSM.NOMINATIM_URL + "search?" + new URLSearchParams({ q: endpoint.value, format: "json", viewbox, limit: 1 }); endpoint.geocodeRequest = new AbortController(); fetch(geocodeUrl, { signal: endpoint.geocodeRequest.signal })