@wemap/routers 11.8.5 → 11.8.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -344,7 +344,7 @@ class Itinerary {
344
344
  isDriving = isDriving || leg.mode === "CAR";
345
345
  });
346
346
  if (isPublicTransport) {
347
- this._mode = "PT";
347
+ this._mode = "MULTI";
348
348
  } else if (isDriving) {
349
349
  this._mode = "CAR";
350
350
  } else if (isBicycle) {
@@ -1389,7 +1389,7 @@ class IdfmRemoteRouter extends RemoteRouter {
1389
1389
  });
1390
1390
  }
1391
1391
  const routerResponse = this.createRouterResponseFromJson(jsonResponse, waypoints[0], waypoints[1]);
1392
- const sameModeFound = routerResponse.itineraries.some((itinerary) => itinerary.legs.every((leg) => leg.mode === mode));
1392
+ const sameModeFound = routerResponse.itineraries.some((itinerary) => itinerary.mode === mode);
1393
1393
  if (!sameModeFound) {
1394
1394
  return new RouterResponse({
1395
1395
  routerName: this.rname,
@@ -1753,7 +1753,7 @@ class OsrmRemoteRouter extends RemoteRouter {
1753
1753
  const routingModeCorrespondance2 = /* @__PURE__ */ new Map();
1754
1754
  routingModeCorrespondance2.set("walking", "WALK");
1755
1755
  routingModeCorrespondance2.set("driving", "CAR");
1756
- routingModeCorrespondance2.set("bicycle", "BIKE");
1756
+ routingModeCorrespondance2.set("bike", "BIKE");
1757
1757
  const mode = routingModeCorrespondance2.get(routingMode) || "WALK";
1758
1758
  routerResponse.itineraries = jsonRoutes.map((jsonItinerary) => {
1759
1759
  const legs = jsonItinerary.legs.map((jsonLeg) => {