mobility-toolbox-js 3.2.0 → 3.2.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/api/RoutingAPI.d.ts +1 -1
- package/api/RoutingAPI.js +1 -1
- package/common/styles/realtimeDefaultStyle.js +24 -5
- package/common/utils/RealtimeEngine.d.ts +1 -1
- package/common/utils/RealtimeEngine.js +16 -6
- package/common/utils/realtimeConfig.js +3 -2
- package/mbt.js +356 -306
- package/mbt.js.map +4 -4
- package/mbt.min.js +12 -12
- package/mbt.min.js.map +4 -4
- package/ol/controls/RoutingControl.d.ts +13 -13
- package/ol/controls/RoutingControl.js +64 -48
- package/ol/layers/RealtimeLayer.js +2 -8
- package/ol/renderers/MaplibreLayerRenderer.js +0 -1
- package/package.json +4 -4
- package/types/common.d.ts +2 -4
- package/types/routing.d.ts +63 -63
- package/types/stops.d.ts +65 -65
package/types/stops.d.ts
CHANGED
|
@@ -3,41 +3,41 @@
|
|
|
3
3
|
* Do not make direct changes to the file.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
export interface
|
|
6
|
+
export interface paths {
|
|
7
7
|
'/': {
|
|
8
8
|
/** Returns a stop (or multiple) as GeoJSON FeatureCollection */
|
|
9
9
|
get: {
|
|
10
10
|
parameters: {
|
|
11
11
|
query: {
|
|
12
|
-
/**
|
|
13
|
-
* left,bottom,right,up coordinates in WGS84 wherein the
|
|
14
|
-
* station should lie
|
|
15
|
-
*/
|
|
16
|
-
bbox?: string;
|
|
17
|
-
/** which field to look up, default: all of them */
|
|
18
|
-
field?: 'coords' | 'id' | 'name';
|
|
19
12
|
/** Control how many matches will be returned */
|
|
20
13
|
limit?: number;
|
|
14
|
+
/** Anything you'd like to search for */
|
|
15
|
+
q: string;
|
|
16
|
+
/**
|
|
17
|
+
* comma seperated list, order chooses which agency will be preferred
|
|
18
|
+
* as ident_source (for id and code fields)
|
|
19
|
+
*/
|
|
20
|
+
prefagencies?: 'sbb' | 'db';
|
|
21
21
|
/**
|
|
22
22
|
* comma seperated list of mot's which should be available
|
|
23
23
|
* at the stop
|
|
24
24
|
*/
|
|
25
25
|
mots?:
|
|
26
26
|
| 'bus'
|
|
27
|
-
| 'cable_car'
|
|
28
27
|
| 'ferry'
|
|
29
|
-
| 'funicular'
|
|
30
28
|
| 'gondola'
|
|
29
|
+
| 'tram'
|
|
31
30
|
| 'rail'
|
|
32
|
-
| '
|
|
33
|
-
| '
|
|
31
|
+
| 'funicular'
|
|
32
|
+
| 'cable_car'
|
|
33
|
+
| 'subway';
|
|
34
34
|
/**
|
|
35
|
-
*
|
|
36
|
-
*
|
|
35
|
+
* left,bottom,right,up coordinates in WGS84 wherein the
|
|
36
|
+
* station should lie
|
|
37
37
|
*/
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
|
|
38
|
+
bbox?: string;
|
|
39
|
+
/** which field to look up, default: all of them */
|
|
40
|
+
field?: 'id' | 'name' | 'coords';
|
|
41
41
|
/**
|
|
42
42
|
* Coordinates in WGS84 (in lat,lon order) used to rank stops close to
|
|
43
43
|
* this position higher
|
|
@@ -49,81 +49,81 @@ export interface Paths {
|
|
|
49
49
|
/** stop(s) */
|
|
50
50
|
200: {
|
|
51
51
|
schema: {
|
|
52
|
+
/** @enum {string} */
|
|
53
|
+
type?: 'FeatureCollection';
|
|
52
54
|
features?: {
|
|
53
|
-
/** @
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
* @example [
|
|
57
|
-
* 7.439119,
|
|
58
|
-
* 46.94882
|
|
59
|
-
* ]
|
|
60
|
-
*/
|
|
61
|
-
coordinates?: number[];
|
|
62
|
-
/** @enum {string} */
|
|
63
|
-
type?: 'Point';
|
|
64
|
-
};
|
|
55
|
+
/** @enum {string} */
|
|
56
|
+
type?: 'Feature';
|
|
65
57
|
properties?: {
|
|
58
|
+
/** @description internal ID */
|
|
59
|
+
uid?: string;
|
|
66
60
|
/**
|
|
67
|
-
* @description
|
|
68
|
-
*
|
|
69
|
-
* @example BN
|
|
61
|
+
* @description name of the stop
|
|
62
|
+
* @example Bern
|
|
70
63
|
*/
|
|
71
|
-
|
|
64
|
+
name?: string;
|
|
72
65
|
/**
|
|
73
66
|
* @description 2 letter country code where the station is located
|
|
74
67
|
* @example CH
|
|
75
68
|
*/
|
|
76
69
|
country_code?: string;
|
|
77
70
|
/**
|
|
78
|
-
* @description
|
|
79
|
-
*
|
|
71
|
+
* @description how well the result matches your query, 0
|
|
72
|
+
* means best
|
|
80
73
|
*/
|
|
81
|
-
|
|
74
|
+
rank?: number;
|
|
82
75
|
/**
|
|
83
|
-
* @description
|
|
84
|
-
* @
|
|
76
|
+
* @description array of translations of the stopname
|
|
77
|
+
* @default []
|
|
85
78
|
*/
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
79
|
+
translated_names?: {
|
|
80
|
+
value?: string;
|
|
81
|
+
/** @enum {string} */
|
|
82
|
+
language?: 'de' | 'en' | 'fr' | 'it';
|
|
83
|
+
}[];
|
|
89
84
|
/** @description Means of transport that are available at this station */
|
|
90
85
|
mot?: {
|
|
91
86
|
bus?: boolean;
|
|
92
|
-
cable_car?: boolean;
|
|
93
87
|
ferry?: boolean;
|
|
94
|
-
funicular?: boolean;
|
|
95
88
|
gondola?: boolean;
|
|
89
|
+
tram?: boolean;
|
|
96
90
|
rail?: boolean;
|
|
91
|
+
funicular?: boolean;
|
|
92
|
+
cable_car?: boolean;
|
|
97
93
|
subway?: boolean;
|
|
98
|
-
tram?: boolean;
|
|
99
94
|
};
|
|
100
95
|
/**
|
|
101
|
-
* @description
|
|
102
|
-
* @example
|
|
96
|
+
* @description source agency for id and code (see below)
|
|
97
|
+
* @example sbb
|
|
103
98
|
*/
|
|
104
|
-
|
|
99
|
+
ident_source?: string;
|
|
105
100
|
/**
|
|
106
|
-
* @description
|
|
107
|
-
*
|
|
101
|
+
* @description uic number
|
|
102
|
+
* @example 8507000
|
|
108
103
|
*/
|
|
109
|
-
|
|
104
|
+
id?: string;
|
|
110
105
|
/**
|
|
111
|
-
* @description
|
|
112
|
-
*
|
|
106
|
+
* @description Abbreviation code from the transport agency (e.g. DS100 for Deutsche Bahn)
|
|
107
|
+
*
|
|
108
|
+
* @example BN
|
|
113
109
|
*/
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
110
|
+
code?: string;
|
|
111
|
+
/** @description ifopt identifier, if available */
|
|
112
|
+
ifopt?: string;
|
|
113
|
+
};
|
|
114
|
+
/** @description the coordinates of the stop */
|
|
115
|
+
geometry?: {
|
|
116
|
+
/** @enum {string} */
|
|
117
|
+
type?: 'Point';
|
|
118
|
+
/**
|
|
119
|
+
* @example [
|
|
120
|
+
* 7.439119,
|
|
121
|
+
* 46.94882
|
|
122
|
+
* ]
|
|
123
|
+
*/
|
|
124
|
+
coordinates?: number[];
|
|
121
125
|
};
|
|
122
|
-
/** @enum {string} */
|
|
123
|
-
type?: 'Feature';
|
|
124
126
|
}[];
|
|
125
|
-
/** @enum {string} */
|
|
126
|
-
type?: 'FeatureCollection';
|
|
127
127
|
};
|
|
128
128
|
};
|
|
129
129
|
/** limit parameter too high */
|
|
@@ -138,6 +138,6 @@ export interface Paths {
|
|
|
138
138
|
};
|
|
139
139
|
}
|
|
140
140
|
|
|
141
|
-
export interface
|
|
141
|
+
export interface operations {}
|
|
142
142
|
|
|
143
|
-
export interface
|
|
143
|
+
export interface external {}
|