Add distance/time summary
This commit is contained in:
parent
9a05a7ba49
commit
3ef8024b1d
6 changed files with 23 additions and 5 deletions
|
@ -46,7 +46,7 @@ OSRMEngine.prototype.createConfig = function() {
|
|||
if (instCodes[0]!=15) { instText+=s[1] ? "<b>"+s[1]+"</b>" : 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 });
|
||||
if (steps.length) router.setItinerary({ steps: steps, distance: data.route_summary.total_distance, time: data.route_summary.total_time });
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue