@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 +3 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/model/Itinerary.ts +2 -2
- package/src/remote/cityway/CitywayRemoteRouter.spec.ts +3 -3
- package/src/remote/idfm/IdfmRemoteRouter.spec.ts +1 -1
- package/src/remote/idfm/IdfmRemoteRouter.ts +2 -1
- package/src/remote/osrm/OsrmRemoteRouter.ts +1 -1
- package/src/remote/otp/OtpRemoteRouter.spec.ts +2 -2
package/dist/index.mjs
CHANGED
|
@@ -342,7 +342,7 @@ class Itinerary {
|
|
|
342
342
|
isDriving = isDriving || leg.mode === "CAR";
|
|
343
343
|
});
|
|
344
344
|
if (isPublicTransport) {
|
|
345
|
-
this._mode = "
|
|
345
|
+
this._mode = "MULTI";
|
|
346
346
|
} else if (isDriving) {
|
|
347
347
|
this._mode = "CAR";
|
|
348
348
|
} else if (isBicycle) {
|
|
@@ -1387,7 +1387,7 @@ class IdfmRemoteRouter extends RemoteRouter {
|
|
|
1387
1387
|
});
|
|
1388
1388
|
}
|
|
1389
1389
|
const routerResponse = this.createRouterResponseFromJson(jsonResponse, waypoints[0], waypoints[1]);
|
|
1390
|
-
const sameModeFound = routerResponse.itineraries.some((itinerary) => itinerary.
|
|
1390
|
+
const sameModeFound = routerResponse.itineraries.some((itinerary) => itinerary.mode === mode);
|
|
1391
1391
|
if (!sameModeFound) {
|
|
1392
1392
|
return new RouterResponse({
|
|
1393
1393
|
routerName: this.rname,
|
|
@@ -1751,7 +1751,7 @@ class OsrmRemoteRouter extends RemoteRouter {
|
|
|
1751
1751
|
const routingModeCorrespondance2 = /* @__PURE__ */ new Map();
|
|
1752
1752
|
routingModeCorrespondance2.set("walking", "WALK");
|
|
1753
1753
|
routingModeCorrespondance2.set("driving", "CAR");
|
|
1754
|
-
routingModeCorrespondance2.set("
|
|
1754
|
+
routingModeCorrespondance2.set("bike", "BIKE");
|
|
1755
1755
|
const mode = routingModeCorrespondance2.get(routingMode) || "WALK";
|
|
1756
1756
|
routerResponse.itineraries = jsonRoutes.map((jsonItinerary) => {
|
|
1757
1757
|
const legs = jsonItinerary.legs.map((jsonLeg) => {
|