@stadiamaps/ferrostar 0.48.1 → 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 +232 -232
- package/ferrostar_bg.wasm +0 -0
- package/package.json +1 -1
package/ferrostar.d.ts
CHANGED
|
@@ -1,46 +1,85 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* A geographic bounding box defined by its corners.
|
|
5
5
|
*/
|
|
6
|
-
export
|
|
6
|
+
export interface BoundingBox {
|
|
7
|
+
/**
|
|
8
|
+
* The southwest corner of the bounding box.
|
|
9
|
+
*/
|
|
10
|
+
sw: GeographicCoordinate;
|
|
11
|
+
/**
|
|
12
|
+
* The northeast corner of the bounding box.
|
|
13
|
+
*/
|
|
14
|
+
ne: GeographicCoordinate;
|
|
15
|
+
}
|
|
7
16
|
|
|
8
17
|
/**
|
|
9
|
-
*
|
|
18
|
+
* The lane type blocked by the incident.
|
|
10
19
|
*/
|
|
11
|
-
export type
|
|
20
|
+
export type BlockedLane = "left" | "left center" | "left turn lane" | "center" | "right" | "right center" | "right turn lane" | "hov";
|
|
12
21
|
|
|
13
22
|
/**
|
|
14
|
-
*
|
|
23
|
+
* An instruction that can be synthesized using a TTS engine to announce an upcoming maneuver.
|
|
15
24
|
*
|
|
16
|
-
*
|
|
17
|
-
* considered unstable.
|
|
25
|
+
* Note that these do not have any locale information attached.
|
|
18
26
|
*/
|
|
19
|
-
export interface
|
|
20
|
-
geometry: GeographicCoordinate[];
|
|
21
|
-
bbox: BoundingBox;
|
|
27
|
+
export interface SpokenInstruction {
|
|
22
28
|
/**
|
|
23
|
-
*
|
|
29
|
+
* Plain-text instruction which can be synthesized with a TTS engine.
|
|
24
30
|
*/
|
|
25
|
-
|
|
31
|
+
text: string;
|
|
26
32
|
/**
|
|
27
|
-
*
|
|
28
|
-
* Note that this is distinct from the *geometry* which includes all points visited.
|
|
29
|
-
* A waypoint represents a start/end point for a route leg.
|
|
33
|
+
* Speech Synthesis Markup Language, which should be preferred by clients capable of understanding it.
|
|
30
34
|
*/
|
|
31
|
-
|
|
32
|
-
|
|
35
|
+
ssml: string | undefined;
|
|
36
|
+
/**
|
|
37
|
+
* How far (in meters) from the upcoming maneuver the instruction should start being spoken.
|
|
38
|
+
*/
|
|
39
|
+
triggerDistanceBeforeManeuver: number;
|
|
40
|
+
/**
|
|
41
|
+
* A unique identifier for this instruction.
|
|
42
|
+
*
|
|
43
|
+
* This is provided so that platform-layer integrations can easily disambiguate between distinct utterances,
|
|
44
|
+
* which may have the same textual content.
|
|
45
|
+
* UUIDs conveniently fill this purpose.
|
|
46
|
+
*
|
|
47
|
+
* NOTE: While it is possible to deterministically create UUIDs, we do not do so at this time.
|
|
48
|
+
* This should be theoretically possible though if someone cares to write up a proposal and a PR.
|
|
49
|
+
*/
|
|
50
|
+
utteranceId: string;
|
|
33
51
|
}
|
|
34
52
|
|
|
35
53
|
/**
|
|
36
|
-
*
|
|
54
|
+
* Details about congestion for an incident.
|
|
37
55
|
*/
|
|
38
|
-
export interface
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
56
|
+
export interface Congestion {
|
|
57
|
+
/**
|
|
58
|
+
* The level of congestion caused by the incident.
|
|
59
|
+
*
|
|
60
|
+
* 0 = no congestion
|
|
61
|
+
*
|
|
62
|
+
* 100 = road closed
|
|
63
|
+
*
|
|
64
|
+
* Other values mean no congestion was calculated
|
|
65
|
+
*/
|
|
66
|
+
value: number;
|
|
42
67
|
}
|
|
43
68
|
|
|
69
|
+
/**
|
|
70
|
+
* The type of incident that has occurred.
|
|
71
|
+
*/
|
|
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";
|
|
82
|
+
|
|
44
83
|
/**
|
|
45
84
|
* A maneuver (such as a turn or merge) followed by travel of a certain distance until reaching
|
|
46
85
|
* the next step.
|
|
@@ -104,47 +143,84 @@ export interface RouteStep {
|
|
|
104
143
|
}
|
|
105
144
|
|
|
106
145
|
/**
|
|
107
|
-
*
|
|
146
|
+
* Information describing the series of steps needed to travel between two or more points.
|
|
108
147
|
*
|
|
109
|
-
*
|
|
110
|
-
*
|
|
148
|
+
* NOTE: This type is unstable and is still under active development and should be
|
|
149
|
+
* considered unstable.
|
|
150
|
+
*/
|
|
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
|
+
}
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* The broad class of maneuver to perform.
|
|
111
169
|
*
|
|
112
|
-
*
|
|
113
|
-
* Heading updates are not related to a change in the user\'s location.
|
|
170
|
+
* This is usually combined with [`ManeuverModifier`] in [`VisualInstructionContent`].
|
|
114
171
|
*/
|
|
115
|
-
export
|
|
116
|
-
|
|
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";
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* A geographic coordinate in WGS84.
|
|
176
|
+
*/
|
|
177
|
+
export interface GeographicCoordinate {
|
|
117
178
|
/**
|
|
118
|
-
* The
|
|
179
|
+
* The latitude (in degrees).
|
|
119
180
|
*/
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
181
|
+
lat: number;
|
|
182
|
+
/**
|
|
183
|
+
* The Longitude (in degrees).
|
|
184
|
+
*/
|
|
185
|
+
lng: number;
|
|
124
186
|
}
|
|
125
187
|
|
|
126
188
|
/**
|
|
127
|
-
*
|
|
189
|
+
* The content of a visual instruction.
|
|
128
190
|
*/
|
|
129
|
-
export interface
|
|
191
|
+
export interface LaneInfo {
|
|
192
|
+
active: boolean;
|
|
193
|
+
directions: string[];
|
|
194
|
+
activeDirection: string | undefined;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
/**
|
|
198
|
+
* The speed of the user from the location provider.
|
|
199
|
+
*/
|
|
200
|
+
export interface Speed {
|
|
130
201
|
/**
|
|
131
|
-
* The
|
|
132
|
-
*
|
|
133
|
-
* This is usually given more visual weight.
|
|
202
|
+
* The user\'s speed in meters per second.
|
|
134
203
|
*/
|
|
135
|
-
|
|
204
|
+
value: number;
|
|
136
205
|
/**
|
|
137
|
-
*
|
|
206
|
+
* The accuracy of the speed value, measured in meters per second.
|
|
138
207
|
*/
|
|
139
|
-
|
|
208
|
+
accuracy: number | undefined;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
/**
|
|
212
|
+
* The direction in which the user/device is observed to be traveling.
|
|
213
|
+
*/
|
|
214
|
+
export interface CourseOverGround {
|
|
140
215
|
/**
|
|
141
|
-
*
|
|
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).
|
|
142
218
|
*/
|
|
143
|
-
|
|
219
|
+
degrees: number;
|
|
144
220
|
/**
|
|
145
|
-
*
|
|
221
|
+
* The accuracy of the course value, measured in degrees.
|
|
146
222
|
*/
|
|
147
|
-
|
|
223
|
+
accuracy: number | undefined;
|
|
148
224
|
}
|
|
149
225
|
|
|
150
226
|
/**
|
|
@@ -233,31 +309,57 @@ export interface Incident {
|
|
|
233
309
|
}
|
|
234
310
|
|
|
235
311
|
/**
|
|
236
|
-
*
|
|
312
|
+
* The impact of the incident that has occurred.
|
|
237
313
|
*/
|
|
238
|
-
export
|
|
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 {
|
|
239
320
|
/**
|
|
240
|
-
* The
|
|
321
|
+
* The primary instruction content.
|
|
322
|
+
*
|
|
323
|
+
* This is usually given more visual weight.
|
|
241
324
|
*/
|
|
242
|
-
|
|
325
|
+
primaryContent: VisualInstructionContent;
|
|
243
326
|
/**
|
|
244
|
-
*
|
|
327
|
+
* Optional secondary instruction content.
|
|
245
328
|
*/
|
|
246
|
-
|
|
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;
|
|
247
338
|
}
|
|
248
339
|
|
|
249
340
|
/**
|
|
250
|
-
*
|
|
341
|
+
* Additional information to further specify a [`ManeuverType`].
|
|
251
342
|
*/
|
|
252
|
-
export
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
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.
|
|
347
|
+
*
|
|
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.
|
|
353
|
+
*/
|
|
354
|
+
export interface UserLocation {
|
|
355
|
+
coordinates: GeographicCoordinate;
|
|
257
356
|
/**
|
|
258
|
-
* The
|
|
357
|
+
* The estimated accuracy of the coordinate (in meters)
|
|
259
358
|
*/
|
|
260
|
-
|
|
359
|
+
horizontalAccuracy: number;
|
|
360
|
+
courseOverGround: CourseOverGround | undefined;
|
|
361
|
+
timestamp: { secs_since_epoch: number; nanos_since_epoch: number };
|
|
362
|
+
speed: Speed | undefined;
|
|
261
363
|
}
|
|
262
364
|
|
|
263
365
|
/**
|
|
@@ -300,104 +402,6 @@ export interface Waypoint {
|
|
|
300
402
|
properties: number[] | undefined;
|
|
301
403
|
}
|
|
302
404
|
|
|
303
|
-
/**
|
|
304
|
-
* An instruction that can be synthesized using a TTS engine to announce an upcoming maneuver.
|
|
305
|
-
*
|
|
306
|
-
* Note that these do not have any locale information attached.
|
|
307
|
-
*/
|
|
308
|
-
export interface SpokenInstruction {
|
|
309
|
-
/**
|
|
310
|
-
* Plain-text instruction which can be synthesized with a TTS engine.
|
|
311
|
-
*/
|
|
312
|
-
text: string;
|
|
313
|
-
/**
|
|
314
|
-
* Speech Synthesis Markup Language, which should be preferred by clients capable of understanding it.
|
|
315
|
-
*/
|
|
316
|
-
ssml: string | undefined;
|
|
317
|
-
/**
|
|
318
|
-
* How far (in meters) from the upcoming maneuver the instruction should start being spoken.
|
|
319
|
-
*/
|
|
320
|
-
triggerDistanceBeforeManeuver: number;
|
|
321
|
-
/**
|
|
322
|
-
* A unique identifier for this instruction.
|
|
323
|
-
*
|
|
324
|
-
* This is provided so that platform-layer integrations can easily disambiguate between distinct utterances,
|
|
325
|
-
* which may have the same textual content.
|
|
326
|
-
* UUIDs conveniently fill this purpose.
|
|
327
|
-
*
|
|
328
|
-
* NOTE: While it is possible to deterministically create UUIDs, we do not do so at this time.
|
|
329
|
-
* This should be theoretically possible though if someone cares to write up a proposal and a PR.
|
|
330
|
-
*/
|
|
331
|
-
utteranceId: string;
|
|
332
|
-
}
|
|
333
|
-
|
|
334
|
-
/**
|
|
335
|
-
* The direction in which the user/device is observed to be traveling.
|
|
336
|
-
*/
|
|
337
|
-
export interface CourseOverGround {
|
|
338
|
-
/**
|
|
339
|
-
* The direction in which the user\'s device is traveling, measured in clockwise degrees from
|
|
340
|
-
* true north (N = 0, E = 90, S = 180, W = 270).
|
|
341
|
-
*/
|
|
342
|
-
degrees: number;
|
|
343
|
-
/**
|
|
344
|
-
* The accuracy of the course value, measured in degrees.
|
|
345
|
-
*/
|
|
346
|
-
accuracy: number | undefined;
|
|
347
|
-
}
|
|
348
|
-
|
|
349
|
-
/**
|
|
350
|
-
* The broad class of maneuver to perform.
|
|
351
|
-
*
|
|
352
|
-
* This is usually combined with [`ManeuverModifier`] in [`VisualInstructionContent`].
|
|
353
|
-
*/
|
|
354
|
-
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";
|
|
355
|
-
|
|
356
|
-
/**
|
|
357
|
-
* The speed of the user from the location provider.
|
|
358
|
-
*/
|
|
359
|
-
export interface Speed {
|
|
360
|
-
/**
|
|
361
|
-
* The user\'s speed in meters per second.
|
|
362
|
-
*/
|
|
363
|
-
value: number;
|
|
364
|
-
/**
|
|
365
|
-
* The accuracy of the speed value, measured in meters per second.
|
|
366
|
-
*/
|
|
367
|
-
accuracy: number | undefined;
|
|
368
|
-
}
|
|
369
|
-
|
|
370
|
-
/**
|
|
371
|
-
* The impact of the incident that has occurred.
|
|
372
|
-
*/
|
|
373
|
-
export type Impact = "unknown" | "critical" | "major" | "minor" | "low";
|
|
374
|
-
|
|
375
|
-
/**
|
|
376
|
-
* Details about congestion for an incident.
|
|
377
|
-
*/
|
|
378
|
-
export interface Congestion {
|
|
379
|
-
/**
|
|
380
|
-
* The level of congestion caused by the incident.
|
|
381
|
-
*
|
|
382
|
-
* 0 = no congestion
|
|
383
|
-
*
|
|
384
|
-
* 100 = road closed
|
|
385
|
-
*
|
|
386
|
-
* Other values mean no congestion was calculated
|
|
387
|
-
*/
|
|
388
|
-
value: number;
|
|
389
|
-
}
|
|
390
|
-
|
|
391
|
-
/**
|
|
392
|
-
* The lane type blocked by the incident.
|
|
393
|
-
*/
|
|
394
|
-
export type BlockedLane = "left" | "left center" | "left turn lane" | "center" | "right" | "right center" | "right turn lane" | "hov";
|
|
395
|
-
|
|
396
|
-
/**
|
|
397
|
-
* Describes characteristics of the waypoint for routing purposes.
|
|
398
|
-
*/
|
|
399
|
-
export type WaypointKind = "Break" | "Via";
|
|
400
|
-
|
|
401
405
|
/**
|
|
402
406
|
* The content of a visual instruction.
|
|
403
407
|
*/
|
|
@@ -433,13 +437,9 @@ export interface VisualInstructionContent {
|
|
|
433
437
|
}
|
|
434
438
|
|
|
435
439
|
/**
|
|
436
|
-
*
|
|
437
|
-
*
|
|
438
|
-
* This is needed by consumers like Android Auto to determine whether
|
|
439
|
-
* a roundabout should be rendered as clockwise (right-hand traffic)
|
|
440
|
-
* or counterclockwise (left-hand traffic).
|
|
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.
|
|
@@ -469,6 +469,8 @@ export interface NavigationRecordingEvent {
|
|
|
469
469
|
*/
|
|
470
470
|
export type NavigationRecordingEventData = { StateUpdate: { trip_state: TripState; step_advance_condition: SerializableStepAdvanceCondition } } | { RouteUpdate: { route: Route } };
|
|
471
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.
|
|
@@ -484,7 +486,16 @@ export interface LocationSimulationState {
|
|
|
484
486
|
bias: LocationBias;
|
|
485
487
|
}
|
|
486
488
|
|
|
487
|
-
|
|
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";
|
|
488
499
|
|
|
489
500
|
/**
|
|
490
501
|
* A set of optional filters to exclude candidate edges based on their attributes.
|
|
@@ -643,17 +654,6 @@ export interface ValhallaWaypointProperties {
|
|
|
643
654
|
allow_uturns: boolean | undefined;
|
|
644
655
|
}
|
|
645
656
|
|
|
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,45 @@ 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
|
+
|
|
704
|
+
/**
|
|
705
|
+
* High-level state describing progress through a route.
|
|
706
|
+
*/
|
|
707
|
+
export interface TripProgress {
|
|
708
|
+
/**
|
|
709
|
+
* The distance to the next maneuver, in meters.
|
|
710
|
+
*/
|
|
711
|
+
distanceToNextManeuver: number;
|
|
712
|
+
/**
|
|
713
|
+
* The total distance remaining in the trip, in meters.
|
|
714
|
+
*
|
|
715
|
+
* This is the sum of the distance remaining in the current step and the distance remaining in all subsequent steps.
|
|
716
|
+
*/
|
|
717
|
+
distanceRemaining: number;
|
|
718
|
+
/**
|
|
719
|
+
* The total duration remaining in the trip, in seconds.
|
|
720
|
+
*/
|
|
721
|
+
durationRemaining: number;
|
|
722
|
+
}
|
|
723
|
+
|
|
694
724
|
/**
|
|
695
725
|
* The state of a navigation session.
|
|
696
726
|
*
|
|
@@ -700,6 +730,27 @@ export type GraphHopperVoiceUnits = "metric" | "imperial";
|
|
|
700
730
|
*/
|
|
701
731
|
export type TripState = { Idle: { user_location: UserLocation | undefined } } | { Navigating: { currentStepGeometryIndex: number | undefined; userLocation: UserLocation; snappedUserLocation: UserLocation; remainingSteps: RouteStep[]; remainingWaypoints: Waypoint[]; progress: TripProgress; summary: TripSummary; deviation: RouteDeviation; visualInstruction: VisualInstruction | undefined; spokenInstruction: SpokenInstruction | undefined; annotationJson: string | undefined } } | { Complete: { user_location: UserLocation; summary: TripSummary } };
|
|
702
732
|
|
|
733
|
+
/**
|
|
734
|
+
* Controls when a waypoint should be marked as complete.
|
|
735
|
+
*
|
|
736
|
+
* While a route may consist of thousands of points, waypoints are special.
|
|
737
|
+
* A simple trip will have only one waypoint: the final destination.
|
|
738
|
+
* A more complex trip may have several intermediate stops.
|
|
739
|
+
* Just as the navigation state keeps track of which steps remain in the route,
|
|
740
|
+
* it also tracks which waypoints are still remaining.
|
|
741
|
+
*
|
|
742
|
+
* Tracking waypoints enables Ferrostar to reroute users when they stray off the route line.
|
|
743
|
+
* The waypoint advance mode specifies how the framework decides
|
|
744
|
+
* that a waypoint has been visited (and is removed from the list).
|
|
745
|
+
*
|
|
746
|
+
* NOTE: Advancing to the next *step* and advancing to the next *waypoint*
|
|
747
|
+
* are separate processes.
|
|
748
|
+
* This will not normally cause any issues, but keep in mind that
|
|
749
|
+
* manually advancing to the next step does not *necessarily* imply
|
|
750
|
+
* that the waypoint will be marked as complete!
|
|
751
|
+
*/
|
|
752
|
+
export type WaypointAdvanceMode = { WaypointWithinRange: number } | { WaypointAlongAdvancingStep: number };
|
|
753
|
+
|
|
703
754
|
/**
|
|
704
755
|
* Information pertaining to the user\'s full navigation trip. This includes
|
|
705
756
|
* simple stats like total duration and distance.
|
|
@@ -723,16 +774,6 @@ export interface TripSummary {
|
|
|
723
774
|
endedAt: Date | null;
|
|
724
775
|
}
|
|
725
776
|
|
|
726
|
-
export interface SerializableNavState {
|
|
727
|
-
tripState: TripState;
|
|
728
|
-
stepAdvanceCondition: SerializableStepAdvanceCondition;
|
|
729
|
-
}
|
|
730
|
-
|
|
731
|
-
/**
|
|
732
|
-
* Controls filtering/post-processing of user course by the [`NavigationController`].
|
|
733
|
-
*/
|
|
734
|
-
export type CourseFiltering = "SnapToRoute" | "Raw";
|
|
735
|
-
|
|
736
777
|
export interface SerializableNavigationControllerConfig {
|
|
737
778
|
/**
|
|
738
779
|
* Configures when navigation advances to the next waypoint in the route.
|
|
@@ -763,47 +804,6 @@ export interface SerializableNavigationControllerConfig {
|
|
|
763
804
|
snappedLocationCourseFiltering: CourseFiltering;
|
|
764
805
|
}
|
|
765
806
|
|
|
766
|
-
/**
|
|
767
|
-
* Controls when a waypoint should be marked as complete.
|
|
768
|
-
*
|
|
769
|
-
* While a route may consist of thousands of points, waypoints are special.
|
|
770
|
-
* A simple trip will have only one waypoint: the final destination.
|
|
771
|
-
* A more complex trip may have several intermediate stops.
|
|
772
|
-
* Just as the navigation state keeps track of which steps remain in the route,
|
|
773
|
-
* it also tracks which waypoints are still remaining.
|
|
774
|
-
*
|
|
775
|
-
* Tracking waypoints enables Ferrostar to reroute users when they stray off the route line.
|
|
776
|
-
* The waypoint advance mode specifies how the framework decides
|
|
777
|
-
* that a waypoint has been visited (and is removed from the list).
|
|
778
|
-
*
|
|
779
|
-
* NOTE: Advancing to the next *step* and advancing to the next *waypoint*
|
|
780
|
-
* are separate processes.
|
|
781
|
-
* This will not normally cause any issues, but keep in mind that
|
|
782
|
-
* manually advancing to the next step does not *necessarily* imply
|
|
783
|
-
* that the waypoint will be marked as complete!
|
|
784
|
-
*/
|
|
785
|
-
export type WaypointAdvanceMode = { WaypointWithinRange: number } | { WaypointAlongAdvancingStep: number };
|
|
786
|
-
|
|
787
|
-
/**
|
|
788
|
-
* High-level state describing progress through a route.
|
|
789
|
-
*/
|
|
790
|
-
export interface TripProgress {
|
|
791
|
-
/**
|
|
792
|
-
* The distance to the next maneuver, in meters.
|
|
793
|
-
*/
|
|
794
|
-
distanceToNextManeuver: number;
|
|
795
|
-
/**
|
|
796
|
-
* The total distance remaining in the trip, in meters.
|
|
797
|
-
*
|
|
798
|
-
* This is the sum of the distance remaining in the current step and the distance remaining in all subsequent steps.
|
|
799
|
-
*/
|
|
800
|
-
distanceRemaining: number;
|
|
801
|
-
/**
|
|
802
|
-
* The total duration remaining in the trip, in seconds.
|
|
803
|
-
*/
|
|
804
|
-
durationRemaining: number;
|
|
805
|
-
}
|
|
806
|
-
|
|
807
807
|
|
|
808
808
|
export class NavigationController {
|
|
809
809
|
free(): void;
|
package/ferrostar_bg.wasm
CHANGED
|
Binary file
|