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.
Files changed (55) hide show
  1. package/api/HttpAPI.d.ts +5 -5
  2. package/api/RealtimeAPI.d.ts +204 -171
  3. package/api/RealtimeAPI.js +306 -258
  4. package/api/RoutingAPI.d.ts +4 -4
  5. package/api/StopsAPI.d.ts +4 -4
  6. package/api/WebSocketAPI.d.ts +60 -66
  7. package/api/WebSocketAPI.js +164 -164
  8. package/api/index.js +1 -1
  9. package/common/controls/StopFinderControlCommon.d.ts +11 -11
  10. package/common/controls/StopFinderControlCommon.js +30 -30
  11. package/common/index.d.ts +1 -1
  12. package/common/index.js +1 -1
  13. package/common/mixins/RealtimeLayerMixin.d.ts +149 -155
  14. package/common/mixins/RealtimeLayerMixin.js +395 -395
  15. package/common/styles/realtimeDefaultStyle.js +6 -6
  16. package/common/styles/realtimeHeadingStyle.js +5 -5
  17. package/common/utils/getMapGlCopyrights.d.ts +1 -1
  18. package/common/utils/getMapGlCopyrights.js +3 -3
  19. package/common/utils/getVehiclePosition.d.ts +2 -2
  20. package/common/utils/getVehiclePosition.js +7 -7
  21. package/common/utils/renderTrajectories.js +5 -5
  22. package/common/utils/sortByDelay.js +5 -5
  23. package/maplibre/layers/RealtimeLayer.d.ts +59 -64
  24. package/maplibre/layers/RealtimeLayer.js +8 -8
  25. package/maplibre/utils/getSourceCoordinates.js +5 -5
  26. package/mbt.js +7205 -7031
  27. package/mbt.js.map +4 -4
  28. package/mbt.min.js +25 -25
  29. package/mbt.min.js.map +4 -4
  30. package/ol/controls/RoutingControl.d.ts +81 -87
  31. package/ol/controls/RoutingControl.js +216 -218
  32. package/ol/layers/Layer.d.ts +9 -9
  33. package/ol/layers/MaplibreLayer.d.ts +10 -10
  34. package/ol/layers/MaplibreLayer.js +9 -3
  35. package/ol/layers/MaplibreStyleLayer.d.ts +77 -76
  36. package/ol/layers/MaplibreStyleLayer.js +237 -238
  37. package/ol/layers/RealtimeLayer.d.ts +92 -96
  38. package/ol/layers/RealtimeLayer.js +139 -131
  39. package/ol/mixins/MobilityLayerMixin.d.ts +9 -9
  40. package/ol/mixins/PropertiesLayerMixin.d.ts +33 -36
  41. package/ol/mixins/PropertiesLayerMixin.js +73 -72
  42. package/ol/renderers/MaplibreLayerRenderer.js +3 -3
  43. package/ol/renderers/MaplibreStyleLayerRenderer.d.ts +6 -6
  44. package/ol/renderers/MaplibreStyleLayerRenderer.js +14 -17
  45. package/ol/renderers/RealtimeLayerRenderer.d.ts +6 -6
  46. package/ol/renderers/RealtimeLayerRenderer.js +54 -52
  47. package/ol/utils/getFeatureInfoAtCoordinate.d.ts +1 -1
  48. package/ol/utils/getFeatureInfoAtCoordinate.js +10 -16
  49. package/package.json +6 -5
  50. package/setupTests.js +3 -4
  51. package/types/common.d.ts +53 -49
  52. package/types/index.d.ts +1 -1
  53. package/types/realtime.d.ts +91 -93
  54. package/types/routing.d.ts +60 -60
  55. 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
- * comma seperated list, order chooses which agency will be preferred
18
- * as ident_source (for id and code fields)
13
+ * left,bottom,right,up coordinates in WGS84 wherein the
14
+ * station should lie
19
15
  */
20
- prefagencies?: 'sbb' | 'db';
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
- | 'funicular'
32
- | 'cable_car'
33
- | 'subway';
32
+ | 'subway'
33
+ | 'tram';
34
34
  /**
35
- * left,bottom,right,up coordinates in WGS84 wherein the
36
- * station should lie
35
+ * comma seperated list, order chooses which agency will be preferred
36
+ * as ident_source (for id and code fields)
37
37
  */
38
- bbox?: string;
39
- /** which field to look up, default: all of them */
40
- field?: 'id' | 'name' | 'coords';
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
- /** @enum {string} */
56
- type?: 'Feature';
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 name of the stop
62
- * @example Bern
67
+ * @description Abbreviation code from the transport agency (e.g. DS100 for Deutsche Bahn)
68
+ *
69
+ * @example BN
63
70
  */
64
- name?: string;
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 how well the result matches your query, 0
72
- * means best
78
+ * @description uic number
79
+ * @example 8507000
73
80
  */
74
- rank?: number;
81
+ id?: string;
75
82
  /**
76
- * @description array of translations of the stopname
77
- * @default []
83
+ * @description source agency for id and code (see below)
84
+ * @example sbb
78
85
  */
79
- translated_names?: {
80
- value?: string;
81
- /** @enum {string} */
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 source agency for id and code (see below)
97
- * @example sbb
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
- id?: string;
104
+ name?: string;
105
105
  /**
106
- * @description Abbreviation code from the transport agency (e.g. DS100 for Deutsche Bahn)
107
- *
108
- * @example BN
106
+ * @description how well the result matches your query, 0
107
+ * means best
109
108
  */
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';
109
+ rank?: number;
118
110
  /**
119
- * @example [
120
- * 7.439119,
121
- * 46.94882
122
- * ]
111
+ * @description array of translations of the stopname
112
+ * @default []
123
113
  */
124
- coordinates?: number[];
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 */