@stadiamaps/ferrostar 0.48.0 → 0.49.0
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/ferrostar.d.ts +261 -261
- package/ferrostar_bg.wasm +0 -0
- package/package.json +1 -1
package/ferrostar.d.ts
CHANGED
|
@@ -1,75 +1,23 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
/**
|
|
4
|
-
* A geographic
|
|
5
|
-
*/
|
|
6
|
-
export interface GeographicCoordinate {
|
|
7
|
-
/**
|
|
8
|
-
* The latitude (in degrees).
|
|
9
|
-
*/
|
|
10
|
-
lat: number;
|
|
11
|
-
/**
|
|
12
|
-
* The Longitude (in degrees).
|
|
13
|
-
*/
|
|
14
|
-
lng: number;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* The speed of the user from the location provider.
|
|
4
|
+
* A geographic bounding box defined by its corners.
|
|
19
5
|
*/
|
|
20
|
-
export interface
|
|
6
|
+
export interface BoundingBox {
|
|
21
7
|
/**
|
|
22
|
-
* The
|
|
8
|
+
* The southwest corner of the bounding box.
|
|
23
9
|
*/
|
|
24
|
-
|
|
10
|
+
sw: GeographicCoordinate;
|
|
25
11
|
/**
|
|
26
|
-
* The
|
|
12
|
+
* The northeast corner of the bounding box.
|
|
27
13
|
*/
|
|
28
|
-
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* The content of a visual instruction.
|
|
33
|
-
*/
|
|
34
|
-
export interface LaneInfo {
|
|
35
|
-
active: boolean;
|
|
36
|
-
directions: string[];
|
|
37
|
-
activeDirection: string | undefined;
|
|
14
|
+
ne: GeographicCoordinate;
|
|
38
15
|
}
|
|
39
16
|
|
|
40
17
|
/**
|
|
41
|
-
* The
|
|
18
|
+
* The lane type blocked by the incident.
|
|
42
19
|
*/
|
|
43
|
-
export
|
|
44
|
-
/**
|
|
45
|
-
* The text to display.
|
|
46
|
-
*/
|
|
47
|
-
text: string;
|
|
48
|
-
/**
|
|
49
|
-
* A standardized maneuver type (if any).
|
|
50
|
-
*/
|
|
51
|
-
maneuverType: ManeuverType | undefined;
|
|
52
|
-
/**
|
|
53
|
-
* A standardized maneuver modifier (if any).
|
|
54
|
-
*/
|
|
55
|
-
maneuverModifier: ManeuverModifier | undefined;
|
|
56
|
-
/**
|
|
57
|
-
* If applicable, the number of degrees you need to go around the roundabout before exiting.
|
|
58
|
-
*
|
|
59
|
-
* For example, entering and exiting the roundabout in the same direction of travel
|
|
60
|
-
* (as if you had gone straight, apart from the detour)
|
|
61
|
-
* would be an exit angle of 180 degrees.
|
|
62
|
-
*/
|
|
63
|
-
roundaboutExitDegrees: number | undefined;
|
|
64
|
-
/**
|
|
65
|
-
* Detailed information about the lanes. This is typically only present in sub-maneuver instructions.
|
|
66
|
-
*/
|
|
67
|
-
laneInfo: LaneInfo[] | undefined;
|
|
68
|
-
/**
|
|
69
|
-
* The exit number (or similar identifier like \"8B\").
|
|
70
|
-
*/
|
|
71
|
-
exitNumbers: string[];
|
|
72
|
-
}
|
|
20
|
+
export type BlockedLane = "left" | "left center" | "left turn lane" | "center" | "right" | "right center" | "right turn lane" | "hov";
|
|
73
21
|
|
|
74
22
|
/**
|
|
75
23
|
* An instruction that can be synthesized using a TTS engine to announce an upcoming maneuver.
|
|
@@ -103,33 +51,34 @@ export interface SpokenInstruction {
|
|
|
103
51
|
}
|
|
104
52
|
|
|
105
53
|
/**
|
|
106
|
-
*
|
|
54
|
+
* Details about congestion for an incident.
|
|
107
55
|
*/
|
|
108
|
-
export interface
|
|
56
|
+
export interface Congestion {
|
|
109
57
|
/**
|
|
110
|
-
* The
|
|
58
|
+
* The level of congestion caused by the incident.
|
|
111
59
|
*
|
|
112
|
-
*
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
*
|
|
117
|
-
*/
|
|
118
|
-
secondaryContent: VisualInstructionContent | undefined;
|
|
119
|
-
/**
|
|
120
|
-
* Optional sub-maneuver instruction content.
|
|
121
|
-
*/
|
|
122
|
-
subContent: VisualInstructionContent | undefined;
|
|
123
|
-
/**
|
|
124
|
-
* How far (in meters) from the upcoming maneuver the instruction should start being displayed
|
|
60
|
+
* 0 = no congestion
|
|
61
|
+
*
|
|
62
|
+
* 100 = road closed
|
|
63
|
+
*
|
|
64
|
+
* Other values mean no congestion was calculated
|
|
125
65
|
*/
|
|
126
|
-
|
|
66
|
+
value: number;
|
|
127
67
|
}
|
|
128
68
|
|
|
129
69
|
/**
|
|
130
|
-
* The
|
|
70
|
+
* The type of incident that has occurred.
|
|
131
71
|
*/
|
|
132
|
-
export type
|
|
72
|
+
export type IncidentType = "accident" | "congestion" | "construction" | "disabled_vehicle" | "lane_restriction" | "mass_transit" | "miscellaneous" | "other_news" | "planned_event" | "road_closure" | "road_hazard" | "weather";
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Which side of the road traffic drives on.
|
|
76
|
+
*
|
|
77
|
+
* This is needed by consumers like Android Auto to determine whether
|
|
78
|
+
* a roundabout should be rendered as clockwise (right-hand traffic)
|
|
79
|
+
* or counterclockwise (left-hand traffic).
|
|
80
|
+
*/
|
|
81
|
+
export type DrivingSide = "left" | "right";
|
|
133
82
|
|
|
134
83
|
/**
|
|
135
84
|
* A maneuver (such as a turn or merge) followed by travel of a certain distance until reaching
|
|
@@ -194,113 +143,84 @@ export interface RouteStep {
|
|
|
194
143
|
}
|
|
195
144
|
|
|
196
145
|
/**
|
|
197
|
-
*
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
/**
|
|
202
|
-
* The impact of the incident that has occurred.
|
|
203
|
-
*/
|
|
204
|
-
export type Impact = "unknown" | "critical" | "major" | "minor" | "low";
|
|
205
|
-
|
|
206
|
-
/**
|
|
207
|
-
* Describes characteristics of the waypoint for routing purposes.
|
|
146
|
+
* Information describing the series of steps needed to travel between two or more points.
|
|
147
|
+
*
|
|
148
|
+
* NOTE: This type is unstable and is still under active development and should be
|
|
149
|
+
* considered unstable.
|
|
208
150
|
*/
|
|
209
|
-
export
|
|
151
|
+
export interface Route {
|
|
152
|
+
geometry: GeographicCoordinate[];
|
|
153
|
+
bbox: BoundingBox;
|
|
154
|
+
/**
|
|
155
|
+
* The total route distance, in meters.
|
|
156
|
+
*/
|
|
157
|
+
distance: number;
|
|
158
|
+
/**
|
|
159
|
+
* The ordered list of waypoints to visit, including the starting point.
|
|
160
|
+
* Note that this is distinct from the *geometry* which includes all points visited.
|
|
161
|
+
* A waypoint represents a start/end point for a route leg.
|
|
162
|
+
*/
|
|
163
|
+
waypoints: Waypoint[];
|
|
164
|
+
steps: RouteStep[];
|
|
165
|
+
}
|
|
210
166
|
|
|
211
167
|
/**
|
|
212
|
-
*
|
|
168
|
+
* The broad class of maneuver to perform.
|
|
169
|
+
*
|
|
170
|
+
* This is usually combined with [`ManeuverModifier`] in [`VisualInstructionContent`].
|
|
213
171
|
*/
|
|
214
|
-
export type
|
|
172
|
+
export type ManeuverType = "turn" | "new name" | "depart" | "arrive" | "merge" | "on ramp" | "off ramp" | "fork" | "end of road" | "continue" | "roundabout" | "rotary" | "roundabout turn" | "notification" | "exit roundabout" | "exit rotary";
|
|
215
173
|
|
|
216
174
|
/**
|
|
217
|
-
*
|
|
218
|
-
*
|
|
219
|
-
* In addition to coordinates, this includes estimated accuracy and course information,
|
|
220
|
-
* which can influence navigation logic and UI.
|
|
221
|
-
*
|
|
222
|
-
* NOTE: Heading is absent on purpose.
|
|
223
|
-
* Heading updates are not related to a change in the user\'s location.
|
|
175
|
+
* A geographic coordinate in WGS84.
|
|
224
176
|
*/
|
|
225
|
-
export interface
|
|
226
|
-
coordinates: GeographicCoordinate;
|
|
177
|
+
export interface GeographicCoordinate {
|
|
227
178
|
/**
|
|
228
|
-
* The
|
|
179
|
+
* The latitude (in degrees).
|
|
229
180
|
*/
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
181
|
+
lat: number;
|
|
182
|
+
/**
|
|
183
|
+
* The Longitude (in degrees).
|
|
184
|
+
*/
|
|
185
|
+
lng: number;
|
|
234
186
|
}
|
|
235
187
|
|
|
236
188
|
/**
|
|
237
|
-
*
|
|
189
|
+
* The content of a visual instruction.
|
|
238
190
|
*/
|
|
239
|
-
export interface
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
* 0 = no congestion
|
|
244
|
-
*
|
|
245
|
-
* 100 = road closed
|
|
246
|
-
*
|
|
247
|
-
* Other values mean no congestion was calculated
|
|
248
|
-
*/
|
|
249
|
-
value: number;
|
|
191
|
+
export interface LaneInfo {
|
|
192
|
+
active: boolean;
|
|
193
|
+
directions: string[];
|
|
194
|
+
activeDirection: string | undefined;
|
|
250
195
|
}
|
|
251
196
|
|
|
252
197
|
/**
|
|
253
|
-
*
|
|
198
|
+
* The speed of the user from the location provider.
|
|
254
199
|
*/
|
|
255
|
-
export interface
|
|
200
|
+
export interface Speed {
|
|
256
201
|
/**
|
|
257
|
-
* The
|
|
202
|
+
* The user\'s speed in meters per second.
|
|
258
203
|
*/
|
|
259
|
-
|
|
204
|
+
value: number;
|
|
260
205
|
/**
|
|
261
|
-
* The
|
|
206
|
+
* The accuracy of the speed value, measured in meters per second.
|
|
262
207
|
*/
|
|
263
|
-
|
|
208
|
+
accuracy: number | undefined;
|
|
264
209
|
}
|
|
265
210
|
|
|
266
211
|
/**
|
|
267
|
-
*
|
|
268
|
-
*
|
|
269
|
-
* Within the context of Ferrostar, a route request consists of exactly one [`UserLocation`]
|
|
270
|
-
* and at least one [`Waypoint`]. The route starts from the user\'s location (which may
|
|
271
|
-
* contain other useful information like their current course for the [`crate::routing_adapters::RouteRequestGenerator`]
|
|
272
|
-
* to use) and proceeds through one or more waypoints.
|
|
273
|
-
*
|
|
274
|
-
* Waypoints are used during route calculation, are tracked throughout the lifecycle of a trip,
|
|
275
|
-
* and are used for recalculating when the user deviates from the expected route.
|
|
276
|
-
*
|
|
277
|
-
* Note that support for properties beyond basic geographic coordinates varies by routing engine.
|
|
212
|
+
* The direction in which the user/device is observed to be traveling.
|
|
278
213
|
*/
|
|
279
|
-
export interface
|
|
280
|
-
coordinate: GeographicCoordinate;
|
|
281
|
-
kind: WaypointKind;
|
|
214
|
+
export interface CourseOverGround {
|
|
282
215
|
/**
|
|
283
|
-
*
|
|
284
|
-
*
|
|
285
|
-
* Most users should prefer convenience functions like [`Waypoint::new_with_valhalla_properties`]
|
|
286
|
-
* (or, on platforms like iOS and Android with `UniFFI` bindings, [`crate::routing_adapters::valhalla::create_waypoint_with_valhalla_properties`]).
|
|
287
|
-
*
|
|
288
|
-
* # Format guidelines
|
|
289
|
-
*
|
|
290
|
-
* This MAY be any format agreed upon by both the request generator and response parser.
|
|
291
|
-
* However, to promote interoperability, all implementations in the Ferrostar codebase
|
|
292
|
-
* MUST use JSON.
|
|
293
|
-
*
|
|
294
|
-
* We selected JSON is selected not because it is good,
|
|
295
|
-
* but because generics (i.e., becoming `Waypoint<T>`, where an example `T` is `ValhallaProperties`)
|
|
296
|
-
* would be way too painful, particularly for foreign code.
|
|
297
|
-
* Especially JavaScript.
|
|
298
|
-
*
|
|
299
|
-
* In any case, [`crate::routing_adapters::RouteRequestGenerator`] and [`crate::routing_adapters::RouteResponseParser`]
|
|
300
|
-
* implementations SHOULD document their level support for this,
|
|
301
|
-
* ideally with an exportable record type.
|
|
216
|
+
* The direction in which the user\'s device is traveling, measured in clockwise degrees from
|
|
217
|
+
* true north (N = 0, E = 90, S = 180, W = 270).
|
|
302
218
|
*/
|
|
303
|
-
|
|
219
|
+
degrees: number;
|
|
220
|
+
/**
|
|
221
|
+
* The accuracy of the course value, measured in degrees.
|
|
222
|
+
*/
|
|
223
|
+
accuracy: number | undefined;
|
|
304
224
|
}
|
|
305
225
|
|
|
306
226
|
/**
|
|
@@ -389,70 +309,143 @@ export interface Incident {
|
|
|
389
309
|
}
|
|
390
310
|
|
|
391
311
|
/**
|
|
392
|
-
*
|
|
312
|
+
* The impact of the incident that has occurred.
|
|
313
|
+
*/
|
|
314
|
+
export type Impact = "unknown" | "critical" | "major" | "minor" | "low";
|
|
315
|
+
|
|
316
|
+
/**
|
|
317
|
+
* An instruction for visual display (usually as banners) at a specific point along a [`RouteStep`].
|
|
318
|
+
*/
|
|
319
|
+
export interface VisualInstruction {
|
|
320
|
+
/**
|
|
321
|
+
* The primary instruction content.
|
|
322
|
+
*
|
|
323
|
+
* This is usually given more visual weight.
|
|
324
|
+
*/
|
|
325
|
+
primaryContent: VisualInstructionContent;
|
|
326
|
+
/**
|
|
327
|
+
* Optional secondary instruction content.
|
|
328
|
+
*/
|
|
329
|
+
secondaryContent: VisualInstructionContent | undefined;
|
|
330
|
+
/**
|
|
331
|
+
* Optional sub-maneuver instruction content.
|
|
332
|
+
*/
|
|
333
|
+
subContent: VisualInstructionContent | undefined;
|
|
334
|
+
/**
|
|
335
|
+
* How far (in meters) from the upcoming maneuver the instruction should start being displayed
|
|
336
|
+
*/
|
|
337
|
+
triggerDistanceBeforeManeuver: number;
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
/**
|
|
341
|
+
* Additional information to further specify a [`ManeuverType`].
|
|
342
|
+
*/
|
|
343
|
+
export type ManeuverModifier = "uturn" | "sharp right" | "right" | "slight right" | "straight" | "slight left" | "left" | "sharp left";
|
|
344
|
+
|
|
345
|
+
/**
|
|
346
|
+
* The location of the user that is navigating.
|
|
393
347
|
*
|
|
394
|
-
*
|
|
395
|
-
*
|
|
348
|
+
* In addition to coordinates, this includes estimated accuracy and course information,
|
|
349
|
+
* which can influence navigation logic and UI.
|
|
350
|
+
*
|
|
351
|
+
* NOTE: Heading is absent on purpose.
|
|
352
|
+
* Heading updates are not related to a change in the user\'s location.
|
|
396
353
|
*/
|
|
397
|
-
export interface
|
|
398
|
-
|
|
399
|
-
bbox: BoundingBox;
|
|
354
|
+
export interface UserLocation {
|
|
355
|
+
coordinates: GeographicCoordinate;
|
|
400
356
|
/**
|
|
401
|
-
* The
|
|
357
|
+
* The estimated accuracy of the coordinate (in meters)
|
|
402
358
|
*/
|
|
403
|
-
|
|
359
|
+
horizontalAccuracy: number;
|
|
360
|
+
courseOverGround: CourseOverGround | undefined;
|
|
361
|
+
timestamp: { secs_since_epoch: number; nanos_since_epoch: number };
|
|
362
|
+
speed: Speed | undefined;
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
/**
|
|
366
|
+
* A waypoint along a route.
|
|
367
|
+
*
|
|
368
|
+
* Within the context of Ferrostar, a route request consists of exactly one [`UserLocation`]
|
|
369
|
+
* and at least one [`Waypoint`]. The route starts from the user\'s location (which may
|
|
370
|
+
* contain other useful information like their current course for the [`crate::routing_adapters::RouteRequestGenerator`]
|
|
371
|
+
* to use) and proceeds through one or more waypoints.
|
|
372
|
+
*
|
|
373
|
+
* Waypoints are used during route calculation, are tracked throughout the lifecycle of a trip,
|
|
374
|
+
* and are used for recalculating when the user deviates from the expected route.
|
|
375
|
+
*
|
|
376
|
+
* Note that support for properties beyond basic geographic coordinates varies by routing engine.
|
|
377
|
+
*/
|
|
378
|
+
export interface Waypoint {
|
|
379
|
+
coordinate: GeographicCoordinate;
|
|
380
|
+
kind: WaypointKind;
|
|
404
381
|
/**
|
|
405
|
-
*
|
|
406
|
-
*
|
|
407
|
-
*
|
|
382
|
+
* Optional additional properties that will be passed on to the [`crate::routing_adapters::RouteRequestGenerator`].
|
|
383
|
+
*
|
|
384
|
+
* Most users should prefer convenience functions like [`Waypoint::new_with_valhalla_properties`]
|
|
385
|
+
* (or, on platforms like iOS and Android with `UniFFI` bindings, [`crate::routing_adapters::valhalla::create_waypoint_with_valhalla_properties`]).
|
|
386
|
+
*
|
|
387
|
+
* # Format guidelines
|
|
388
|
+
*
|
|
389
|
+
* This MAY be any format agreed upon by both the request generator and response parser.
|
|
390
|
+
* However, to promote interoperability, all implementations in the Ferrostar codebase
|
|
391
|
+
* MUST use JSON.
|
|
392
|
+
*
|
|
393
|
+
* We selected JSON is selected not because it is good,
|
|
394
|
+
* but because generics (i.e., becoming `Waypoint<T>`, where an example `T` is `ValhallaProperties`)
|
|
395
|
+
* would be way too painful, particularly for foreign code.
|
|
396
|
+
* Especially JavaScript.
|
|
397
|
+
*
|
|
398
|
+
* In any case, [`crate::routing_adapters::RouteRequestGenerator`] and [`crate::routing_adapters::RouteResponseParser`]
|
|
399
|
+
* implementations SHOULD document their level support for this,
|
|
400
|
+
* ideally with an exportable record type.
|
|
408
401
|
*/
|
|
409
|
-
|
|
410
|
-
steps: RouteStep[];
|
|
402
|
+
properties: number[] | undefined;
|
|
411
403
|
}
|
|
412
404
|
|
|
413
405
|
/**
|
|
414
|
-
* The
|
|
406
|
+
* The content of a visual instruction.
|
|
415
407
|
*/
|
|
416
|
-
export interface
|
|
408
|
+
export interface VisualInstructionContent {
|
|
417
409
|
/**
|
|
418
|
-
* The
|
|
419
|
-
* true north (N = 0, E = 90, S = 180, W = 270).
|
|
410
|
+
* The text to display.
|
|
420
411
|
*/
|
|
421
|
-
|
|
412
|
+
text: string;
|
|
422
413
|
/**
|
|
423
|
-
*
|
|
414
|
+
* A standardized maneuver type (if any).
|
|
424
415
|
*/
|
|
425
|
-
|
|
416
|
+
maneuverType: ManeuverType | undefined;
|
|
417
|
+
/**
|
|
418
|
+
* A standardized maneuver modifier (if any).
|
|
419
|
+
*/
|
|
420
|
+
maneuverModifier: ManeuverModifier | undefined;
|
|
421
|
+
/**
|
|
422
|
+
* If applicable, the number of degrees you need to go around the roundabout before exiting.
|
|
423
|
+
*
|
|
424
|
+
* For example, entering and exiting the roundabout in the same direction of travel
|
|
425
|
+
* (as if you had gone straight, apart from the detour)
|
|
426
|
+
* would be an exit angle of 180 degrees.
|
|
427
|
+
*/
|
|
428
|
+
roundaboutExitDegrees: number | undefined;
|
|
429
|
+
/**
|
|
430
|
+
* Detailed information about the lanes. This is typically only present in sub-maneuver instructions.
|
|
431
|
+
*/
|
|
432
|
+
laneInfo: LaneInfo[] | undefined;
|
|
433
|
+
/**
|
|
434
|
+
* The exit number (or similar identifier like \"8B\").
|
|
435
|
+
*/
|
|
436
|
+
exitNumbers: string[];
|
|
426
437
|
}
|
|
427
438
|
|
|
428
439
|
/**
|
|
429
|
-
*
|
|
430
|
-
*
|
|
431
|
-
* This is needed by consumers like Android Auto to determine whether
|
|
432
|
-
* a roundabout should be rendered as clockwise (right-hand traffic)
|
|
433
|
-
* or counterclockwise (left-hand traffic).
|
|
434
|
-
*/
|
|
435
|
-
export type DrivingSide = "left" | "right";
|
|
436
|
-
|
|
437
|
-
/**
|
|
438
|
-
* The broad class of maneuver to perform.
|
|
439
|
-
*
|
|
440
|
-
* This is usually combined with [`ManeuverModifier`] in [`VisualInstructionContent`].
|
|
440
|
+
* Describes characteristics of the waypoint for routing purposes.
|
|
441
441
|
*/
|
|
442
|
-
export type
|
|
442
|
+
export type WaypointKind = "Break" | "Via";
|
|
443
443
|
|
|
444
444
|
/**
|
|
445
445
|
* Configurations for built-in route providers.
|
|
446
446
|
*/
|
|
447
447
|
export type WellKnownRouteProvider = { Valhalla: { endpointUrl: string; profile: string; optionsJson?: string | undefined } } | { GraphHopper: { endpointUrl: string; profile: string; locale: string; voiceUnits: GraphHopperVoiceUnits; optionsJson?: string | undefined } };
|
|
448
448
|
|
|
449
|
-
/**
|
|
450
|
-
* The event type.
|
|
451
|
-
*
|
|
452
|
-
* For full replayability, we record things like rerouting, and not just location updates.
|
|
453
|
-
*/
|
|
454
|
-
export type NavigationRecordingEventData = { StateUpdate: { trip_state: TripState; step_advance_condition: SerializableStepAdvanceCondition } } | { RouteUpdate: { route: Route } };
|
|
455
|
-
|
|
456
449
|
/**
|
|
457
450
|
* An event that occurs during navigation.
|
|
458
451
|
*
|
|
@@ -469,14 +462,21 @@ export interface NavigationRecordingEvent {
|
|
|
469
462
|
event_data: NavigationRecordingEventData;
|
|
470
463
|
}
|
|
471
464
|
|
|
465
|
+
/**
|
|
466
|
+
* The event type.
|
|
467
|
+
*
|
|
468
|
+
* For full replayability, we record things like rerouting, and not just location updates.
|
|
469
|
+
*/
|
|
470
|
+
export type NavigationRecordingEventData = { StateUpdate: { trip_state: TripState; step_advance_condition: SerializableStepAdvanceCondition } } | { RouteUpdate: { route: Route } };
|
|
471
|
+
|
|
472
|
+
export type SimulationError = { PolylineError: { error: string } } | "NotEnoughPoints";
|
|
473
|
+
|
|
472
474
|
/**
|
|
473
475
|
* Controls how simulated locations deviate from the actual route line.
|
|
474
476
|
* This simulates real-world GPS behavior where readings often have systematic bias.
|
|
475
477
|
*/
|
|
476
478
|
export type LocationBias = { Left: number } | { Right: number } | { Random: number } | "None";
|
|
477
479
|
|
|
478
|
-
export type SimulationError = { PolylineError: { error: string } } | "NotEnoughPoints";
|
|
479
|
-
|
|
480
480
|
/**
|
|
481
481
|
* The current state of the simulation.
|
|
482
482
|
*/
|
|
@@ -486,6 +486,17 @@ export interface LocationSimulationState {
|
|
|
486
486
|
bias: LocationBias;
|
|
487
487
|
}
|
|
488
488
|
|
|
489
|
+
/**
|
|
490
|
+
* Specifies a preferred side for departing from / arriving at a location.
|
|
491
|
+
*
|
|
492
|
+
* Examples:
|
|
493
|
+
* - Germany drives on the right side of the road. A value of `same` will only allow leaving
|
|
494
|
+
* or arriving at a location such that it is on your right.
|
|
495
|
+
* - Australia drives on the left side of the road. Passing a value of `same` will only allow
|
|
496
|
+
* leaving or arriving at a location such that it is on your left.
|
|
497
|
+
*/
|
|
498
|
+
export type ValhallaWaypointPreferredSide = "same" | "opposite" | "either";
|
|
499
|
+
|
|
489
500
|
/**
|
|
490
501
|
* A set of optional filters to exclude candidate edges based on their attributes.
|
|
491
502
|
*/
|
|
@@ -530,6 +541,13 @@ export interface ValhallaLocationSearchFilter {
|
|
|
530
541
|
level?: number;
|
|
531
542
|
}
|
|
532
543
|
|
|
544
|
+
/**
|
|
545
|
+
* A road class in the Valhalla taxonomy.
|
|
546
|
+
*
|
|
547
|
+
* These are ordered from highest (fastest travel speed) to lowest.
|
|
548
|
+
*/
|
|
549
|
+
export type ValhallaRoadClass = "motorway" | "trunk" | "primary" | "secondary" | "tertiary" | "unclassified" | "residential" | "service_other";
|
|
550
|
+
|
|
533
551
|
/**
|
|
534
552
|
* Waypoint properties supported by Valhalla servers.
|
|
535
553
|
*
|
|
@@ -636,24 +654,6 @@ export interface ValhallaWaypointProperties {
|
|
|
636
654
|
allow_uturns: boolean | undefined;
|
|
637
655
|
}
|
|
638
656
|
|
|
639
|
-
/**
|
|
640
|
-
* A road class in the Valhalla taxonomy.
|
|
641
|
-
*
|
|
642
|
-
* These are ordered from highest (fastest travel speed) to lowest.
|
|
643
|
-
*/
|
|
644
|
-
export type ValhallaRoadClass = "motorway" | "trunk" | "primary" | "secondary" | "tertiary" | "unclassified" | "residential" | "service_other";
|
|
645
|
-
|
|
646
|
-
/**
|
|
647
|
-
* Specifies a preferred side for departing from / arriving at a location.
|
|
648
|
-
*
|
|
649
|
-
* Examples:
|
|
650
|
-
* - Germany drives on the right side of the road. A value of `same` will only allow leaving
|
|
651
|
-
* or arriving at a location such that it is on your right.
|
|
652
|
-
* - Australia drives on the left side of the road. Passing a value of `same` will only allow
|
|
653
|
-
* leaving or arriving at a location such that it is on your left.
|
|
654
|
-
*/
|
|
655
|
-
export type ValhallaWaypointPreferredSide = "same" | "opposite" | "either";
|
|
656
|
-
|
|
657
657
|
/**
|
|
658
658
|
* Waypoint properties parsed from an OSRM-compatible server response.
|
|
659
659
|
*
|
|
@@ -674,11 +674,6 @@ export interface OsrmWaypointProperties {
|
|
|
674
674
|
distance: number | undefined;
|
|
675
675
|
}
|
|
676
676
|
|
|
677
|
-
/**
|
|
678
|
-
* Determines if the user has deviated from the expected route.
|
|
679
|
-
*/
|
|
680
|
-
export type RouteDeviationTracking = "None" | { StaticThreshold: { minimumHorizontalAccuracy: number; maxAcceptableDeviation: number } };
|
|
681
|
-
|
|
682
677
|
/**
|
|
683
678
|
* Status information that describes whether the user is proceeding according to the route or not.
|
|
684
679
|
*
|
|
@@ -687,10 +682,25 @@ export type RouteDeviationTracking = "None" | { StaticThreshold: { minimumHorizo
|
|
|
687
682
|
*/
|
|
688
683
|
export type RouteDeviation = "NoDeviation" | { OffRoute: { deviationFromRouteLine: number } };
|
|
689
684
|
|
|
685
|
+
/**
|
|
686
|
+
* Determines if the user has deviated from the expected route.
|
|
687
|
+
*/
|
|
688
|
+
export type RouteDeviationTracking = "None" | { StaticThreshold: { minimumHorizontalAccuracy: number; maxAcceptableDeviation: number } };
|
|
689
|
+
|
|
690
690
|
export type SerializableStepAdvanceCondition = "Manual" | { DistanceToEndOfStep: { distance: number; minimumHorizontalAccuracy: number } } | { DistanceFromStep: { distance: number; minimumHorizontalAccuracy: number; calculateWhileOffRoute: boolean } } | { DistanceEntryExit: { distanceToEndOfStep: number; distanceAfterEndStep: number; minimumHorizontalAccuracy: number; hasReachedEndOfCurrentStep: boolean } } | { DistanceEntryAndSnappedExit: { distanceToEndOfStep: number; distanceAfterEndStep: number; minimumHorizontalAccuracy: number; hasReachedEndOfCurrentStep: boolean } } | { OrAdvanceConditions: { conditions: SerializableStepAdvanceCondition[] } } | { AndAdvanceConditions: { conditions: SerializableStepAdvanceCondition[] } };
|
|
691
691
|
|
|
692
692
|
export type GraphHopperVoiceUnits = "metric" | "imperial";
|
|
693
693
|
|
|
694
|
+
export interface SerializableNavState {
|
|
695
|
+
tripState: TripState;
|
|
696
|
+
stepAdvanceCondition: SerializableStepAdvanceCondition;
|
|
697
|
+
}
|
|
698
|
+
|
|
699
|
+
/**
|
|
700
|
+
* Controls filtering/post-processing of user course by the [`NavigationController`].
|
|
701
|
+
*/
|
|
702
|
+
export type CourseFiltering = "SnapToRoute" | "Raw";
|
|
703
|
+
|
|
694
704
|
/**
|
|
695
705
|
* High-level state describing progress through a route.
|
|
696
706
|
*/
|
|
@@ -711,36 +721,6 @@ export interface TripProgress {
|
|
|
711
721
|
durationRemaining: number;
|
|
712
722
|
}
|
|
713
723
|
|
|
714
|
-
export interface SerializableNavigationControllerConfig {
|
|
715
|
-
/**
|
|
716
|
-
* Configures when navigation advances to the next waypoint in the route.
|
|
717
|
-
*/
|
|
718
|
-
waypointAdvance: WaypointAdvanceMode;
|
|
719
|
-
/**
|
|
720
|
-
* Configures when navigation advances to the next step in the route.
|
|
721
|
-
*/
|
|
722
|
-
stepAdvanceCondition: SerializableStepAdvanceCondition;
|
|
723
|
-
/**
|
|
724
|
-
* A special advance condition used for the final 2 route steps (last and arrival).
|
|
725
|
-
*
|
|
726
|
-
* This exists because several of our step advance conditions require entry and
|
|
727
|
-
* exit from a step\'s geometry. The end of the route/arrival doesn\'t always accommodate
|
|
728
|
-
* the expected location updates for the core step advance condition.
|
|
729
|
-
*/
|
|
730
|
-
arrivalStepAdvanceCondition: SerializableStepAdvanceCondition;
|
|
731
|
-
/**
|
|
732
|
-
* Configures when the user is deemed to be off course.
|
|
733
|
-
*
|
|
734
|
-
* NOTE: This is distinct from the action that is taken.
|
|
735
|
-
* It is only the determination that the user has deviated from the expected route.
|
|
736
|
-
*/
|
|
737
|
-
routeDeviationTracking: RouteDeviationTracking;
|
|
738
|
-
/**
|
|
739
|
-
* Configures how the heading component of the snapped location is reported in [`TripState`].
|
|
740
|
-
*/
|
|
741
|
-
snappedLocationCourseFiltering: CourseFiltering;
|
|
742
|
-
}
|
|
743
|
-
|
|
744
724
|
/**
|
|
745
725
|
* The state of a navigation session.
|
|
746
726
|
*
|
|
@@ -794,14 +774,34 @@ export interface TripSummary {
|
|
|
794
774
|
endedAt: Date | null;
|
|
795
775
|
}
|
|
796
776
|
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
777
|
+
export interface SerializableNavigationControllerConfig {
|
|
778
|
+
/**
|
|
779
|
+
* Configures when navigation advances to the next waypoint in the route.
|
|
780
|
+
*/
|
|
781
|
+
waypointAdvance: WaypointAdvanceMode;
|
|
782
|
+
/**
|
|
783
|
+
* Configures when navigation advances to the next step in the route.
|
|
784
|
+
*/
|
|
804
785
|
stepAdvanceCondition: SerializableStepAdvanceCondition;
|
|
786
|
+
/**
|
|
787
|
+
* A special advance condition used for the final 2 route steps (last and arrival).
|
|
788
|
+
*
|
|
789
|
+
* This exists because several of our step advance conditions require entry and
|
|
790
|
+
* exit from a step\'s geometry. The end of the route/arrival doesn\'t always accommodate
|
|
791
|
+
* the expected location updates for the core step advance condition.
|
|
792
|
+
*/
|
|
793
|
+
arrivalStepAdvanceCondition: SerializableStepAdvanceCondition;
|
|
794
|
+
/**
|
|
795
|
+
* Configures when the user is deemed to be off course.
|
|
796
|
+
*
|
|
797
|
+
* NOTE: This is distinct from the action that is taken.
|
|
798
|
+
* It is only the determination that the user has deviated from the expected route.
|
|
799
|
+
*/
|
|
800
|
+
routeDeviationTracking: RouteDeviationTracking;
|
|
801
|
+
/**
|
|
802
|
+
* Configures how the heading component of the snapped location is reported in [`TripState`].
|
|
803
|
+
*/
|
|
804
|
+
snappedLocationCourseFiltering: CourseFiltering;
|
|
805
805
|
}
|
|
806
806
|
|
|
807
807
|
|
package/ferrostar_bg.wasm
CHANGED
|
Binary file
|