Merge remote-tracking branch 'upstream/pull/5095'

This commit is contained in:
Tom Hughes 2024-08-20 12:18:47 +01:00
commit c5aa012dc2

View file

@ -68,6 +68,7 @@ OSM.DirectionsEndpoint = function Endpoint(map, input, iconUrl, dragCallback, ch
var viewbox = map.getBounds().toBBoxString(); // <sw lon>,<sw lat>,<ne lon>,<ne lat>
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) {