Fix swapped options for auto and bicycle routing (#694)

This commit is contained in:
Henri
2026-01-11 21:44:39 +01:00
committed by GitHub
parent 712174491b
commit 741cb51096

View File

@@ -62,12 +62,11 @@ export async function calculateRouteBetween(startLat: number, startLon: number,
let costingBody;
switch (options.modeOfTransport) {
case "bicycle":
costingBody = { "costing": options.modeOfTransport, "costing_options": { [options.modeOfTransport]: options.autoOptions } }
break;
case "auto":
costingBody = { "costing": options.modeOfTransport, "costing_options": { [options.modeOfTransport]: options.bicycleOptions } }
break;
case "auto":
costingBody = { "costing": options.modeOfTransport, "costing_options": { [options.modeOfTransport]: options.autoOptions } }
break;
case "pedestrian":
costingBody = { "costing": options.modeOfTransport, "costing_options": { [options.modeOfTransport]: options.pedestrianOptions } }
break;