" + I18n.t("javascripts.directions.errors.no_route") + "
"); + $("#sidebar_content").html("" + + var distanceText = $("
").append(
I18n.t("javascripts.directions.distance") + ": " + formatDistance(route.distance) + ". " +
- I18n.t("javascripts.directions.time") + ": " + formatTime(route.time) + ".";
+ I18n.t("javascripts.directions.time") + ": " + formatTime(route.time) + ".");
if (typeof route.ascend !== "undefined" && typeof route.descend !== "undefined") {
- html += "
" +
- I18n.t("javascripts.directions.ascend") + ": " + Math.round(route.ascend) + "m. " +
- I18n.t("javascripts.directions.descend") + ": " + Math.round(route.descend) + "m.";
+ distanceText.append(
+ $("
"),
+ I18n.t("javascripts.directions.ascend") + ": " + formatHeight(route.ascend) + ". " +
+ I18n.t("javascripts.directions.descend") + ": " + formatHeight(route.descend) + ".");
}
- html += "