if (this._hints[pair]) url+= "&hint="+this._hints[pair];
}
if (isFinal) url+="&instructions=true";
- this.requestJSONP(url+"&jsonp=");
+ this.requestCORS(url);
},
gotRoute: function(router,data) {
if (data.status==207) {
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;
}
};