From: Tom Hughes Date: Tue, 20 Aug 2024 11:18:47 +0000 (+0100) Subject: Merge remote-tracking branch 'upstream/pull/5095' X-Git-Tag: live~345 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/c5aa012dc252414127f4c3d2f724c7f8e384390a?hp=99a7d21a9bc50cdb38559dd0a8b60bc60072b5a1 Merge remote-tracking branch 'upstream/pull/5095' --- diff --git a/app/assets/javascripts/index/directions-endpoint.js b/app/assets/javascripts/index/directions-endpoint.js index 8489dd6df..9ae7ce84f 100644 --- a/app/assets/javascripts/index/directions-endpoint.js +++ b/app/assets/javascripts/index/directions-endpoint.js @@ -68,6 +68,7 @@ OSM.DirectionsEndpoint = function Endpoint(map, input, iconUrl, dragCallback, ch var viewbox = map.getBounds().toBBoxString(); // ,,, var geocodeUrl = OSM.NOMINATIM_URL + "search?q=" + encodeURIComponent(endpoint.value) + "&format=json&viewbox=" + viewbox; + if (endpoint.geocodeRequest) endpoint.geocodeRequest.abort(); endpoint.geocodeRequest = $.getJSON(geocodeUrl, function (json) { delete endpoint.geocodeRequest; if (json.length === 0) {