X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/f57698494e7c377273cf759d21bb173988226a4f..baf10cd39289cd7e94a819305e46f43e85a136c6:/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) {