@wemap/routers 12.10.9 → 12.11.1
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 +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +122 -5
- package/dist/index.mjs.map +1 -1
- package/dist/src/graph/Edge.d.ts +6 -0
- package/dist/src/graph/GraphRouterEngine.d.ts +3 -0
- package/dist/src/graph/GraphRouterOptions.d.ts +1 -0
- package/dist/src/graph/GraphRouterOptionsBuilder.d.ts +3 -0
- package/dist/src/graph/GraphRouterOptionsFactors.d.ts +8 -0
- package/dist/src/model/RouterRequest.d.ts +2 -0
- package/package.json +3 -3
package/dist/src/graph/Edge.d.ts
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { Level_t } from '@wemap/geo';
|
|
2
2
|
import { default as Vertex } from './Vertex.js';
|
|
3
|
+
export type EdgeSmoothness = 'excellent' | 'good' | 'intermediate' | 'bad' | 'horrible';
|
|
4
|
+
export type EdgeSurface = 'asphalt' | 'compacted' | 'concrete' | 'grass' | 'gravel' | 'ground' | 'metal' | 'paving_stones' | 'wood';
|
|
5
|
+
export type EdgeWheelchair = 'yes' | 'no' | 'designated';
|
|
3
6
|
export type EdgeProperties = {
|
|
4
7
|
name?: string;
|
|
5
8
|
externalId?: string | number;
|
|
@@ -10,6 +13,9 @@ export type EdgeProperties = {
|
|
|
10
13
|
isMovingWalkway?: boolean;
|
|
11
14
|
needTicket?: boolean;
|
|
12
15
|
incline?: 'up' | 'down';
|
|
16
|
+
wheelchair?: EdgeWheelchair;
|
|
17
|
+
smoothness?: EdgeSmoothness;
|
|
18
|
+
surface?: EdgeSurface;
|
|
13
19
|
};
|
|
14
20
|
/**
|
|
15
21
|
* An Edge is a segment composed of two Vertex
|
|
@@ -44,6 +44,9 @@ export declare class GraphRouterEngineResults {
|
|
|
44
44
|
isMovingWalkway?: boolean | undefined;
|
|
45
45
|
needTicket?: boolean | undefined;
|
|
46
46
|
incline?: "up" | "down" | undefined;
|
|
47
|
+
wheelchair?: import('./Edge.js').EdgeWheelchair | undefined;
|
|
48
|
+
smoothness?: import('./Edge.js').EdgeSmoothness | undefined;
|
|
49
|
+
surface?: import('./Edge.js').EdgeSurface | undefined;
|
|
47
50
|
level?: number | [number, number] | undefined;
|
|
48
51
|
id: number;
|
|
49
52
|
};
|
|
@@ -7,14 +7,17 @@ export default class GraphRouterOptionsBuilder {
|
|
|
7
7
|
avoidTicketRestrictedAreas: boolean;
|
|
8
8
|
useMultiLevelSegments: boolean;
|
|
9
9
|
projectionMaxDistance?: number;
|
|
10
|
+
isWheelchair: boolean;
|
|
10
11
|
static DEFAULT: GraphRouterOptions;
|
|
11
12
|
static WITHOUT_STAIRS: GraphRouterOptions;
|
|
13
|
+
static WHEELCHAIR: GraphRouterOptions;
|
|
12
14
|
setAvoidStairs(avoidStairs: boolean): this;
|
|
13
15
|
setAvoidEscalators(avoidEscalators: boolean): this;
|
|
14
16
|
setAvoidElevators(avoidElevators: boolean): this;
|
|
15
17
|
setAvoidMovingWalkways(avoidMovingWalkways: boolean): this;
|
|
16
18
|
setAvoidTicketRestrictedAreas(avoidTicketRestrictedAreas: boolean): this;
|
|
17
19
|
setUseMultiLevelSegments(useMultiLevelSegments: boolean): this;
|
|
20
|
+
setIsWheelchair(isWheelchair: boolean): this;
|
|
18
21
|
static fromJson(options: GraphRouterOptionsJson): GraphRouterOptions;
|
|
19
22
|
build(): GraphRouterOptions;
|
|
20
23
|
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { EdgeSmoothness, EdgeSurface } from './Edge.js';
|
|
2
|
+
export type ProfileType = 'wheelchair' | 'default';
|
|
3
|
+
export declare const SPEEDS: {
|
|
4
|
+
readonly DEFAULT: 4;
|
|
5
|
+
readonly WHEELCHAIR: 3;
|
|
6
|
+
};
|
|
7
|
+
export declare const SMOOTHNESS_FACTORS: Record<ProfileType, Record<EdgeSmoothness, number>>;
|
|
8
|
+
export declare const SURFACE_FACTORS: Record<ProfileType, Record<EdgeSurface, number>>;
|
|
@@ -14,6 +14,7 @@ export type RouterRequest = {
|
|
|
14
14
|
avoidElevators?: boolean;
|
|
15
15
|
avoidMovingWalkways?: boolean;
|
|
16
16
|
avoidTicketRestrictedAreas?: boolean;
|
|
17
|
+
isWheelchair?: boolean;
|
|
17
18
|
};
|
|
18
19
|
output?: {
|
|
19
20
|
distanceAndDurationOnly?: boolean;
|
|
@@ -30,6 +31,7 @@ export declare function routerRequestToJson(routerRequest: RouterRequest): {
|
|
|
30
31
|
avoidElevators?: boolean | undefined;
|
|
31
32
|
avoidMovingWalkways?: boolean | undefined;
|
|
32
33
|
avoidTicketRestrictedAreas?: boolean | undefined;
|
|
34
|
+
isWheelchair?: boolean | undefined;
|
|
33
35
|
} | undefined;
|
|
34
36
|
output?: {
|
|
35
37
|
distanceAndDurationOnly?: boolean | undefined;
|
package/package.json
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"directory": "packages/routers"
|
|
13
13
|
},
|
|
14
14
|
"name": "@wemap/routers",
|
|
15
|
-
"version": "12.
|
|
15
|
+
"version": "12.11.1",
|
|
16
16
|
"bugs": {
|
|
17
17
|
"url": "https://github.com/wemap/wemap-modules-js/issues"
|
|
18
18
|
},
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"@wemap/geo": "^12.10.9",
|
|
38
38
|
"@wemap/logger": "^12.10.9",
|
|
39
39
|
"@wemap/maths": "^12.10.9",
|
|
40
|
-
"@wemap/osm": "^12.
|
|
40
|
+
"@wemap/osm": "^12.11.0",
|
|
41
41
|
"@wemap/salesman.js": "^2.1.0"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
@@ -56,5 +56,5 @@
|
|
|
56
56
|
},
|
|
57
57
|
"./helpers/*": "./helpers/*"
|
|
58
58
|
},
|
|
59
|
-
"gitHead": "
|
|
59
|
+
"gitHead": "180f2399e588856f74addcdaa4f37d1062540273"
|
|
60
60
|
}
|