wip - create journeys - no tests yet

This commit is contained in:
sbriat
2023-09-22 16:37:52 +02:00
parent dfc8dbcc51
commit 467d8a84f8
27 changed files with 860 additions and 622 deletions

View File

@@ -164,12 +164,14 @@ export class GraphhopperGeorouter implements GeorouterPort {
points: [[number, number]],
snappedWaypoints: [[number, number]],
): number[] => {
const indices = snappedWaypoints.map((waypoint) =>
points.findIndex(
(point) => point[0] == waypoint[0] && point[1] == waypoint[1],
),
const indices: number[] = snappedWaypoints.map(
(waypoint: [number, number]) =>
points.findIndex(
(point) => point[0] == waypoint[0] && point[1] == waypoint[1],
),
);
if (indices.find((index) => index == -1) === undefined) return indices;
if (indices.find((index: number) => index == -1) === undefined)
return indices;
const missedWaypoints = indices
.map(
(value, index) =>