X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/f57698494e7c377273cf759d21bb173988226a4f..098f8e98f2f6dbb5a3906a2355a244cef9d8b812:/app/assets/javascripts/index/directions.js.erb diff --git a/app/assets/javascripts/index/directions.js.erb b/app/assets/javascripts/index/directions.js.erb index 7b1ef3c5b..faa922635 100644 --- a/app/assets/javascripts/index/directions.js.erb +++ b/app/assets/javascripts/index/directions.js.erb @@ -73,7 +73,7 @@ OSM.Directions = function (map) { endpoint.awaitingGeocode = true; - $.getJSON('<%= NOMINATIM_URL %>search?q=' + encodeURIComponent(endpoint.value) + '&format=json', function (json) { + $.getJSON(document.location.protocol + '<%= NOMINATIM_URL %>search?q=' + encodeURIComponent(endpoint.value) + '&format=json', function (json) { endpoint.awaitingGeocode = false; endpoint.hasGeocode = true; if (json.length == 0) {