@stadiamaps/ferrostar 0.47.1 → 0.47.2
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 +253 -253
- package/ferrostar_bg.wasm +0 -0
- package/package.json +1 -1
package/ferrostar.d.ts
CHANGED
|
@@ -26,17 +26,41 @@ export interface UserLocation {
|
|
|
26
26
|
export type IncidentType = "accident" | "congestion" | "construction" | "disabled_vehicle" | "lane_restriction" | "mass_transit" | "miscellaneous" | "other_news" | "planned_event" | "road_closure" | "road_hazard" | "weather";
|
|
27
27
|
|
|
28
28
|
/**
|
|
29
|
-
*
|
|
29
|
+
* The broad class of maneuver to perform.
|
|
30
|
+
*
|
|
31
|
+
* This is usually combined with [`ManeuverModifier`] in [`VisualInstructionContent`].
|
|
30
32
|
*/
|
|
31
|
-
export
|
|
33
|
+
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";
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* An instruction that can be synthesized using a TTS engine to announce an upcoming maneuver.
|
|
37
|
+
*
|
|
38
|
+
* Note that these do not have any locale information attached.
|
|
39
|
+
*/
|
|
40
|
+
export interface SpokenInstruction {
|
|
32
41
|
/**
|
|
33
|
-
*
|
|
42
|
+
* Plain-text instruction which can be synthesized with a TTS engine.
|
|
34
43
|
*/
|
|
35
|
-
|
|
44
|
+
text: string;
|
|
36
45
|
/**
|
|
37
|
-
*
|
|
46
|
+
* Speech Synthesis Markup Language, which should be preferred by clients capable of understanding it.
|
|
38
47
|
*/
|
|
39
|
-
|
|
48
|
+
ssml: string | undefined;
|
|
49
|
+
/**
|
|
50
|
+
* How far (in meters) from the upcoming maneuver the instruction should start being spoken.
|
|
51
|
+
*/
|
|
52
|
+
triggerDistanceBeforeManeuver: number;
|
|
53
|
+
/**
|
|
54
|
+
* A unique identifier for this instruction.
|
|
55
|
+
*
|
|
56
|
+
* This is provided so that platform-layer integrations can easily disambiguate between distinct utterances,
|
|
57
|
+
* which may have the same textual content.
|
|
58
|
+
* UUIDs conveniently fill this purpose.
|
|
59
|
+
*
|
|
60
|
+
* NOTE: While it is possible to deterministically create UUIDs, we do not do so at this time.
|
|
61
|
+
* This should be theoretically possible though if someone cares to write up a proposal and a PR.
|
|
62
|
+
*/
|
|
63
|
+
utteranceId: string;
|
|
40
64
|
}
|
|
41
65
|
|
|
42
66
|
/**
|
|
@@ -138,15 +162,6 @@ export interface Incident {
|
|
|
138
162
|
bbox: BoundingBox | undefined;
|
|
139
163
|
}
|
|
140
164
|
|
|
141
|
-
/**
|
|
142
|
-
* Which side of the road traffic drives on.
|
|
143
|
-
*
|
|
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).
|
|
147
|
-
*/
|
|
148
|
-
export type DrivingSide = "left" | "right";
|
|
149
|
-
|
|
150
165
|
/**
|
|
151
166
|
* The direction in which the user/device is observed to be traveling.
|
|
152
167
|
*/
|
|
@@ -163,81 +178,33 @@ export interface CourseOverGround {
|
|
|
163
178
|
}
|
|
164
179
|
|
|
165
180
|
/**
|
|
166
|
-
*
|
|
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";
|
|
171
|
-
|
|
172
|
-
/**
|
|
173
|
-
* A waypoint along a route.
|
|
174
|
-
*
|
|
175
|
-
* Within the context of Ferrostar, a route request consists of exactly one [`UserLocation`]
|
|
176
|
-
* and at least one [`Waypoint`]. The route starts from the user\'s location (which may
|
|
177
|
-
* contain other useful information like their current course for the [`crate::routing_adapters::RouteRequestGenerator`]
|
|
178
|
-
* to use) and proceeds through one or more waypoints.
|
|
179
|
-
*
|
|
180
|
-
* Waypoints are used during route calculation, are tracked throughout the lifecycle of a trip,
|
|
181
|
-
* and are used for recalculating when the user deviates from the expected route.
|
|
182
|
-
*
|
|
183
|
-
* Note that support for properties beyond basic geographic coordinates varies by routing engine.
|
|
181
|
+
* Details about congestion for an incident.
|
|
184
182
|
*/
|
|
185
|
-
export interface
|
|
186
|
-
coordinate: GeographicCoordinate;
|
|
187
|
-
kind: WaypointKind;
|
|
183
|
+
export interface Congestion {
|
|
188
184
|
/**
|
|
189
|
-
*
|
|
190
|
-
*
|
|
191
|
-
* Most users should prefer convenience functions like [`Waypoint::new_with_valhalla_properties`]
|
|
192
|
-
* (or, on platforms like iOS and Android with `UniFFI` bindings, [`crate::routing_adapters::valhalla::create_waypoint_with_valhalla_properties`]).
|
|
193
|
-
*
|
|
194
|
-
* # Format guidelines
|
|
185
|
+
* The level of congestion caused by the incident.
|
|
195
186
|
*
|
|
196
|
-
*
|
|
197
|
-
* However, to promote interoperability, all implementations in the Ferrostar codebase
|
|
198
|
-
* MUST use JSON.
|
|
187
|
+
* 0 = no congestion
|
|
199
188
|
*
|
|
200
|
-
*
|
|
201
|
-
* but because generics (i.e., becoming `Waypoint<T>`, where an example `T` is `ValhallaProperties`)
|
|
202
|
-
* would be way too painful, particularly for foreign code.
|
|
203
|
-
* Especially JavaScript.
|
|
189
|
+
* 100 = road closed
|
|
204
190
|
*
|
|
205
|
-
*
|
|
206
|
-
* implementations SHOULD document their level support for this,
|
|
207
|
-
* ideally with an exportable record type.
|
|
191
|
+
* Other values mean no congestion was calculated
|
|
208
192
|
*/
|
|
209
|
-
|
|
193
|
+
value: number;
|
|
210
194
|
}
|
|
211
195
|
|
|
212
196
|
/**
|
|
213
|
-
*
|
|
214
|
-
*
|
|
215
|
-
* Note that these do not have any locale information attached.
|
|
197
|
+
* A geographic coordinate in WGS84.
|
|
216
198
|
*/
|
|
217
|
-
export interface
|
|
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;
|
|
199
|
+
export interface GeographicCoordinate {
|
|
226
200
|
/**
|
|
227
|
-
*
|
|
201
|
+
* The latitude (in degrees).
|
|
228
202
|
*/
|
|
229
|
-
|
|
203
|
+
lat: number;
|
|
230
204
|
/**
|
|
231
|
-
*
|
|
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.
|
|
205
|
+
* The Longitude (in degrees).
|
|
239
206
|
*/
|
|
240
|
-
|
|
207
|
+
lng: number;
|
|
241
208
|
}
|
|
242
209
|
|
|
243
210
|
/**
|
|
@@ -274,6 +241,80 @@ export interface VisualInstructionContent {
|
|
|
274
241
|
exitNumbers: string[];
|
|
275
242
|
}
|
|
276
243
|
|
|
244
|
+
/**
|
|
245
|
+
* An instruction for visual display (usually as banners) at a specific point along a [`RouteStep`].
|
|
246
|
+
*/
|
|
247
|
+
export interface VisualInstruction {
|
|
248
|
+
/**
|
|
249
|
+
* The primary instruction content.
|
|
250
|
+
*
|
|
251
|
+
* This is usually given more visual weight.
|
|
252
|
+
*/
|
|
253
|
+
primaryContent: VisualInstructionContent;
|
|
254
|
+
/**
|
|
255
|
+
* Optional secondary instruction content.
|
|
256
|
+
*/
|
|
257
|
+
secondaryContent: VisualInstructionContent | undefined;
|
|
258
|
+
/**
|
|
259
|
+
* Optional sub-maneuver instruction content.
|
|
260
|
+
*/
|
|
261
|
+
subContent: VisualInstructionContent | undefined;
|
|
262
|
+
/**
|
|
263
|
+
* How far (in meters) from the upcoming maneuver the instruction should start being displayed
|
|
264
|
+
*/
|
|
265
|
+
triggerDistanceBeforeManeuver: number;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
/**
|
|
269
|
+
* The speed of the user from the location provider.
|
|
270
|
+
*/
|
|
271
|
+
export interface Speed {
|
|
272
|
+
/**
|
|
273
|
+
* The user\'s speed in meters per second.
|
|
274
|
+
*/
|
|
275
|
+
value: number;
|
|
276
|
+
/**
|
|
277
|
+
* The accuracy of the speed value, measured in meters per second.
|
|
278
|
+
*/
|
|
279
|
+
accuracy: number | undefined;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
/**
|
|
283
|
+
* The content of a visual instruction.
|
|
284
|
+
*/
|
|
285
|
+
export interface LaneInfo {
|
|
286
|
+
active: boolean;
|
|
287
|
+
directions: string[];
|
|
288
|
+
activeDirection: string | undefined;
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
/**
|
|
292
|
+
* The impact of the incident that has occurred.
|
|
293
|
+
*/
|
|
294
|
+
export type Impact = "unknown" | "critical" | "major" | "minor" | "low";
|
|
295
|
+
|
|
296
|
+
/**
|
|
297
|
+
* Information describing the series of steps needed to travel between two or more points.
|
|
298
|
+
*
|
|
299
|
+
* NOTE: This type is unstable and is still under active development and should be
|
|
300
|
+
* considered unstable.
|
|
301
|
+
*/
|
|
302
|
+
export interface Route {
|
|
303
|
+
geometry: GeographicCoordinate[];
|
|
304
|
+
bbox: BoundingBox;
|
|
305
|
+
/**
|
|
306
|
+
* The total route distance, in meters.
|
|
307
|
+
*/
|
|
308
|
+
distance: number;
|
|
309
|
+
/**
|
|
310
|
+
* The ordered list of waypoints to visit, including the starting point.
|
|
311
|
+
* Note that this is distinct from the *geometry* which includes all points visited.
|
|
312
|
+
* A waypoint represents a start/end point for a route leg.
|
|
313
|
+
*/
|
|
314
|
+
waypoints: Waypoint[];
|
|
315
|
+
steps: RouteStep[];
|
|
316
|
+
}
|
|
317
|
+
|
|
277
318
|
/**
|
|
278
319
|
* A maneuver (such as a turn or merge) followed by travel of a certain distance until reaching
|
|
279
320
|
* the next step.
|
|
@@ -337,41 +378,43 @@ export interface RouteStep {
|
|
|
337
378
|
}
|
|
338
379
|
|
|
339
380
|
/**
|
|
340
|
-
*
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
*
|
|
350
|
-
|
|
351
|
-
export type Impact = "unknown" | "critical" | "major" | "minor" | "low";
|
|
352
|
-
|
|
353
|
-
/**
|
|
354
|
-
* An instruction for visual display (usually as banners) at a specific point along a [`RouteStep`].
|
|
381
|
+
* A waypoint along a route.
|
|
382
|
+
*
|
|
383
|
+
* Within the context of Ferrostar, a route request consists of exactly one [`UserLocation`]
|
|
384
|
+
* and at least one [`Waypoint`]. The route starts from the user\'s location (which may
|
|
385
|
+
* contain other useful information like their current course for the [`crate::routing_adapters::RouteRequestGenerator`]
|
|
386
|
+
* to use) and proceeds through one or more waypoints.
|
|
387
|
+
*
|
|
388
|
+
* Waypoints are used during route calculation, are tracked throughout the lifecycle of a trip,
|
|
389
|
+
* and are used for recalculating when the user deviates from the expected route.
|
|
390
|
+
*
|
|
391
|
+
* Note that support for properties beyond basic geographic coordinates varies by routing engine.
|
|
355
392
|
*/
|
|
356
|
-
export interface
|
|
393
|
+
export interface Waypoint {
|
|
394
|
+
coordinate: GeographicCoordinate;
|
|
395
|
+
kind: WaypointKind;
|
|
357
396
|
/**
|
|
358
|
-
*
|
|
397
|
+
* Optional additional properties that will be passed on to the [`crate::routing_adapters::RouteRequestGenerator`].
|
|
359
398
|
*
|
|
360
|
-
*
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
*
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
*
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
*
|
|
399
|
+
* Most users should prefer convenience functions like [`Waypoint::new_with_valhalla_properties`]
|
|
400
|
+
* (or, on platforms like iOS and Android with `UniFFI` bindings, [`crate::routing_adapters::valhalla::create_waypoint_with_valhalla_properties`]).
|
|
401
|
+
*
|
|
402
|
+
* # Format guidelines
|
|
403
|
+
*
|
|
404
|
+
* This MAY be any format agreed upon by both the request generator and response parser.
|
|
405
|
+
* However, to promote interoperability, all implementations in the Ferrostar codebase
|
|
406
|
+
* MUST use JSON.
|
|
407
|
+
*
|
|
408
|
+
* We selected JSON is selected not because it is good,
|
|
409
|
+
* but because generics (i.e., becoming `Waypoint<T>`, where an example `T` is `ValhallaProperties`)
|
|
410
|
+
* would be way too painful, particularly for foreign code.
|
|
411
|
+
* Especially JavaScript.
|
|
412
|
+
*
|
|
413
|
+
* In any case, [`crate::routing_adapters::RouteRequestGenerator`] and [`crate::routing_adapters::RouteResponseParser`]
|
|
414
|
+
* implementations SHOULD document their level support for this,
|
|
415
|
+
* ideally with an exportable record type.
|
|
373
416
|
*/
|
|
374
|
-
|
|
417
|
+
properties: number[] | undefined;
|
|
375
418
|
}
|
|
376
419
|
|
|
377
420
|
/**
|
|
@@ -380,66 +423,23 @@ export interface VisualInstruction {
|
|
|
380
423
|
export type ManeuverModifier = "uturn" | "sharp right" | "right" | "slight right" | "straight" | "slight left" | "left" | "sharp left";
|
|
381
424
|
|
|
382
425
|
/**
|
|
383
|
-
*
|
|
384
|
-
*
|
|
385
|
-
* NOTE: This type is unstable and is still under active development and should be
|
|
386
|
-
* considered unstable.
|
|
387
|
-
*/
|
|
388
|
-
export interface Route {
|
|
389
|
-
geometry: GeographicCoordinate[];
|
|
390
|
-
bbox: BoundingBox;
|
|
391
|
-
/**
|
|
392
|
-
* The total route distance, in meters.
|
|
393
|
-
*/
|
|
394
|
-
distance: number;
|
|
395
|
-
/**
|
|
396
|
-
* The ordered list of waypoints to visit, including the starting point.
|
|
397
|
-
* Note that this is distinct from the *geometry* which includes all points visited.
|
|
398
|
-
* A waypoint represents a start/end point for a route leg.
|
|
399
|
-
*/
|
|
400
|
-
waypoints: Waypoint[];
|
|
401
|
-
steps: RouteStep[];
|
|
402
|
-
}
|
|
403
|
-
|
|
404
|
-
/**
|
|
405
|
-
* The lane type blocked by the incident.
|
|
406
|
-
*/
|
|
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.
|
|
426
|
+
* Describes characteristics of the waypoint for routing purposes.
|
|
411
427
|
*/
|
|
412
|
-
export
|
|
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
|
-
}
|
|
428
|
+
export type WaypointKind = "Break" | "Via";
|
|
422
429
|
|
|
423
430
|
/**
|
|
424
|
-
*
|
|
431
|
+
* Which side of the road traffic drives on.
|
|
432
|
+
*
|
|
433
|
+
* This is needed by consumers like Android Auto to determine whether
|
|
434
|
+
* a roundabout should be rendered as clockwise (right-hand traffic)
|
|
435
|
+
* or counterclockwise (left-hand traffic).
|
|
425
436
|
*/
|
|
426
|
-
export
|
|
427
|
-
/**
|
|
428
|
-
* The level of congestion caused by the incident.
|
|
429
|
-
*
|
|
430
|
-
* 0 = no congestion
|
|
431
|
-
*
|
|
432
|
-
* 100 = road closed
|
|
433
|
-
*
|
|
434
|
-
* Other values mean no congestion was calculated
|
|
435
|
-
*/
|
|
436
|
-
value: number;
|
|
437
|
-
}
|
|
437
|
+
export type DrivingSide = "left" | "right";
|
|
438
438
|
|
|
439
439
|
/**
|
|
440
|
-
*
|
|
440
|
+
* The lane type blocked by the incident.
|
|
441
441
|
*/
|
|
442
|
-
export type
|
|
442
|
+
export type BlockedLane = "left" | "left center" | "left turn lane" | "center" | "right" | "right center" | "right turn lane" | "hov";
|
|
443
443
|
|
|
444
444
|
/**
|
|
445
445
|
* Configurations for built-in route providers.
|
|
@@ -477,41 +477,6 @@ export interface TripProgress {
|
|
|
477
477
|
durationRemaining: number;
|
|
478
478
|
}
|
|
479
479
|
|
|
480
|
-
/**
|
|
481
|
-
* Controls filtering/post-processing of user course by the [`NavigationController`].
|
|
482
|
-
*/
|
|
483
|
-
export type CourseFiltering = "SnapToRoute" | "Raw";
|
|
484
|
-
|
|
485
|
-
export interface SerializableNavigationControllerConfig {
|
|
486
|
-
/**
|
|
487
|
-
* Configures when navigation advances to the next waypoint in the route.
|
|
488
|
-
*/
|
|
489
|
-
waypointAdvance: WaypointAdvanceMode;
|
|
490
|
-
/**
|
|
491
|
-
* Configures when navigation advances to the next step in the route.
|
|
492
|
-
*/
|
|
493
|
-
stepAdvanceCondition: SerializableStepAdvanceCondition;
|
|
494
|
-
/**
|
|
495
|
-
* A special advance condition used for the final 2 route steps (last and arrival).
|
|
496
|
-
*
|
|
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.
|
|
500
|
-
*/
|
|
501
|
-
arrivalStepAdvanceCondition: SerializableStepAdvanceCondition;
|
|
502
|
-
/**
|
|
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.
|
|
507
|
-
*/
|
|
508
|
-
routeDeviationTracking: RouteDeviationTracking;
|
|
509
|
-
/**
|
|
510
|
-
* Configures how the heading component of the snapped location is reported in [`TripState`].
|
|
511
|
-
*/
|
|
512
|
-
snappedLocationCourseFiltering: CourseFiltering;
|
|
513
|
-
}
|
|
514
|
-
|
|
515
480
|
/**
|
|
516
481
|
* Controls when a waypoint should be marked as complete.
|
|
517
482
|
*
|
|
@@ -561,14 +526,47 @@ export interface TripSummary {
|
|
|
561
526
|
endedAt: Date | null;
|
|
562
527
|
}
|
|
563
528
|
|
|
529
|
+
/**
|
|
530
|
+
* Controls filtering/post-processing of user course by the [`NavigationController`].
|
|
531
|
+
*/
|
|
532
|
+
export type CourseFiltering = "SnapToRoute" | "Raw";
|
|
533
|
+
|
|
534
|
+
export interface SerializableNavigationControllerConfig {
|
|
535
|
+
/**
|
|
536
|
+
* Configures when navigation advances to the next waypoint in the route.
|
|
537
|
+
*/
|
|
538
|
+
waypointAdvance: WaypointAdvanceMode;
|
|
539
|
+
/**
|
|
540
|
+
* Configures when navigation advances to the next step in the route.
|
|
541
|
+
*/
|
|
542
|
+
stepAdvanceCondition: SerializableStepAdvanceCondition;
|
|
543
|
+
/**
|
|
544
|
+
* A special advance condition used for the final 2 route steps (last and arrival).
|
|
545
|
+
*
|
|
546
|
+
* This exists because several of our step advance conditions require entry and
|
|
547
|
+
* exit from a step\'s geometry. The end of the route/arrival doesn\'t always accommodate
|
|
548
|
+
* the expected location updates for the core step advance condition.
|
|
549
|
+
*/
|
|
550
|
+
arrivalStepAdvanceCondition: SerializableStepAdvanceCondition;
|
|
551
|
+
/**
|
|
552
|
+
* Configures when the user is deemed to be off course.
|
|
553
|
+
*
|
|
554
|
+
* NOTE: This is distinct from the action that is taken.
|
|
555
|
+
* It is only the determination that the user has deviated from the expected route.
|
|
556
|
+
*/
|
|
557
|
+
routeDeviationTracking: RouteDeviationTracking;
|
|
558
|
+
/**
|
|
559
|
+
* Configures how the heading component of the snapped location is reported in [`TripState`].
|
|
560
|
+
*/
|
|
561
|
+
snappedLocationCourseFiltering: CourseFiltering;
|
|
562
|
+
}
|
|
563
|
+
|
|
564
564
|
/**
|
|
565
565
|
* Controls how simulated locations deviate from the actual route line.
|
|
566
566
|
* This simulates real-world GPS behavior where readings often have systematic bias.
|
|
567
567
|
*/
|
|
568
568
|
export type LocationBias = { Left: number } | { Right: number } | { Random: number } | "None";
|
|
569
569
|
|
|
570
|
-
export type SimulationError = { PolylineError: { error: string } } | "NotEnoughPoints";
|
|
571
|
-
|
|
572
570
|
/**
|
|
573
571
|
* The current state of the simulation.
|
|
574
572
|
*/
|
|
@@ -578,6 +576,52 @@ export interface LocationSimulationState {
|
|
|
578
576
|
bias: LocationBias;
|
|
579
577
|
}
|
|
580
578
|
|
|
579
|
+
export type SimulationError = { PolylineError: { error: string } } | "NotEnoughPoints";
|
|
580
|
+
|
|
581
|
+
/**
|
|
582
|
+
* A set of optional filters to exclude candidate edges based on their attributes.
|
|
583
|
+
*/
|
|
584
|
+
export interface ValhallaLocationSearchFilter {
|
|
585
|
+
/**
|
|
586
|
+
* Whether to exclude roads marked as tunnels.
|
|
587
|
+
*/
|
|
588
|
+
exclude_tunnel?: boolean;
|
|
589
|
+
/**
|
|
590
|
+
* Whether to exclude roads marked as bridges.
|
|
591
|
+
*/
|
|
592
|
+
exclude_bridge?: boolean;
|
|
593
|
+
/**
|
|
594
|
+
* Whether to exclude roads with tolls.
|
|
595
|
+
*/
|
|
596
|
+
exclude_tolls?: boolean;
|
|
597
|
+
/**
|
|
598
|
+
* Whether to exclude ferries.
|
|
599
|
+
*/
|
|
600
|
+
exclude_ferry?: boolean;
|
|
601
|
+
/**
|
|
602
|
+
* Whether to exclude roads marked as ramps.
|
|
603
|
+
*/
|
|
604
|
+
exclude_ramp?: boolean;
|
|
605
|
+
/**
|
|
606
|
+
* Whether to exclude roads marked as closed due to a live traffic closure.
|
|
607
|
+
*/
|
|
608
|
+
exclude_closures?: boolean;
|
|
609
|
+
/**
|
|
610
|
+
* The lowest road class allowed.
|
|
611
|
+
*/
|
|
612
|
+
min_road_class?: ValhallaRoadClass;
|
|
613
|
+
/**
|
|
614
|
+
* The highest road class allowed.
|
|
615
|
+
*/
|
|
616
|
+
max_road_class?: ValhallaRoadClass;
|
|
617
|
+
/**
|
|
618
|
+
* If specified, will only consider edges that are on or traverse the passed floor level.
|
|
619
|
+
* It will set `search_cutoff` to a default value of 300 meters if no cutoff value is passed.
|
|
620
|
+
* Additionally, if a `search_cutoff` is passed, it will be clamped to 1000 meters.
|
|
621
|
+
*/
|
|
622
|
+
level?: number;
|
|
623
|
+
}
|
|
624
|
+
|
|
581
625
|
/**
|
|
582
626
|
* Specifies a preferred side for departing from / arriving at a location.
|
|
583
627
|
*
|
|
@@ -589,6 +633,13 @@ export interface LocationSimulationState {
|
|
|
589
633
|
*/
|
|
590
634
|
export type ValhallaWaypointPreferredSide = "same" | "opposite" | "either";
|
|
591
635
|
|
|
636
|
+
/**
|
|
637
|
+
* A road class in the Valhalla taxonomy.
|
|
638
|
+
*
|
|
639
|
+
* These are ordered from highest (fastest travel speed) to lowest.
|
|
640
|
+
*/
|
|
641
|
+
export type ValhallaRoadClass = "motorway" | "trunk" | "primary" | "secondary" | "tertiary" | "unclassified" | "residential" | "service_other";
|
|
642
|
+
|
|
592
643
|
/**
|
|
593
644
|
* Waypoint properties supported by Valhalla servers.
|
|
594
645
|
*
|
|
@@ -687,57 +738,6 @@ export interface ValhallaWaypointProperties {
|
|
|
687
738
|
search_filter: ValhallaLocationSearchFilter | undefined;
|
|
688
739
|
}
|
|
689
740
|
|
|
690
|
-
/**
|
|
691
|
-
* A road class in the Valhalla taxonomy.
|
|
692
|
-
*
|
|
693
|
-
* These are ordered from highest (fastest travel speed) to lowest.
|
|
694
|
-
*/
|
|
695
|
-
export type ValhallaRoadClass = "motorway" | "trunk" | "primary" | "secondary" | "tertiary" | "unclassified" | "residential" | "service_other";
|
|
696
|
-
|
|
697
|
-
/**
|
|
698
|
-
* A set of optional filters to exclude candidate edges based on their attributes.
|
|
699
|
-
*/
|
|
700
|
-
export interface ValhallaLocationSearchFilter {
|
|
701
|
-
/**
|
|
702
|
-
* Whether to exclude roads marked as tunnels.
|
|
703
|
-
*/
|
|
704
|
-
exclude_tunnel?: boolean;
|
|
705
|
-
/**
|
|
706
|
-
* Whether to exclude roads marked as bridges.
|
|
707
|
-
*/
|
|
708
|
-
exclude_bridge?: boolean;
|
|
709
|
-
/**
|
|
710
|
-
* Whether to exclude roads with tolls.
|
|
711
|
-
*/
|
|
712
|
-
exclude_tolls?: boolean;
|
|
713
|
-
/**
|
|
714
|
-
* Whether to exclude ferries.
|
|
715
|
-
*/
|
|
716
|
-
exclude_ferry?: boolean;
|
|
717
|
-
/**
|
|
718
|
-
* Whether to exclude roads marked as ramps.
|
|
719
|
-
*/
|
|
720
|
-
exclude_ramp?: boolean;
|
|
721
|
-
/**
|
|
722
|
-
* Whether to exclude roads marked as closed due to a live traffic closure.
|
|
723
|
-
*/
|
|
724
|
-
exclude_closures?: boolean;
|
|
725
|
-
/**
|
|
726
|
-
* The lowest road class allowed.
|
|
727
|
-
*/
|
|
728
|
-
min_road_class?: ValhallaRoadClass;
|
|
729
|
-
/**
|
|
730
|
-
* The highest road class allowed.
|
|
731
|
-
*/
|
|
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;
|
|
739
|
-
}
|
|
740
|
-
|
|
741
741
|
/**
|
|
742
742
|
* The event type.
|
|
743
743
|
*
|
|
@@ -781,6 +781,11 @@ export interface OsrmWaypointProperties {
|
|
|
781
781
|
distance: number | undefined;
|
|
782
782
|
}
|
|
783
783
|
|
|
784
|
+
/**
|
|
785
|
+
* Determines if the user has deviated from the expected route.
|
|
786
|
+
*/
|
|
787
|
+
export type RouteDeviationTracking = "None" | { StaticThreshold: { minimumHorizontalAccuracy: number; maxAcceptableDeviation: number } };
|
|
788
|
+
|
|
784
789
|
/**
|
|
785
790
|
* Status information that describes whether the user is proceeding according to the route or not.
|
|
786
791
|
*
|
|
@@ -789,11 +794,6 @@ export interface OsrmWaypointProperties {
|
|
|
789
794
|
*/
|
|
790
795
|
export type RouteDeviation = "NoDeviation" | { OffRoute: { deviationFromRouteLine: number } };
|
|
791
796
|
|
|
792
|
-
/**
|
|
793
|
-
* Determines if the user has deviated from the expected route.
|
|
794
|
-
*/
|
|
795
|
-
export type RouteDeviationTracking = "None" | { StaticThreshold: { minimumHorizontalAccuracy: number; maxAcceptableDeviation: number } };
|
|
796
|
-
|
|
797
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
798
|
|
|
799
799
|
|
package/ferrostar_bg.wasm
CHANGED
|
Binary file
|