mobility-toolbox-js 3.0.0-beta.19 → 3.0.0-beta.20
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/HttpAPI.d.ts +5 -5
- package/api/RealtimeAPI.d.ts +204 -171
- package/api/RealtimeAPI.js +306 -258
- package/api/RoutingAPI.d.ts +4 -4
- package/api/StopsAPI.d.ts +4 -4
- package/api/WebSocketAPI.d.ts +60 -66
- package/api/WebSocketAPI.js +164 -164
- package/api/index.js +1 -1
- package/common/controls/StopFinderControlCommon.d.ts +11 -11
- package/common/controls/StopFinderControlCommon.js +30 -30
- package/common/index.d.ts +1 -1
- package/common/index.js +1 -1
- package/common/mixins/RealtimeLayerMixin.d.ts +149 -155
- package/common/mixins/RealtimeLayerMixin.js +395 -395
- package/common/styles/realtimeDefaultStyle.js +6 -6
- package/common/styles/realtimeHeadingStyle.js +5 -5
- package/common/utils/getMapGlCopyrights.d.ts +1 -1
- package/common/utils/getMapGlCopyrights.js +3 -3
- package/common/utils/getVehiclePosition.d.ts +2 -2
- package/common/utils/getVehiclePosition.js +7 -7
- package/common/utils/renderTrajectories.js +5 -5
- package/common/utils/sortByDelay.js +5 -5
- package/maplibre/layers/RealtimeLayer.d.ts +59 -64
- package/maplibre/layers/RealtimeLayer.js +8 -8
- package/maplibre/utils/getSourceCoordinates.js +5 -5
- package/mbt.js +7205 -7031
- package/mbt.js.map +4 -4
- package/mbt.min.js +25 -25
- package/mbt.min.js.map +4 -4
- package/ol/controls/RoutingControl.d.ts +81 -87
- package/ol/controls/RoutingControl.js +216 -218
- package/ol/layers/Layer.d.ts +9 -9
- package/ol/layers/MaplibreLayer.d.ts +10 -10
- package/ol/layers/MaplibreLayer.js +9 -3
- package/ol/layers/MaplibreStyleLayer.d.ts +77 -76
- package/ol/layers/MaplibreStyleLayer.js +237 -238
- package/ol/layers/RealtimeLayer.d.ts +92 -96
- package/ol/layers/RealtimeLayer.js +139 -131
- package/ol/mixins/MobilityLayerMixin.d.ts +9 -9
- package/ol/mixins/PropertiesLayerMixin.d.ts +33 -36
- package/ol/mixins/PropertiesLayerMixin.js +73 -72
- package/ol/renderers/MaplibreLayerRenderer.js +3 -3
- package/ol/renderers/MaplibreStyleLayerRenderer.d.ts +6 -6
- package/ol/renderers/MaplibreStyleLayerRenderer.js +14 -17
- package/ol/renderers/RealtimeLayerRenderer.d.ts +6 -6
- package/ol/renderers/RealtimeLayerRenderer.js +54 -52
- package/ol/utils/getFeatureInfoAtCoordinate.d.ts +1 -1
- package/ol/utils/getFeatureInfoAtCoordinate.js +10 -16
- package/package.json +6 -5
- package/setupTests.js +3 -4
- package/types/common.d.ts +53 -49
- package/types/index.d.ts +1 -1
- package/types/realtime.d.ts +91 -93
- package/types/routing.d.ts +60 -60
- package/types/stops.d.ts +62 -62
package/types/stops.d.ts
CHANGED
|
@@ -9,35 +9,35 @@ export interface Paths {
|
|
|
9
9
|
get: {
|
|
10
10
|
parameters: {
|
|
11
11
|
query: {
|
|
12
|
-
/** Control how many matches will be returned */
|
|
13
|
-
limit?: number;
|
|
14
|
-
/** Anything you'd like to search for */
|
|
15
|
-
q: string;
|
|
16
12
|
/**
|
|
17
|
-
*
|
|
18
|
-
*
|
|
13
|
+
* left,bottom,right,up coordinates in WGS84 wherein the
|
|
14
|
+
* station should lie
|
|
19
15
|
*/
|
|
20
|
-
|
|
16
|
+
bbox?: string;
|
|
17
|
+
/** which field to look up, default: all of them */
|
|
18
|
+
field?: 'coords' | 'id' | 'name';
|
|
19
|
+
/** Control how many matches will be returned */
|
|
20
|
+
limit?: number;
|
|
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'
|
|
27
28
|
| 'ferry'
|
|
29
|
+
| 'funicular'
|
|
28
30
|
| 'gondola'
|
|
29
|
-
| 'tram'
|
|
30
31
|
| 'rail'
|
|
31
|
-
| '
|
|
32
|
-
| '
|
|
33
|
-
| 'subway';
|
|
32
|
+
| 'subway'
|
|
33
|
+
| 'tram';
|
|
34
34
|
/**
|
|
35
|
-
*
|
|
36
|
-
*
|
|
35
|
+
* comma seperated list, order chooses which agency will be preferred
|
|
36
|
+
* as ident_source (for id and code fields)
|
|
37
37
|
*/
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
|
|
38
|
+
prefagencies?: 'db' | 'sbb';
|
|
39
|
+
/** Anything you'd like to search for */
|
|
40
|
+
q: string;
|
|
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';
|
|
54
52
|
features?: {
|
|
55
|
-
/** @
|
|
56
|
-
|
|
53
|
+
/** @description the coordinates of the stop */
|
|
54
|
+
geometry?: {
|
|
55
|
+
/**
|
|
56
|
+
* @example [
|
|
57
|
+
* 7.439119,
|
|
58
|
+
* 46.94882
|
|
59
|
+
* ]
|
|
60
|
+
*/
|
|
61
|
+
coordinates?: number[];
|
|
62
|
+
/** @enum {string} */
|
|
63
|
+
type?: 'Point';
|
|
64
|
+
};
|
|
57
65
|
properties?: {
|
|
58
|
-
/** @description internal ID */
|
|
59
|
-
uid?: string;
|
|
60
66
|
/**
|
|
61
|
-
* @description
|
|
62
|
-
*
|
|
67
|
+
* @description Abbreviation code from the transport agency (e.g. DS100 for Deutsche Bahn)
|
|
68
|
+
*
|
|
69
|
+
* @example BN
|
|
63
70
|
*/
|
|
64
|
-
|
|
71
|
+
code?: string;
|
|
65
72
|
/**
|
|
66
73
|
* @description 2 letter country code where the station is located
|
|
67
74
|
* @example CH
|
|
68
75
|
*/
|
|
69
76
|
country_code?: string;
|
|
70
77
|
/**
|
|
71
|
-
* @description
|
|
72
|
-
*
|
|
78
|
+
* @description uic number
|
|
79
|
+
* @example 8507000
|
|
73
80
|
*/
|
|
74
|
-
|
|
81
|
+
id?: string;
|
|
75
82
|
/**
|
|
76
|
-
* @description
|
|
77
|
-
* @
|
|
83
|
+
* @description source agency for id and code (see below)
|
|
84
|
+
* @example sbb
|
|
78
85
|
*/
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
language?: 'de' | 'en' | 'fr' | 'it';
|
|
83
|
-
}[];
|
|
86
|
+
ident_source?: string;
|
|
87
|
+
/** @description ifopt identifier, if available */
|
|
88
|
+
ifopt?: string;
|
|
84
89
|
/** @description Means of transport that are available at this station */
|
|
85
90
|
mot?: {
|
|
86
91
|
bus?: boolean;
|
|
92
|
+
cable_car?: boolean;
|
|
87
93
|
ferry?: boolean;
|
|
94
|
+
funicular?: boolean;
|
|
88
95
|
gondola?: boolean;
|
|
89
|
-
tram?: boolean;
|
|
90
96
|
rail?: boolean;
|
|
91
|
-
funicular?: boolean;
|
|
92
|
-
cable_car?: boolean;
|
|
93
97
|
subway?: boolean;
|
|
98
|
+
tram?: boolean;
|
|
94
99
|
};
|
|
95
100
|
/**
|
|
96
|
-
* @description
|
|
97
|
-
* @example
|
|
98
|
-
*/
|
|
99
|
-
ident_source?: string;
|
|
100
|
-
/**
|
|
101
|
-
* @description uic number
|
|
102
|
-
* @example 8507000
|
|
101
|
+
* @description name of the stop
|
|
102
|
+
* @example Bern
|
|
103
103
|
*/
|
|
104
|
-
|
|
104
|
+
name?: string;
|
|
105
105
|
/**
|
|
106
|
-
* @description
|
|
107
|
-
*
|
|
108
|
-
* @example BN
|
|
106
|
+
* @description how well the result matches your query, 0
|
|
107
|
+
* means best
|
|
109
108
|
*/
|
|
110
|
-
|
|
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';
|
|
109
|
+
rank?: number;
|
|
118
110
|
/**
|
|
119
|
-
* @
|
|
120
|
-
*
|
|
121
|
-
* 46.94882
|
|
122
|
-
* ]
|
|
111
|
+
* @description array of translations of the stopname
|
|
112
|
+
* @default []
|
|
123
113
|
*/
|
|
124
|
-
|
|
114
|
+
translated_names?: {
|
|
115
|
+
/** @enum {string} */
|
|
116
|
+
language?: 'de' | 'en' | 'fr' | 'it';
|
|
117
|
+
value?: string;
|
|
118
|
+
}[];
|
|
119
|
+
/** @description internal ID */
|
|
120
|
+
uid?: string;
|
|
125
121
|
};
|
|
122
|
+
/** @enum {string} */
|
|
123
|
+
type?: 'Feature';
|
|
126
124
|
}[];
|
|
125
|
+
/** @enum {string} */
|
|
126
|
+
type?: 'FeatureCollection';
|
|
127
127
|
};
|
|
128
128
|
};
|
|
129
129
|
/** limit parameter too high */
|