X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/a997690897b765ec763631c31b9e4ca87b4e530f..5853f81ee88a8a85ab35a78ea0ba288e638a6564:/app/assets/javascripts/routing_engines/osrm.js
diff --git a/app/assets/javascripts/routing_engines/osrm.js b/app/assets/javascripts/routing_engines/osrm.js
index 4122a0b4d..5808fb7ee 100644
--- a/app/assets/javascripts/routing_engines/osrm.js
+++ b/app/assets/javascripts/routing_engines/osrm.js
@@ -1,5 +1,5 @@
// OSRM car engine
-// *** need to clear hints at some point
+// Doesn't yet support hints
OSRMEngine = function(vehicleName, baseURL, locale) {
this.vehicleName = vehicleName;
@@ -12,44 +12,49 @@ OSRMEngine = function(vehicleName, baseURL, locale) {
OSRMEngine.prototype.createConfig = function() {
var that = this;
return {
- name: "javascripts.directions.engines.osrm_"+this.vehicleName.toLowerCase(),
- creditline: 'Directions courtesy of OSRM',
- draggable: true,
- _hints: {},
- getRoute: function(isFinal,points) {
- var url=that.baseURL+"?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 });
- return true;
- }
- };
+ name: "javascripts.directions.engines.osrm_"+this.vehicleName.toLowerCase(),
+ creditline: 'Directions courtesy of OSRM',
+ draggable: true,
+ _hints: {},
+ getRoute: function(isFinal,points) {
+ var url=that.baseURL+"?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'); }
+ if ((i+1)