@wemap/routers 12.7.7 → 12.8.2
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 +23 -9
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +23 -9
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/graph/GraphRouterOptions.ts +1 -1
- package/src/graph/GraphRouterOptionsBuilder.ts +5 -5
- package/src/model/RouterRequest.ts +2 -2
- package/src/remote/idfm/IdfmRemoteRouter.ts +30 -15
package/dist/index.mjs
CHANGED
|
@@ -2271,7 +2271,7 @@ const _GraphRouterOptionsBuilder = class _GraphRouterOptionsBuilder {
|
|
|
2271
2271
|
__publicField(this, "avoidStairs", false);
|
|
2272
2272
|
__publicField(this, "avoidEscalators", false);
|
|
2273
2273
|
__publicField(this, "avoidElevators", false);
|
|
2274
|
-
__publicField(this, "
|
|
2274
|
+
__publicField(this, "avoidMovingWalkways", false);
|
|
2275
2275
|
__publicField(this, "avoidTicketRestrictedAreas", false);
|
|
2276
2276
|
__publicField(this, "projectionMaxDistance");
|
|
2277
2277
|
}
|
|
@@ -2287,8 +2287,8 @@ const _GraphRouterOptionsBuilder = class _GraphRouterOptionsBuilder {
|
|
|
2287
2287
|
this.avoidElevators = avoidElevators;
|
|
2288
2288
|
return this;
|
|
2289
2289
|
}
|
|
2290
|
-
|
|
2291
|
-
this.
|
|
2290
|
+
setAvoidMovingWalkways(avoidMovingWalkways) {
|
|
2291
|
+
this.avoidMovingWalkways = avoidMovingWalkways;
|
|
2292
2292
|
return this;
|
|
2293
2293
|
}
|
|
2294
2294
|
setAvoidTicketRestrictedAreas(avoidTicketRestrictedAreas) {
|
|
@@ -2322,7 +2322,7 @@ const _GraphRouterOptionsBuilder = class _GraphRouterOptionsBuilder {
|
|
|
2322
2322
|
return false;
|
|
2323
2323
|
if (this.avoidElevators && edge.properties.isElevator)
|
|
2324
2324
|
return false;
|
|
2325
|
-
if (this.
|
|
2325
|
+
if (this.avoidMovingWalkways && edge.properties.isMovingWalkway)
|
|
2326
2326
|
return false;
|
|
2327
2327
|
if (this.avoidTicketRestrictedAreas && edge.properties.needTicket)
|
|
2328
2328
|
return false;
|
|
@@ -2333,7 +2333,7 @@ const _GraphRouterOptionsBuilder = class _GraphRouterOptionsBuilder {
|
|
|
2333
2333
|
avoidStairs: this.avoidStairs,
|
|
2334
2334
|
avoidEscalators: this.avoidEscalators,
|
|
2335
2335
|
avoidElevators: this.avoidElevators,
|
|
2336
|
-
|
|
2336
|
+
avoidMovingWalkways: this.avoidMovingWalkways,
|
|
2337
2337
|
avoidTicketRestrictedAreas: this.avoidTicketRestrictedAreas,
|
|
2338
2338
|
projectionMaxDistance: this.projectionMaxDistance
|
|
2339
2339
|
},
|
|
@@ -3383,11 +3383,25 @@ class IdfmRemoteRouter extends RemoteRouter {
|
|
|
3383
3383
|
return urlSearchParams;
|
|
3384
3384
|
}
|
|
3385
3385
|
getSectionCoords(section) {
|
|
3386
|
-
|
|
3387
|
-
|
|
3386
|
+
let from;
|
|
3387
|
+
let to;
|
|
3388
|
+
if ("stop_point" in section.from) {
|
|
3389
|
+
from = section.from.stop_point.coord;
|
|
3390
|
+
} else if ("address" in section.from) {
|
|
3391
|
+
from = section.from.address.coord;
|
|
3392
|
+
} else {
|
|
3393
|
+
from = section.from.poi.coord;
|
|
3394
|
+
}
|
|
3395
|
+
if ("stop_point" in section.to) {
|
|
3396
|
+
to = section.to.stop_point.coord;
|
|
3397
|
+
} else if ("address" in section.to) {
|
|
3398
|
+
to = section.to.address.coord;
|
|
3399
|
+
} else {
|
|
3400
|
+
to = section.to.poi.coord;
|
|
3401
|
+
}
|
|
3388
3402
|
return {
|
|
3389
|
-
from,
|
|
3390
|
-
to
|
|
3403
|
+
from: jsonToCoordinates$1(from),
|
|
3404
|
+
to: jsonToCoordinates$1(to)
|
|
3391
3405
|
};
|
|
3392
3406
|
}
|
|
3393
3407
|
/**
|