]> git.openstreetmap.org Git - rails.git/commitdiff
Merge pull request #34 from tomhughes/routing
authorRichard Fairhurst <richard@systemeD.net>
Mon, 2 Feb 2015 14:21:08 +0000 (14:21 +0000)
committerRichard Fairhurst <richard@systemeD.net>
Mon, 2 Feb 2015 14:21:08 +0000 (14:21 +0000)
Extend https support to all three routing engines

app/assets/javascripts/index/directions/graphhopper.js

index 592be075c5f3fdd5d8c1051cd7acb96f046ea552..356de34778a588ce44ba786fa533ccfc55d08fa7 100644 (file)
@@ -19,7 +19,7 @@ function GraphHopperEngine(id, vehicleParam) {
     getRoute: function (points, callback) {
       // documentation
       // https://github.com/graphhopper/graphhopper/blob/master/docs/web/api-doc.md
-      var url = "https://graphhopper.com/api/1/route?"
+      var url = document.location.protocol + "//graphhopper.com/api/1/route?"
         + vehicleParam
         + "&locale=" + I18n.currentLocale()
         + "&key=LijBPDQGfu7Iiq80w3HzwB4RUDJbMbhs6BU0dEnn"