X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/3bd5ae239950a842e565ba747466da903e605bda..04e2d35834e2531df611b8b2a31d10fc32e69443:/app/assets/javascripts/routing_engines/osrm_car.js diff --git a/app/assets/javascripts/routing_engines/osrm_car.js b/app/assets/javascripts/routing_engines/osrm_car.js index f0c05a850..0011b0205 100644 --- a/app/assets/javascripts/routing_engines/osrm_car.js +++ b/app/assets/javascripts/routing_engines/osrm_car.js @@ -3,17 +3,17 @@ // *** need to clear hints at some point OSM.RoutingEngines.list.push({ - name: 'Car (OSRM)', + name: "javascripts.directions.engines.osrm_car", draggable: true, _hints: {}, - getRoute: function(final,points) { + getRoute: function(isFinal,points) { var url="http://router.project-osrm.org/viaroute?z=14&output=json"; for (var i=0; i "; + instText+=TURN_INSTRUCTIONS[instCodes[0]]; + if (instCodes[1]) { instText+="exit "+instCodes[1]+" "; } + if (instCodes[0]!=15) { instText+=s[1] ? ""+s[1]+"" : I18n.t('javascripts.directions.instructions.unnamed'); } + steps.push([line[s[3]], s[0].split('-')[0], instText, s[2]]); + } + if (steps.length) router.setItinerary({ steps: steps }); } });