]> git.openstreetmap.org Git - rails.git/commitdiff
Use document.location.protocol for OSRM
authorRichard Fairhurst <richard@systemeD.net>
Mon, 2 Feb 2015 01:32:48 +0000 (01:32 +0000)
committerRichard Fairhurst <richard@systemeD.net>
Mon, 2 Feb 2015 01:32:48 +0000 (01:32 +0000)
app/assets/javascripts/index/directions/osrm.js

index cc275685843babc6fd72e6be8745b81cab389c82..05cb32f2093647f2c37acc73b95c0b34f349fa9e 100644 (file)
@@ -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;