';
route_desc += ' | ";
route_desc += ''; route_desc += ''; route_desc += response.route_instructions[i][0]; if( i == 0 ) route_desc += ' ' + OSRM.loc( response.route_instructions[i][6] ); if( response.route_instructions[i][1] != "" ) { route_desc += ' on '; route_desc += '' + response.route_instructions[i][1] + ''; } //route_desc += ' for '; route_desc += ''; route_desc += " | "; route_desc += ''; if( i != response.route_instructions.length-1 ) route_desc += ''+OSRM.Utils.metersToDistance(response.route_instructions[i][2])+''; route_desc += " | "; route_desc += "
"+OSRM.loc("YOUR_ROUTE_IS_BEING_COMPUTED")+".
";
},
// no description
showNA: function( display_text ) {
headline = OSRM.loc("ROUTE_DESCRIPTION")+":
";
headline += ""
+ OSRM.loc("DISTANCE")+": N/A"
+ "
"
+ OSRM.loc("DURATION")+": N/A"
+ "";
headline += '
';
document.getElementById('information-box-headline').innerHTML = headline;
document.getElementById('information-box').innerHTML = "
"+display_text+".
"; }, // map driving instructions to icons // [TODO: language-safe implementation] getDirectionIcon: function(name) { var directions = { "Turn left":"turn-left.png", "Turn right":"turn-right.png", "U-Turn":"u-turn.png", "Head":"continue.png", "Continue":"continue.png", "Turn slight left":"slight-left.png", "Turn slight right":"slight-right.png", "Turn sharp left":"sharp-left.png", "Turn sharp right":"sharp-right.png", "Enter roundabout and leave at first exit":"round-about.png", "Enter roundabout and leave at second exit":"round-about.png", "Enter roundabout and leave at third exit":"round-about.png", "Enter roundabout and leave at fourth exit":"round-about.png", "Enter roundabout and leave at fifth exit":"round-about.png", "Enter roundabout and leave at sixth exit":"round-about.png", "Enter roundabout and leave at seventh exit":"round-about.png", "Enter roundabout and leave at eighth exit":"round-about.png", "Enter roundabout and leave at nineth exit":"round-about.png", "Enter roundabout and leave at tenth exit":"round-about.png", "Enter roundabout and leave at one of the too many exit":"round-about.png", "You have reached your destination":"target.png" }; if( directions[name] ) return directions[name]; else return "default.png"; } };