@stadiamaps/ferrostar 0.46.0 → 0.47.1
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 +423 -416
- package/ferrostar_bg.js +214 -227
- package/ferrostar_bg.wasm +0 -0
- package/package.json +1 -1
package/ferrostar.d.ts
CHANGED
|
@@ -1,32 +1,173 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* The location of the user that is navigating.
|
|
5
|
+
*
|
|
6
|
+
* In addition to coordinates, this includes estimated accuracy and course information,
|
|
7
|
+
* which can influence navigation logic and UI.
|
|
8
|
+
*
|
|
9
|
+
* NOTE: Heading is absent on purpose.
|
|
10
|
+
* Heading updates are not related to a change in the user\'s location.
|
|
5
11
|
*/
|
|
6
|
-
export
|
|
12
|
+
export interface UserLocation {
|
|
13
|
+
coordinates: GeographicCoordinate;
|
|
14
|
+
/**
|
|
15
|
+
* The estimated accuracy of the coordinate (in meters)
|
|
16
|
+
*/
|
|
17
|
+
horizontalAccuracy: number;
|
|
18
|
+
courseOverGround: CourseOverGround | undefined;
|
|
19
|
+
timestamp: { secs_since_epoch: number; nanos_since_epoch: number };
|
|
20
|
+
speed: Speed | undefined;
|
|
21
|
+
}
|
|
22
|
+
|
|
7
23
|
/**
|
|
8
|
-
*
|
|
24
|
+
* The type of incident that has occurred.
|
|
9
25
|
*/
|
|
10
|
-
export
|
|
26
|
+
export type IncidentType = "accident" | "congestion" | "construction" | "disabled_vehicle" | "lane_restriction" | "mass_transit" | "miscellaneous" | "other_news" | "planned_event" | "road_closure" | "road_hazard" | "weather";
|
|
27
|
+
|
|
11
28
|
/**
|
|
12
|
-
*
|
|
29
|
+
* A geographic coordinate in WGS84.
|
|
13
30
|
*/
|
|
14
|
-
export
|
|
31
|
+
export interface GeographicCoordinate {
|
|
32
|
+
/**
|
|
33
|
+
* The latitude (in degrees).
|
|
34
|
+
*/
|
|
35
|
+
lat: number;
|
|
36
|
+
/**
|
|
37
|
+
* The Longitude (in degrees).
|
|
38
|
+
*/
|
|
39
|
+
lng: number;
|
|
40
|
+
}
|
|
41
|
+
|
|
15
42
|
/**
|
|
16
|
-
*
|
|
43
|
+
* A geographic bounding box defined by its corners.
|
|
17
44
|
*/
|
|
18
|
-
export
|
|
45
|
+
export interface BoundingBox {
|
|
46
|
+
/**
|
|
47
|
+
* The southwest corner of the bounding box.
|
|
48
|
+
*/
|
|
49
|
+
sw: GeographicCoordinate;
|
|
50
|
+
/**
|
|
51
|
+
* The northeast corner of the bounding box.
|
|
52
|
+
*/
|
|
53
|
+
ne: GeographicCoordinate;
|
|
54
|
+
}
|
|
55
|
+
|
|
19
56
|
/**
|
|
20
|
-
*
|
|
57
|
+
* An incident affecting the free flow of traffic,
|
|
58
|
+
* such as constructions, accidents, and congestion.
|
|
59
|
+
*/
|
|
60
|
+
export interface Incident {
|
|
61
|
+
/**
|
|
62
|
+
* A unique identifier for the incident.
|
|
63
|
+
*/
|
|
64
|
+
id: string;
|
|
65
|
+
/**
|
|
66
|
+
* The type of incident.
|
|
67
|
+
*/
|
|
68
|
+
incidentType: IncidentType;
|
|
69
|
+
/**
|
|
70
|
+
* A short description of the incident.
|
|
71
|
+
*/
|
|
72
|
+
description: string | undefined;
|
|
73
|
+
/**
|
|
74
|
+
* A longer description of the incident.
|
|
75
|
+
*/
|
|
76
|
+
longDescription: string | undefined;
|
|
77
|
+
/**
|
|
78
|
+
* The time at which the incident was *last* created.
|
|
79
|
+
*
|
|
80
|
+
* NB: This can change throughout the life of the incident.
|
|
81
|
+
*/
|
|
82
|
+
creationTime: Date | null;
|
|
83
|
+
/**
|
|
84
|
+
* The time at which the incident started or is expected to start (ex: planned closure).
|
|
85
|
+
*/
|
|
86
|
+
startTime: Date | null;
|
|
87
|
+
/**
|
|
88
|
+
* The time at which the incident ended or is expected to end.
|
|
89
|
+
*/
|
|
90
|
+
endTime: Date | null;
|
|
91
|
+
/**
|
|
92
|
+
* The level of impact to traffic.
|
|
93
|
+
*/
|
|
94
|
+
impact: Impact | undefined;
|
|
95
|
+
/**
|
|
96
|
+
* Lanes which are blocked by the incident.
|
|
97
|
+
*/
|
|
98
|
+
lanesBlocked: BlockedLane[];
|
|
99
|
+
/**
|
|
100
|
+
* Info about the amount of congestion on the road around the incident.
|
|
101
|
+
*/
|
|
102
|
+
congestion: Congestion | undefined;
|
|
103
|
+
/**
|
|
104
|
+
* Is the road completely closed?
|
|
105
|
+
*/
|
|
106
|
+
closed: boolean | undefined;
|
|
107
|
+
/**
|
|
108
|
+
* The index into the [`RouteStep`] geometry where the incident starts.
|
|
109
|
+
*/
|
|
110
|
+
geometryIndexStart: number;
|
|
111
|
+
/**
|
|
112
|
+
* The index into the [`RouteStep`] geometry where the incident ends.
|
|
113
|
+
*/
|
|
114
|
+
geometryIndexEnd: number | undefined;
|
|
115
|
+
/**
|
|
116
|
+
* Optional additional information about the type of incident (free-form text).
|
|
117
|
+
*/
|
|
118
|
+
subType: string | undefined;
|
|
119
|
+
/**
|
|
120
|
+
* Optional descriptions about the type of incident (free-form text).
|
|
121
|
+
*/
|
|
122
|
+
subTypeDescription: string | undefined;
|
|
123
|
+
/**
|
|
124
|
+
* The ISO 3166-1 alpha-2 code of the country in which the incident occurs.
|
|
125
|
+
*/
|
|
126
|
+
iso31661Alpha2: string | undefined;
|
|
127
|
+
/**
|
|
128
|
+
* The ISO 3166-1 alpha-3 code of the country in which the incident occurs.
|
|
129
|
+
*/
|
|
130
|
+
iso31661Alpha3: string | undefined;
|
|
131
|
+
/**
|
|
132
|
+
* A list of road names affected by the incident.
|
|
133
|
+
*/
|
|
134
|
+
affectedRoadNames: string[];
|
|
135
|
+
/**
|
|
136
|
+
* The bounding box over which the incident occurs.
|
|
137
|
+
*/
|
|
138
|
+
bbox: BoundingBox | undefined;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* Which side of the road traffic drives on.
|
|
21
143
|
*
|
|
22
|
-
* This is
|
|
144
|
+
* This is needed by consumers like Android Auto to determine whether
|
|
145
|
+
* a roundabout should be rendered as clockwise (right-hand traffic)
|
|
146
|
+
* or counterclockwise (left-hand traffic).
|
|
23
147
|
*/
|
|
24
|
-
export type
|
|
148
|
+
export type DrivingSide = "left" | "right";
|
|
25
149
|
|
|
26
150
|
/**
|
|
27
|
-
* The
|
|
151
|
+
* The direction in which the user/device is observed to be traveling.
|
|
28
152
|
*/
|
|
29
|
-
export
|
|
153
|
+
export interface CourseOverGround {
|
|
154
|
+
/**
|
|
155
|
+
* The direction in which the user\'s device is traveling, measured in clockwise degrees from
|
|
156
|
+
* true north (N = 0, E = 90, S = 180, W = 270).
|
|
157
|
+
*/
|
|
158
|
+
degrees: number;
|
|
159
|
+
/**
|
|
160
|
+
* The accuracy of the course value, measured in degrees.
|
|
161
|
+
*/
|
|
162
|
+
accuracy: number | undefined;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* The broad class of maneuver to perform.
|
|
167
|
+
*
|
|
168
|
+
* This is usually combined with [`ManeuverModifier`] in [`VisualInstructionContent`].
|
|
169
|
+
*/
|
|
170
|
+
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";
|
|
30
171
|
|
|
31
172
|
/**
|
|
32
173
|
* A waypoint along a route.
|
|
@@ -68,6 +209,71 @@ export interface Waypoint {
|
|
|
68
209
|
properties: number[] | undefined;
|
|
69
210
|
}
|
|
70
211
|
|
|
212
|
+
/**
|
|
213
|
+
* An instruction that can be synthesized using a TTS engine to announce an upcoming maneuver.
|
|
214
|
+
*
|
|
215
|
+
* Note that these do not have any locale information attached.
|
|
216
|
+
*/
|
|
217
|
+
export interface SpokenInstruction {
|
|
218
|
+
/**
|
|
219
|
+
* Plain-text instruction which can be synthesized with a TTS engine.
|
|
220
|
+
*/
|
|
221
|
+
text: string;
|
|
222
|
+
/**
|
|
223
|
+
* Speech Synthesis Markup Language, which should be preferred by clients capable of understanding it.
|
|
224
|
+
*/
|
|
225
|
+
ssml: string | undefined;
|
|
226
|
+
/**
|
|
227
|
+
* How far (in meters) from the upcoming maneuver the instruction should start being spoken.
|
|
228
|
+
*/
|
|
229
|
+
triggerDistanceBeforeManeuver: number;
|
|
230
|
+
/**
|
|
231
|
+
* A unique identifier for this instruction.
|
|
232
|
+
*
|
|
233
|
+
* This is provided so that platform-layer integrations can easily disambiguate between distinct utterances,
|
|
234
|
+
* which may have the same textual content.
|
|
235
|
+
* UUIDs conveniently fill this purpose.
|
|
236
|
+
*
|
|
237
|
+
* NOTE: While it is possible to deterministically create UUIDs, we do not do so at this time.
|
|
238
|
+
* This should be theoretically possible though if someone cares to write up a proposal and a PR.
|
|
239
|
+
*/
|
|
240
|
+
utteranceId: string;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
/**
|
|
244
|
+
* The content of a visual instruction.
|
|
245
|
+
*/
|
|
246
|
+
export interface VisualInstructionContent {
|
|
247
|
+
/**
|
|
248
|
+
* The text to display.
|
|
249
|
+
*/
|
|
250
|
+
text: string;
|
|
251
|
+
/**
|
|
252
|
+
* A standardized maneuver type (if any).
|
|
253
|
+
*/
|
|
254
|
+
maneuverType: ManeuverType | undefined;
|
|
255
|
+
/**
|
|
256
|
+
* A standardized maneuver modifier (if any).
|
|
257
|
+
*/
|
|
258
|
+
maneuverModifier: ManeuverModifier | undefined;
|
|
259
|
+
/**
|
|
260
|
+
* If applicable, the number of degrees you need to go around the roundabout before exiting.
|
|
261
|
+
*
|
|
262
|
+
* For example, entering and exiting the roundabout in the same direction of travel
|
|
263
|
+
* (as if you had gone straight, apart from the detour)
|
|
264
|
+
* would be an exit angle of 180 degrees.
|
|
265
|
+
*/
|
|
266
|
+
roundaboutExitDegrees: number | undefined;
|
|
267
|
+
/**
|
|
268
|
+
* Detailed information about the lanes. This is typically only present in sub-maneuver instructions.
|
|
269
|
+
*/
|
|
270
|
+
laneInfo: LaneInfo[] | undefined;
|
|
271
|
+
/**
|
|
272
|
+
* The exit number (or similar identifier like \"8B\").
|
|
273
|
+
*/
|
|
274
|
+
exitNumbers: string[];
|
|
275
|
+
}
|
|
276
|
+
|
|
71
277
|
/**
|
|
72
278
|
* A maneuver (such as a turn or merge) followed by travel of a certain distance until reaching
|
|
73
279
|
* the next step.
|
|
@@ -117,149 +323,61 @@ export interface RouteStep {
|
|
|
117
323
|
* A list of incidents that occur along the step.
|
|
118
324
|
*/
|
|
119
325
|
incidents: Incident[];
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
/**
|
|
123
|
-
* A geographic coordinate in WGS84.
|
|
124
|
-
*/
|
|
125
|
-
export interface GeographicCoordinate {
|
|
126
326
|
/**
|
|
127
|
-
*
|
|
327
|
+
* Which side of the road traffic drives on for this step.
|
|
328
|
+
*
|
|
329
|
+
* This is relevant for roundabouts: left-hand traffic (e.g. UK) uses clockwise roundabouts,
|
|
330
|
+
* while right-hand traffic uses counterclockwise roundabouts.
|
|
128
331
|
*/
|
|
129
|
-
|
|
332
|
+
drivingSide: DrivingSide | undefined;
|
|
130
333
|
/**
|
|
131
|
-
* The
|
|
334
|
+
* The exit number when entering a roundabout (1 = first exit, 2 = second, etc.).
|
|
132
335
|
*/
|
|
133
|
-
|
|
336
|
+
roundaboutExitNumber: number | undefined;
|
|
134
337
|
}
|
|
135
338
|
|
|
136
339
|
/**
|
|
137
|
-
*
|
|
138
|
-
*
|
|
139
|
-
* Note that these do not have any locale information attached.
|
|
340
|
+
* The content of a visual instruction.
|
|
140
341
|
*/
|
|
141
|
-
export interface
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
text: string;
|
|
146
|
-
/**
|
|
147
|
-
* Speech Synthesis Markup Language, which should be preferred by clients capable of understanding it.
|
|
148
|
-
*/
|
|
149
|
-
ssml: string | undefined;
|
|
150
|
-
/**
|
|
151
|
-
* How far (in meters) from the upcoming maneuver the instruction should start being spoken.
|
|
152
|
-
*/
|
|
153
|
-
triggerDistanceBeforeManeuver: number;
|
|
154
|
-
/**
|
|
155
|
-
* A unique identifier for this instruction.
|
|
156
|
-
*
|
|
157
|
-
* This is provided so that platform-layer integrations can easily disambiguate between distinct utterances,
|
|
158
|
-
* which may have the same textual content.
|
|
159
|
-
* UUIDs conveniently fill this purpose.
|
|
160
|
-
*
|
|
161
|
-
* NOTE: While it is possible to deterministically create UUIDs, we do not do so at this time.
|
|
162
|
-
* This should be theoretically possible though if someone cares to write up a proposal and a PR.
|
|
163
|
-
*/
|
|
164
|
-
utteranceId: string;
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
/**
|
|
168
|
-
* The direction in which the user/device is observed to be traveling.
|
|
169
|
-
*/
|
|
170
|
-
export interface CourseOverGround {
|
|
171
|
-
/**
|
|
172
|
-
* The direction in which the user\'s device is traveling, measured in clockwise degrees from
|
|
173
|
-
* true north (N = 0, E = 90, S = 180, W = 270).
|
|
174
|
-
*/
|
|
175
|
-
degrees: number;
|
|
176
|
-
/**
|
|
177
|
-
* The accuracy of the course value, measured in degrees.
|
|
178
|
-
*/
|
|
179
|
-
accuracy: number | undefined;
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
/**
|
|
183
|
-
* A geographic bounding box defined by its corners.
|
|
184
|
-
*/
|
|
185
|
-
export interface BoundingBox {
|
|
186
|
-
/**
|
|
187
|
-
* The southwest corner of the bounding box.
|
|
188
|
-
*/
|
|
189
|
-
sw: GeographicCoordinate;
|
|
190
|
-
/**
|
|
191
|
-
* The northeast corner of the bounding box.
|
|
192
|
-
*/
|
|
193
|
-
ne: GeographicCoordinate;
|
|
342
|
+
export interface LaneInfo {
|
|
343
|
+
active: boolean;
|
|
344
|
+
directions: string[];
|
|
345
|
+
activeDirection: string | undefined;
|
|
194
346
|
}
|
|
195
347
|
|
|
196
348
|
/**
|
|
197
|
-
* The
|
|
198
|
-
*
|
|
199
|
-
* In addition to coordinates, this includes estimated accuracy and course information,
|
|
200
|
-
* which can influence navigation logic and UI.
|
|
201
|
-
*
|
|
202
|
-
* NOTE: Heading is absent on purpose.
|
|
203
|
-
* Heading updates are not related to a change in the user\'s location.
|
|
349
|
+
* The impact of the incident that has occurred.
|
|
204
350
|
*/
|
|
205
|
-
export
|
|
206
|
-
coordinates: GeographicCoordinate;
|
|
207
|
-
/**
|
|
208
|
-
* The estimated accuracy of the coordinate (in meters)
|
|
209
|
-
*/
|
|
210
|
-
horizontalAccuracy: number;
|
|
211
|
-
courseOverGround: CourseOverGround | undefined;
|
|
212
|
-
timestamp: { secs_since_epoch: number; nanos_since_epoch: number };
|
|
213
|
-
speed: Speed | undefined;
|
|
214
|
-
}
|
|
351
|
+
export type Impact = "unknown" | "critical" | "major" | "minor" | "low";
|
|
215
352
|
|
|
216
353
|
/**
|
|
217
|
-
*
|
|
354
|
+
* An instruction for visual display (usually as banners) at a specific point along a [`RouteStep`].
|
|
218
355
|
*/
|
|
219
|
-
export interface
|
|
220
|
-
/**
|
|
221
|
-
* The text to display.
|
|
222
|
-
*/
|
|
223
|
-
text: string;
|
|
224
|
-
/**
|
|
225
|
-
* A standardized maneuver type (if any).
|
|
226
|
-
*/
|
|
227
|
-
maneuverType: ManeuverType | undefined;
|
|
356
|
+
export interface VisualInstruction {
|
|
228
357
|
/**
|
|
229
|
-
*
|
|
358
|
+
* The primary instruction content.
|
|
359
|
+
*
|
|
360
|
+
* This is usually given more visual weight.
|
|
230
361
|
*/
|
|
231
|
-
|
|
362
|
+
primaryContent: VisualInstructionContent;
|
|
232
363
|
/**
|
|
233
|
-
*
|
|
234
|
-
*
|
|
235
|
-
* For example, entering and exiting the roundabout in the same direction of travel
|
|
236
|
-
* (as if you had gone straight, apart from the detour)
|
|
237
|
-
* would be an exit angle of 180 degrees.
|
|
364
|
+
* Optional secondary instruction content.
|
|
238
365
|
*/
|
|
239
|
-
|
|
366
|
+
secondaryContent: VisualInstructionContent | undefined;
|
|
240
367
|
/**
|
|
241
|
-
*
|
|
368
|
+
* Optional sub-maneuver instruction content.
|
|
242
369
|
*/
|
|
243
|
-
|
|
370
|
+
subContent: VisualInstructionContent | undefined;
|
|
244
371
|
/**
|
|
245
|
-
*
|
|
372
|
+
* How far (in meters) from the upcoming maneuver the instruction should start being displayed
|
|
246
373
|
*/
|
|
247
|
-
|
|
374
|
+
triggerDistanceBeforeManeuver: number;
|
|
248
375
|
}
|
|
249
376
|
|
|
250
377
|
/**
|
|
251
|
-
*
|
|
252
|
-
*/
|
|
253
|
-
export type WaypointKind = "Break" | "Via";
|
|
254
|
-
|
|
255
|
-
/**
|
|
256
|
-
* The content of a visual instruction.
|
|
378
|
+
* Additional information to further specify a [`ManeuverType`].
|
|
257
379
|
*/
|
|
258
|
-
export
|
|
259
|
-
active: boolean;
|
|
260
|
-
directions: string[];
|
|
261
|
-
activeDirection: string | undefined;
|
|
262
|
-
}
|
|
380
|
+
export type ManeuverModifier = "uturn" | "sharp right" | "right" | "slight right" | "straight" | "slight left" | "left" | "sharp left";
|
|
263
381
|
|
|
264
382
|
/**
|
|
265
383
|
* Information describing the series of steps needed to travel between two or more points.
|
|
@@ -284,9 +402,23 @@ export interface Route {
|
|
|
284
402
|
}
|
|
285
403
|
|
|
286
404
|
/**
|
|
287
|
-
*
|
|
405
|
+
* The lane type blocked by the incident.
|
|
288
406
|
*/
|
|
289
|
-
export type
|
|
407
|
+
export type BlockedLane = "left" | "left center" | "left turn lane" | "center" | "right" | "right center" | "right turn lane" | "hov";
|
|
408
|
+
|
|
409
|
+
/**
|
|
410
|
+
* The speed of the user from the location provider.
|
|
411
|
+
*/
|
|
412
|
+
export interface Speed {
|
|
413
|
+
/**
|
|
414
|
+
* The user\'s speed in meters per second.
|
|
415
|
+
*/
|
|
416
|
+
value: number;
|
|
417
|
+
/**
|
|
418
|
+
* The accuracy of the speed value, measured in meters per second.
|
|
419
|
+
*/
|
|
420
|
+
accuracy: number | undefined;
|
|
421
|
+
}
|
|
290
422
|
|
|
291
423
|
/**
|
|
292
424
|
* Details about congestion for an incident.
|
|
@@ -305,207 +437,145 @@ export interface Congestion {
|
|
|
305
437
|
}
|
|
306
438
|
|
|
307
439
|
/**
|
|
308
|
-
*
|
|
440
|
+
* Describes characteristics of the waypoint for routing purposes.
|
|
309
441
|
*/
|
|
310
|
-
export
|
|
311
|
-
/**
|
|
312
|
-
* The user\'s speed in meters per second.
|
|
313
|
-
*/
|
|
314
|
-
value: number;
|
|
315
|
-
/**
|
|
316
|
-
* The accuracy of the speed value, measured in meters per second.
|
|
317
|
-
*/
|
|
318
|
-
accuracy: number | undefined;
|
|
319
|
-
}
|
|
442
|
+
export type WaypointKind = "Break" | "Via";
|
|
320
443
|
|
|
321
444
|
/**
|
|
322
|
-
*
|
|
445
|
+
* Configurations for built-in route providers.
|
|
323
446
|
*/
|
|
324
|
-
export type
|
|
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
|
+
|
|
449
|
+
export type GraphHopperVoiceUnits = "metric" | "imperial";
|
|
325
450
|
|
|
326
451
|
/**
|
|
327
|
-
* The
|
|
452
|
+
* The state of a navigation session.
|
|
453
|
+
*
|
|
454
|
+
* This is produced by [`NavigationController`](super::NavigationController) methods
|
|
455
|
+
* including [`get_initial_state`](super::NavigationController::get_initial_state)
|
|
456
|
+
* and [`update_user_location`](super::NavigationController::update_user_location).
|
|
328
457
|
*/
|
|
329
|
-
export type
|
|
458
|
+
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 } };
|
|
330
459
|
|
|
331
460
|
/**
|
|
332
|
-
*
|
|
461
|
+
* High-level state describing progress through a route.
|
|
333
462
|
*/
|
|
334
|
-
export interface
|
|
335
|
-
/**
|
|
336
|
-
* The primary instruction content.
|
|
337
|
-
*
|
|
338
|
-
* This is usually given more visual weight.
|
|
339
|
-
*/
|
|
340
|
-
primaryContent: VisualInstructionContent;
|
|
463
|
+
export interface TripProgress {
|
|
341
464
|
/**
|
|
342
|
-
*
|
|
465
|
+
* The distance to the next maneuver, in meters.
|
|
343
466
|
*/
|
|
344
|
-
|
|
467
|
+
distanceToNextManeuver: number;
|
|
345
468
|
/**
|
|
346
|
-
*
|
|
469
|
+
* The total distance remaining in the trip, in meters.
|
|
470
|
+
*
|
|
471
|
+
* This is the sum of the distance remaining in the current step and the distance remaining in all subsequent steps.
|
|
347
472
|
*/
|
|
348
|
-
|
|
473
|
+
distanceRemaining: number;
|
|
349
474
|
/**
|
|
350
|
-
*
|
|
475
|
+
* The total duration remaining in the trip, in seconds.
|
|
351
476
|
*/
|
|
352
|
-
|
|
477
|
+
durationRemaining: number;
|
|
353
478
|
}
|
|
354
479
|
|
|
355
480
|
/**
|
|
356
|
-
*
|
|
357
|
-
* such as constructions, accidents, and congestion.
|
|
481
|
+
* Controls filtering/post-processing of user course by the [`NavigationController`].
|
|
358
482
|
*/
|
|
359
|
-
export
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
*/
|
|
363
|
-
id: string;
|
|
364
|
-
/**
|
|
365
|
-
* The type of incident.
|
|
366
|
-
*/
|
|
367
|
-
incidentType: IncidentType;
|
|
483
|
+
export type CourseFiltering = "SnapToRoute" | "Raw";
|
|
484
|
+
|
|
485
|
+
export interface SerializableNavigationControllerConfig {
|
|
368
486
|
/**
|
|
369
|
-
*
|
|
487
|
+
* Configures when navigation advances to the next waypoint in the route.
|
|
370
488
|
*/
|
|
371
|
-
|
|
489
|
+
waypointAdvance: WaypointAdvanceMode;
|
|
372
490
|
/**
|
|
373
|
-
*
|
|
491
|
+
* Configures when navigation advances to the next step in the route.
|
|
374
492
|
*/
|
|
375
|
-
|
|
493
|
+
stepAdvanceCondition: SerializableStepAdvanceCondition;
|
|
376
494
|
/**
|
|
377
|
-
*
|
|
495
|
+
* A special advance condition used for the final 2 route steps (last and arrival).
|
|
378
496
|
*
|
|
379
|
-
*
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
/**
|
|
383
|
-
* The time at which the incident started or is expected to start (ex: planned closure).
|
|
384
|
-
*/
|
|
385
|
-
startTime: Date | null;
|
|
386
|
-
/**
|
|
387
|
-
* The time at which the incident ended or is expected to end.
|
|
388
|
-
*/
|
|
389
|
-
endTime: Date | null;
|
|
390
|
-
/**
|
|
391
|
-
* The level of impact to traffic.
|
|
392
|
-
*/
|
|
393
|
-
impact: Impact | undefined;
|
|
394
|
-
/**
|
|
395
|
-
* Lanes which are blocked by the incident.
|
|
396
|
-
*/
|
|
397
|
-
lanesBlocked: BlockedLane[];
|
|
398
|
-
/**
|
|
399
|
-
* Info about the amount of congestion on the road around the incident.
|
|
400
|
-
*/
|
|
401
|
-
congestion: Congestion | undefined;
|
|
402
|
-
/**
|
|
403
|
-
* Is the road completely closed?
|
|
404
|
-
*/
|
|
405
|
-
closed: boolean | undefined;
|
|
406
|
-
/**
|
|
407
|
-
* The index into the [`RouteStep`] geometry where the incident starts.
|
|
408
|
-
*/
|
|
409
|
-
geometryIndexStart: number;
|
|
410
|
-
/**
|
|
411
|
-
* The index into the [`RouteStep`] geometry where the incident ends.
|
|
412
|
-
*/
|
|
413
|
-
geometryIndexEnd: number | undefined;
|
|
414
|
-
/**
|
|
415
|
-
* Optional additional information about the type of incident (free-form text).
|
|
416
|
-
*/
|
|
417
|
-
subType: string | undefined;
|
|
418
|
-
/**
|
|
419
|
-
* Optional descriptions about the type of incident (free-form text).
|
|
420
|
-
*/
|
|
421
|
-
subTypeDescription: string | undefined;
|
|
422
|
-
/**
|
|
423
|
-
* The ISO 3166-1 alpha-2 code of the country in which the incident occurs.
|
|
424
|
-
*/
|
|
425
|
-
iso31661Alpha2: string | undefined;
|
|
426
|
-
/**
|
|
427
|
-
* The ISO 3166-1 alpha-3 code of the country in which the incident occurs.
|
|
497
|
+
* This exists because several of our step advance conditions require entry and
|
|
498
|
+
* exit from a step\'s geometry. The end of the route/arrival doesn\'t always accommodate
|
|
499
|
+
* the expected location updates for the core step advance condition.
|
|
428
500
|
*/
|
|
429
|
-
|
|
501
|
+
arrivalStepAdvanceCondition: SerializableStepAdvanceCondition;
|
|
430
502
|
/**
|
|
431
|
-
*
|
|
503
|
+
* Configures when the user is deemed to be off course.
|
|
504
|
+
*
|
|
505
|
+
* NOTE: This is distinct from the action that is taken.
|
|
506
|
+
* It is only the determination that the user has deviated from the expected route.
|
|
432
507
|
*/
|
|
433
|
-
|
|
508
|
+
routeDeviationTracking: RouteDeviationTracking;
|
|
434
509
|
/**
|
|
435
|
-
*
|
|
510
|
+
* Configures how the heading component of the snapped location is reported in [`TripState`].
|
|
436
511
|
*/
|
|
437
|
-
|
|
512
|
+
snappedLocationCourseFiltering: CourseFiltering;
|
|
438
513
|
}
|
|
439
514
|
|
|
440
515
|
/**
|
|
441
|
-
*
|
|
516
|
+
* Controls when a waypoint should be marked as complete.
|
|
442
517
|
*
|
|
443
|
-
*
|
|
444
|
-
*
|
|
445
|
-
*
|
|
446
|
-
*
|
|
447
|
-
*
|
|
448
|
-
*/
|
|
449
|
-
export interface OsrmWaypointProperties {
|
|
450
|
-
/**
|
|
451
|
-
* The name of the street that the waypoint snapped to.
|
|
452
|
-
*/
|
|
453
|
-
name: string | undefined;
|
|
454
|
-
/**
|
|
455
|
-
* The distance (in meters) between the snapped point and the input coordinate.
|
|
456
|
-
*/
|
|
457
|
-
distance: number | undefined;
|
|
458
|
-
}
|
|
459
|
-
|
|
460
|
-
/**
|
|
461
|
-
* A road class in the Valhalla taxonomy.
|
|
518
|
+
* While a route may consist of thousands of points, waypoints are special.
|
|
519
|
+
* A simple trip will have only one waypoint: the final destination.
|
|
520
|
+
* A more complex trip may have several intermediate stops.
|
|
521
|
+
* Just as the navigation state keeps track of which steps remain in the route,
|
|
522
|
+
* it also tracks which waypoints are still remaining.
|
|
462
523
|
*
|
|
463
|
-
*
|
|
524
|
+
* Tracking waypoints enables Ferrostar to reroute users when they stray off the route line.
|
|
525
|
+
* The waypoint advance mode specifies how the framework decides
|
|
526
|
+
* that a waypoint has been visited (and is removed from the list).
|
|
527
|
+
*
|
|
528
|
+
* NOTE: Advancing to the next *step* and advancing to the next *waypoint*
|
|
529
|
+
* are separate processes.
|
|
530
|
+
* This will not normally cause any issues, but keep in mind that
|
|
531
|
+
* manually advancing to the next step does not *necessarily* imply
|
|
532
|
+
* that the waypoint will be marked as complete!
|
|
464
533
|
*/
|
|
465
|
-
export type
|
|
534
|
+
export type WaypointAdvanceMode = { WaypointWithinRange: number } | { WaypointAlongAdvancingStep: number };
|
|
535
|
+
|
|
536
|
+
export interface SerializableNavState {
|
|
537
|
+
tripState: TripState;
|
|
538
|
+
stepAdvanceCondition: SerializableStepAdvanceCondition;
|
|
539
|
+
}
|
|
466
540
|
|
|
467
541
|
/**
|
|
468
|
-
*
|
|
542
|
+
* Information pertaining to the user\'s full navigation trip. This includes
|
|
543
|
+
* simple stats like total duration and distance.
|
|
469
544
|
*/
|
|
470
|
-
export interface
|
|
471
|
-
/**
|
|
472
|
-
* Whether to exclude roads marked as tunnels.
|
|
473
|
-
*/
|
|
474
|
-
exclude_tunnel?: boolean;
|
|
475
|
-
/**
|
|
476
|
-
* Whether to exclude roads marked as bridges.
|
|
477
|
-
*/
|
|
478
|
-
exclude_bridge?: boolean;
|
|
479
|
-
/**
|
|
480
|
-
* Whether to exclude roads with tolls.
|
|
481
|
-
*/
|
|
482
|
-
exclude_tolls?: boolean;
|
|
483
|
-
/**
|
|
484
|
-
* Whether to exclude ferries.
|
|
485
|
-
*/
|
|
486
|
-
exclude_ferry?: boolean;
|
|
487
|
-
/**
|
|
488
|
-
* Whether to exclude roads marked as ramps.
|
|
489
|
-
*/
|
|
490
|
-
exclude_ramp?: boolean;
|
|
545
|
+
export interface TripSummary {
|
|
491
546
|
/**
|
|
492
|
-
*
|
|
547
|
+
* The total raw distance traveled in the trip, in meters.
|
|
493
548
|
*/
|
|
494
|
-
|
|
549
|
+
distanceTraveled: number;
|
|
495
550
|
/**
|
|
496
|
-
* The
|
|
551
|
+
* The total snapped distance traveled in the trip, in meters.
|
|
497
552
|
*/
|
|
498
|
-
|
|
553
|
+
snappedDistanceTraveled: number;
|
|
499
554
|
/**
|
|
500
|
-
*
|
|
555
|
+
* When the trip was started.
|
|
501
556
|
*/
|
|
502
|
-
|
|
557
|
+
startedAt: Date;
|
|
503
558
|
/**
|
|
504
|
-
*
|
|
505
|
-
* It will set `search_cutoff` to a default value of 300 meters if no cutoff value is passed.
|
|
506
|
-
* Additionally, if a `search_cutoff` is passed, it will be clamped to 1000 meters.
|
|
559
|
+
* When the trip was completed or canceled.
|
|
507
560
|
*/
|
|
508
|
-
|
|
561
|
+
endedAt: Date | null;
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
/**
|
|
565
|
+
* Controls how simulated locations deviate from the actual route line.
|
|
566
|
+
* This simulates real-world GPS behavior where readings often have systematic bias.
|
|
567
|
+
*/
|
|
568
|
+
export type LocationBias = { Left: number } | { Right: number } | { Random: number } | "None";
|
|
569
|
+
|
|
570
|
+
export type SimulationError = { PolylineError: { error: string } } | "NotEnoughPoints";
|
|
571
|
+
|
|
572
|
+
/**
|
|
573
|
+
* The current state of the simulation.
|
|
574
|
+
*/
|
|
575
|
+
export interface LocationSimulationState {
|
|
576
|
+
current_location: UserLocation;
|
|
577
|
+
remaining_locations: GeographicCoordinate[];
|
|
578
|
+
bias: LocationBias;
|
|
509
579
|
}
|
|
510
580
|
|
|
511
581
|
/**
|
|
@@ -617,121 +687,57 @@ export interface ValhallaWaypointProperties {
|
|
|
617
687
|
search_filter: ValhallaLocationSearchFilter | undefined;
|
|
618
688
|
}
|
|
619
689
|
|
|
620
|
-
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[] } };
|
|
621
|
-
|
|
622
|
-
/**
|
|
623
|
-
* Information pertaining to the user\'s full navigation trip. This includes
|
|
624
|
-
* simple stats like total duration and distance.
|
|
625
|
-
*/
|
|
626
|
-
export interface TripSummary {
|
|
627
|
-
/**
|
|
628
|
-
* The total raw distance traveled in the trip, in meters.
|
|
629
|
-
*/
|
|
630
|
-
distanceTraveled: number;
|
|
631
|
-
/**
|
|
632
|
-
* The total snapped distance traveled in the trip, in meters.
|
|
633
|
-
*/
|
|
634
|
-
snappedDistanceTraveled: number;
|
|
635
|
-
/**
|
|
636
|
-
* When the trip was started.
|
|
637
|
-
*/
|
|
638
|
-
startedAt: Date;
|
|
639
|
-
/**
|
|
640
|
-
* When the trip was completed or canceled.
|
|
641
|
-
*/
|
|
642
|
-
endedAt: Date | null;
|
|
643
|
-
}
|
|
644
|
-
|
|
645
690
|
/**
|
|
646
|
-
*
|
|
647
|
-
*
|
|
648
|
-
* While a route may consist of thousands of points, waypoints are special.
|
|
649
|
-
* A simple trip will have only one waypoint: the final destination.
|
|
650
|
-
* A more complex trip may have several intermediate stops.
|
|
651
|
-
* Just as the navigation state keeps track of which steps remain in the route,
|
|
652
|
-
* it also tracks which waypoints are still remaining.
|
|
653
|
-
*
|
|
654
|
-
* Tracking waypoints enables Ferrostar to reroute users when they stray off the route line.
|
|
655
|
-
* The waypoint advance mode specifies how the framework decides
|
|
656
|
-
* that a waypoint has been visited (and is removed from the list).
|
|
691
|
+
* A road class in the Valhalla taxonomy.
|
|
657
692
|
*
|
|
658
|
-
*
|
|
659
|
-
* are separate processes.
|
|
660
|
-
* This will not normally cause any issues, but keep in mind that
|
|
661
|
-
* manually advancing to the next step does not *necessarily* imply
|
|
662
|
-
* that the waypoint will be marked as complete!
|
|
663
|
-
*/
|
|
664
|
-
export type WaypointAdvanceMode = { WaypointWithinRange: number } | { WaypointAlongAdvancingStep: number };
|
|
665
|
-
|
|
666
|
-
/**
|
|
667
|
-
* Controls filtering/post-processing of user course by the [`NavigationController`].
|
|
693
|
+
* These are ordered from highest (fastest travel speed) to lowest.
|
|
668
694
|
*/
|
|
669
|
-
export type
|
|
670
|
-
|
|
671
|
-
export interface SerializableNavState {
|
|
672
|
-
tripState: TripState;
|
|
673
|
-
stepAdvanceCondition: SerializableStepAdvanceCondition;
|
|
674
|
-
}
|
|
695
|
+
export type ValhallaRoadClass = "motorway" | "trunk" | "primary" | "secondary" | "tertiary" | "unclassified" | "residential" | "service_other";
|
|
675
696
|
|
|
676
697
|
/**
|
|
677
|
-
*
|
|
698
|
+
* A set of optional filters to exclude candidate edges based on their attributes.
|
|
678
699
|
*/
|
|
679
|
-
export interface
|
|
700
|
+
export interface ValhallaLocationSearchFilter {
|
|
680
701
|
/**
|
|
681
|
-
*
|
|
702
|
+
* Whether to exclude roads marked as tunnels.
|
|
682
703
|
*/
|
|
683
|
-
|
|
704
|
+
exclude_tunnel?: boolean;
|
|
684
705
|
/**
|
|
685
|
-
*
|
|
686
|
-
*
|
|
687
|
-
* This is the sum of the distance remaining in the current step and the distance remaining in all subsequent steps.
|
|
706
|
+
* Whether to exclude roads marked as bridges.
|
|
688
707
|
*/
|
|
689
|
-
|
|
708
|
+
exclude_bridge?: boolean;
|
|
690
709
|
/**
|
|
691
|
-
*
|
|
710
|
+
* Whether to exclude roads with tolls.
|
|
692
711
|
*/
|
|
693
|
-
|
|
694
|
-
}
|
|
695
|
-
|
|
696
|
-
export interface SerializableNavigationControllerConfig {
|
|
712
|
+
exclude_tolls?: boolean;
|
|
697
713
|
/**
|
|
698
|
-
*
|
|
714
|
+
* Whether to exclude ferries.
|
|
699
715
|
*/
|
|
700
|
-
|
|
716
|
+
exclude_ferry?: boolean;
|
|
701
717
|
/**
|
|
702
|
-
*
|
|
718
|
+
* Whether to exclude roads marked as ramps.
|
|
703
719
|
*/
|
|
704
|
-
|
|
720
|
+
exclude_ramp?: boolean;
|
|
705
721
|
/**
|
|
706
|
-
*
|
|
707
|
-
*
|
|
708
|
-
* This exists because several of our step advance conditions require entry and
|
|
709
|
-
* exit from a step\'s geometry. The end of the route/arrival doesn\'t always accommodate
|
|
710
|
-
* the expected location updates for the core step advance condition.
|
|
722
|
+
* Whether to exclude roads marked as closed due to a live traffic closure.
|
|
711
723
|
*/
|
|
712
|
-
|
|
724
|
+
exclude_closures?: boolean;
|
|
713
725
|
/**
|
|
714
|
-
*
|
|
715
|
-
*
|
|
716
|
-
* NOTE: This is distinct from the action that is taken.
|
|
717
|
-
* It is only the determination that the user has deviated from the expected route.
|
|
726
|
+
* The lowest road class allowed.
|
|
718
727
|
*/
|
|
719
|
-
|
|
728
|
+
min_road_class?: ValhallaRoadClass;
|
|
720
729
|
/**
|
|
721
|
-
*
|
|
730
|
+
* The highest road class allowed.
|
|
722
731
|
*/
|
|
723
|
-
|
|
732
|
+
max_road_class?: ValhallaRoadClass;
|
|
733
|
+
/**
|
|
734
|
+
* If specified, will only consider edges that are on or traverse the passed floor level.
|
|
735
|
+
* It will set `search_cutoff` to a default value of 300 meters if no cutoff value is passed.
|
|
736
|
+
* Additionally, if a `search_cutoff` is passed, it will be clamped to 1000 meters.
|
|
737
|
+
*/
|
|
738
|
+
level?: number;
|
|
724
739
|
}
|
|
725
740
|
|
|
726
|
-
/**
|
|
727
|
-
* The state of a navigation session.
|
|
728
|
-
*
|
|
729
|
-
* This is produced by [`NavigationController`](super::NavigationController) methods
|
|
730
|
-
* including [`get_initial_state`](super::NavigationController::get_initial_state)
|
|
731
|
-
* and [`update_user_location`](super::NavigationController::update_user_location).
|
|
732
|
-
*/
|
|
733
|
-
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 } };
|
|
734
|
-
|
|
735
741
|
/**
|
|
736
742
|
* The event type.
|
|
737
743
|
*
|
|
@@ -756,25 +762,23 @@ export interface NavigationRecordingEvent {
|
|
|
756
762
|
}
|
|
757
763
|
|
|
758
764
|
/**
|
|
759
|
-
*
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
* Controls how simulated locations deviate from the actual route line.
|
|
767
|
-
* This simulates real-world GPS behavior where readings often have systematic bias.
|
|
768
|
-
*/
|
|
769
|
-
export type LocationBias = { Left: number } | { Right: number } | { Random: number } | "None";
|
|
770
|
-
|
|
771
|
-
/**
|
|
772
|
-
* The current state of the simulation.
|
|
765
|
+
* Waypoint properties parsed from an OSRM-compatible server response.
|
|
766
|
+
*
|
|
767
|
+
* NOTE: Some servers (such as Valhalla) may support additional parameters at request time
|
|
768
|
+
* which are _not_ echoed back in the response time.
|
|
769
|
+
* This is unfortunate; PRs upstream would likely be welcomed!
|
|
770
|
+
* Similarly, if your server is OSRM-compatible and returns additional attributes,
|
|
771
|
+
* feel free to open a PR to include these as optional properties.
|
|
773
772
|
*/
|
|
774
|
-
export interface
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
773
|
+
export interface OsrmWaypointProperties {
|
|
774
|
+
/**
|
|
775
|
+
* The name of the street that the waypoint snapped to.
|
|
776
|
+
*/
|
|
777
|
+
name: string | undefined;
|
|
778
|
+
/**
|
|
779
|
+
* The distance (in meters) between the snapped point and the input coordinate.
|
|
780
|
+
*/
|
|
781
|
+
distance: number | undefined;
|
|
778
782
|
}
|
|
779
783
|
|
|
780
784
|
/**
|
|
@@ -790,13 +794,9 @@ export type RouteDeviation = "NoDeviation" | { OffRoute: { deviationFromRouteLin
|
|
|
790
794
|
*/
|
|
791
795
|
export type RouteDeviationTracking = "None" | { StaticThreshold: { minimumHorizontalAccuracy: number; maxAcceptableDeviation: number } };
|
|
792
796
|
|
|
793
|
-
export type
|
|
797
|
+
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[] } };
|
|
798
|
+
|
|
794
799
|
|
|
795
|
-
/**
|
|
796
|
-
* JavaScript wrapper for `NavigationController`.
|
|
797
|
-
* This wrapper is required because `NavigationController` cannot be directly converted to a JavaScript object
|
|
798
|
-
* and requires serialization/deserialization of its methods' inputs and outputs.
|
|
799
|
-
*/
|
|
800
800
|
export class NavigationController {
|
|
801
801
|
free(): void;
|
|
802
802
|
[Symbol.dispose](): void;
|
|
@@ -805,12 +805,7 @@ export class NavigationController {
|
|
|
805
805
|
updateUserLocation(location: any, state: any): any;
|
|
806
806
|
constructor(route: any, config: any, should_record: any);
|
|
807
807
|
}
|
|
808
|
-
|
|
809
|
-
* A WebAssembly-compatible wrapper for `NavigationReplay` that exposes its functionality as a JavaScript object.
|
|
810
|
-
*
|
|
811
|
-
* This wrapper is required because `NavigationReplay` cannot be directly converted to a JavaScript object
|
|
812
|
-
* and requires serialization/deserialization of its methods' inputs and outputs.
|
|
813
|
-
*/
|
|
808
|
+
|
|
814
809
|
export class NavigationReplay {
|
|
815
810
|
free(): void;
|
|
816
811
|
[Symbol.dispose](): void;
|
|
@@ -821,10 +816,7 @@ export class NavigationReplay {
|
|
|
821
816
|
getInitialTimestamp(): any;
|
|
822
817
|
constructor(json: any);
|
|
823
818
|
}
|
|
824
|
-
|
|
825
|
-
* JavaScript wrapper for [`NavigationSession`] (simple version).
|
|
826
|
-
* This wrapper provides basic navigation functionality without observers.
|
|
827
|
-
*/
|
|
819
|
+
|
|
828
820
|
export class NavigationSession {
|
|
829
821
|
free(): void;
|
|
830
822
|
[Symbol.dispose](): void;
|
|
@@ -833,10 +825,7 @@ export class NavigationSession {
|
|
|
833
825
|
updateUserLocation(location: any, state: any): any;
|
|
834
826
|
constructor(route: any, config: any);
|
|
835
827
|
}
|
|
836
|
-
|
|
837
|
-
* JavaScript wrapper for [`NavigationSession`] with recording capabilities.
|
|
838
|
-
* This version includes a NavigationRecorder observer and provides direct access to recording functionality.
|
|
839
|
-
*/
|
|
828
|
+
|
|
840
829
|
export class NavigationSessionRecording {
|
|
841
830
|
free(): void;
|
|
842
831
|
[Symbol.dispose](): void;
|
|
@@ -847,9 +836,7 @@ export class NavigationSessionRecording {
|
|
|
847
836
|
updateUserLocation(location: any, state: any): any;
|
|
848
837
|
constructor(route: any, config: any);
|
|
849
838
|
}
|
|
850
|
-
|
|
851
|
-
* JavaScript wrapper for `RouteAdapter`.
|
|
852
|
-
*/
|
|
839
|
+
|
|
853
840
|
export class RouteAdapter {
|
|
854
841
|
free(): void;
|
|
855
842
|
[Symbol.dispose](): void;
|
|
@@ -861,3 +848,23 @@ export class RouteAdapter {
|
|
|
861
848
|
*/
|
|
862
849
|
constructor(well_known_route_provider: WellKnownRouteProvider);
|
|
863
850
|
}
|
|
851
|
+
|
|
852
|
+
/**
|
|
853
|
+
* JavaScript wrapper for `advance_location_simulation`.
|
|
854
|
+
*/
|
|
855
|
+
export function advanceLocationSimulation(state: any): any;
|
|
856
|
+
|
|
857
|
+
/**
|
|
858
|
+
* JavaScript wrapper for `location_simulation_from_coordinates`.
|
|
859
|
+
*/
|
|
860
|
+
export function locationSimulationFromCoordinates(coordinates: any, resample_distance: number | null | undefined, bias: LocationBias): any;
|
|
861
|
+
|
|
862
|
+
/**
|
|
863
|
+
* JavaScript wrapper for `location_simulation_from_polyline`.
|
|
864
|
+
*/
|
|
865
|
+
export function locationSimulationFromPolyline(polyline: string, precision: number, resample_distance: number | null | undefined, bias: LocationBias): any;
|
|
866
|
+
|
|
867
|
+
/**
|
|
868
|
+
* JavaScript wrapper for `location_simulation_from_route`.
|
|
869
|
+
*/
|
|
870
|
+
export function locationSimulationFromRoute(route: any, resample_distance: number | null | undefined, bias: LocationBias): any;
|