]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/routing_engines/graphhopper_bicycle.js
add a credits line for each routing service
[rails.git] / app / assets / javascripts / routing_engines / graphhopper_bicycle.js
index 7f7c83c80116c44a16a95e17a5d086a721bf03a0..bec855f88dd44e0f1b07f6cd21a537ddf18055ab 100644 (file)
@@ -1,11 +1,12 @@
 // GraphHopper bicycle engine
 
 OSM.RoutingEngines.list.push({    
-    name: 'Bicycle (GraphHopper)',
+    name: "javascripts.directions.engines.graphhopper_bike",
+    creditline: 'Directions courtesy of <a href="http://graphhopper.com/routing/" target="_blank">Graphhopper</a>',
     draggable: true,
     _hints: {},
     getRoute: function(isFinal, points) {
-        var url = "http://graphhopper.com/routing/api/route?vehicle=bike&locale=en";
+        var url = "http://graphhopper.com/routing/api/route?vehicle=bike&locale=" + I18n.currentLocale();
         for (var i = 0; i < points.length; i++) {
             var pair = points[i].join(',');
             url += "&point=" + pair;