mirror of
https://github.com/gpxstudio/gpx.studio.git
synced 2025-12-27 13:39:59 +00:00
small fix
This commit is contained in:
@@ -108,7 +108,7 @@ async function getGraphHopperRoute(
|
|||||||
for (let key of graphhopperDetails) {
|
for (let key of graphhopperDetails) {
|
||||||
let detail = details[key];
|
let detail = details[key];
|
||||||
for (let i = 0; i < detail.length; i++) {
|
for (let i = 0; i < detail.length; i++) {
|
||||||
for (let j = detail[i][0]; j < detail[i][1]; j++) {
|
for (let j = detail[i][0]; j < detail[i][1] + (i == detail.length - 1); j++) {
|
||||||
if (detail[i][2] !== undefined && detail[i][2] !== 'missing') {
|
if (detail[i][2] !== undefined && detail[i][2] !== 'missing') {
|
||||||
if (key === 'road_class') {
|
if (key === 'road_class') {
|
||||||
route[j].setExtension('highway', detail[i][2]);
|
route[j].setExtension('highway', detail[i][2]);
|
||||||
@@ -122,8 +122,8 @@ async function getGraphHopperRoute(
|
|||||||
if (mtbScale) {
|
if (mtbScale) {
|
||||||
route[j].setExtension('mtb_scale', mtbScale);
|
route[j].setExtension('mtb_scale', mtbScale);
|
||||||
}
|
}
|
||||||
} else {
|
} else if (key === 'surface' && detail[i][2] !== 'other') {
|
||||||
route[j].setExtension(key, detail[i][2]);
|
route[j].setExtension('surface', detail[i][2]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user