X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/81f1e7982a4fd9904ef709ef2a4822ce5de031e4..61faea262a5b75ddca7035daa68239a1f0c54d05:/app/assets/javascripts/index/directions.js diff --git a/app/assets/javascripts/index/directions.js b/app/assets/javascripts/index/directions.js index 4f79ca471..4c39d6781 100644 --- a/app/assets/javascripts/index/directions.js +++ b/app/assets/javascripts/index/directions.js @@ -105,7 +105,9 @@ OSM.Directions = function (map) { endpoint.awaitingGeocode = true; - $.getJSON(OSM.NOMINATIM_URL + "search?q=" + encodeURIComponent(endpoint.value) + "&format=json", function (json) { + var viewbox = map.getBounds().toBBoxString(); // ,,, + + $.getJSON(OSM.NOMINATIM_URL + "search?q=" + encodeURIComponent(endpoint.value) + "&format=json&viewbox=" + viewbox, function (json) { endpoint.awaitingGeocode = false; endpoint.hasGeocode = true; if (json.length === 0) {