X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/8adb0846b4834e393eafc68406b5391d7881da83..4179fbbbeb3fa063e912e09d3ebfb4d011d770c2:/app/assets/javascripts/index/directions/osrm.js diff --git a/app/assets/javascripts/index/directions/osrm.js b/app/assets/javascripts/index/directions/osrm.js index 00ef24d6f..05cb32f20 100644 --- a/app/assets/javascripts/index/directions/osrm.js +++ b/app/assets/javascripts/index/directions/osrm.js @@ -31,7 +31,7 @@ function OSRMEngine() { I18n.t('javascripts.directions.instructions.end_oneway') // 17 ]; - var url = "http://router.project-osrm.org/viaroute?z=14&output=json&instructions=true"; + var url = document.location.protocol + "//router.project-osrm.org/viaroute?z=14&output=json&instructions=true"; for (var i = 0; i < points.length; i++) { url += "&loc=" + points[i].lat + ',' + points[i].lng; @@ -91,4 +91,4 @@ function OSRMEngine() { }; } -OSM.Directions.addEngine(OSRMEngine(), false); +OSM.Directions.addEngine(OSRMEngine(), true);