@stadiamaps/ferrostar 0.38.0 → 0.39.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 +18 -14
- package/ferrostar_bg.js +7 -7
- package/ferrostar_bg.wasm +0 -0
- package/package.json +1 -1
package/ferrostar.d.ts
CHANGED
|
@@ -415,15 +415,23 @@ export interface GeographicCoordinate {
|
|
|
415
415
|
lng: number;
|
|
416
416
|
}
|
|
417
417
|
|
|
418
|
-
export interface
|
|
418
|
+
export interface JsNavigationControllerConfig {
|
|
419
419
|
/**
|
|
420
|
-
* Configures when navigation advances to next waypoint in the route.
|
|
420
|
+
* Configures when navigation advances to the next waypoint in the route.
|
|
421
421
|
*/
|
|
422
422
|
waypointAdvance: WaypointAdvanceMode;
|
|
423
423
|
/**
|
|
424
424
|
* Configures when navigation advances to the next step in the route.
|
|
425
425
|
*/
|
|
426
|
-
|
|
426
|
+
stepAdvanceCondition: JsStepAdvanceCondition;
|
|
427
|
+
/**
|
|
428
|
+
* A special advance condition used for the final 2 route steps (last and arrival).
|
|
429
|
+
*
|
|
430
|
+
* This exists because several of our step advance conditions require entry and
|
|
431
|
+
* exit from a step\'s geometry. The end of the route/arrival doesn\'t always accommodate
|
|
432
|
+
* the expected location updates for the core step advance condition.
|
|
433
|
+
*/
|
|
434
|
+
arrivalStepAdvanceCondition: JsStepAdvanceCondition;
|
|
427
435
|
/**
|
|
428
436
|
* Configures when the user is deemed to be off course.
|
|
429
437
|
*
|
|
@@ -458,17 +466,6 @@ export interface NavigationControllerConfig {
|
|
|
458
466
|
*/
|
|
459
467
|
export type WaypointAdvanceMode = { WaypointWithinRange: number };
|
|
460
468
|
|
|
461
|
-
/**
|
|
462
|
-
* Special conditions which alter the normal step advance logic,
|
|
463
|
-
*/
|
|
464
|
-
export type SpecialAdvanceConditions = { AdvanceAtDistanceFromEnd: number } | { MinimumDistanceFromCurrentStepLine: number };
|
|
465
|
-
|
|
466
|
-
/**
|
|
467
|
-
* The step advance mode describes when the current maneuver has been successfully completed,
|
|
468
|
-
* and we should advance to the next step.
|
|
469
|
-
*/
|
|
470
|
-
export type StepAdvanceMode = "Manual" | { DistanceToEndOfStep: { distance: number; minimumHorizontalAccuracy: number } } | { RelativeLineStringDistance: { minimumHorizontalAccuracy: number; specialAdvanceConditions: SpecialAdvanceConditions | undefined } };
|
|
471
|
-
|
|
472
469
|
/**
|
|
473
470
|
* Controls filtering/post-processing of user course by the [`NavigationController`].
|
|
474
471
|
*/
|
|
@@ -526,6 +523,11 @@ export interface TripProgress {
|
|
|
526
523
|
durationRemaining: number;
|
|
527
524
|
}
|
|
528
525
|
|
|
526
|
+
export interface JsNavState {
|
|
527
|
+
tripState: TripState;
|
|
528
|
+
stepAdvanceCondition: JsStepAdvanceCondition;
|
|
529
|
+
}
|
|
530
|
+
|
|
529
531
|
/**
|
|
530
532
|
* Status information that describes whether the user is proceeding according to the route or not.
|
|
531
533
|
*
|
|
@@ -556,6 +558,8 @@ export interface LocationSimulationState {
|
|
|
556
558
|
bias: LocationBias;
|
|
557
559
|
}
|
|
558
560
|
|
|
561
|
+
export type JsStepAdvanceCondition = "Manual" | { DistanceToEndOfStep: { distance: number; minimumHorizontalAccuracy: number } } | { DistanceFromStep: { distance: number; minimumHorizontalAccuracy: number } } | { DistanceEntryExit: { minimumHorizontalAccuracy: number; distanceToEndOfStep: number; distanceAfterEndStep: number; hasReachedEndOfCurrentStep: boolean } } | { OrAdvanceConditions: { conditions: JsStepAdvanceCondition[] } } | { AndAdvanceConditions: { conditions: JsStepAdvanceCondition[] } };
|
|
562
|
+
|
|
559
563
|
/**
|
|
560
564
|
* JavaScript wrapper for `NavigationController`.
|
|
561
565
|
*/
|
package/ferrostar_bg.js
CHANGED
|
@@ -185,6 +185,13 @@ function takeFromExternrefTable0(idx) {
|
|
|
185
185
|
wasm.__externref_table_dealloc(idx);
|
|
186
186
|
return value;
|
|
187
187
|
}
|
|
188
|
+
|
|
189
|
+
function passArray8ToWasm0(arg, malloc) {
|
|
190
|
+
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
|
191
|
+
getUint8ArrayMemory0().set(arg, ptr / 1);
|
|
192
|
+
WASM_VECTOR_LEN = arg.length;
|
|
193
|
+
return ptr;
|
|
194
|
+
}
|
|
188
195
|
/**
|
|
189
196
|
* JavaScript wrapper for `location_simulation_from_coordinates`.
|
|
190
197
|
* @param {any} coordinates
|
|
@@ -243,13 +250,6 @@ export function advanceLocationSimulation(state) {
|
|
|
243
250
|
return ret;
|
|
244
251
|
}
|
|
245
252
|
|
|
246
|
-
function passArray8ToWasm0(arg, malloc) {
|
|
247
|
-
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
|
248
|
-
getUint8ArrayMemory0().set(arg, ptr / 1);
|
|
249
|
-
WASM_VECTOR_LEN = arg.length;
|
|
250
|
-
return ptr;
|
|
251
|
-
}
|
|
252
|
-
|
|
253
253
|
const NavigationControllerFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
254
254
|
? { register: () => {}, unregister: () => {} }
|
|
255
255
|
: new FinalizationRegistry(ptr => wasm.__wbg_navigationcontroller_free(ptr >>> 0, 1));
|
package/ferrostar_bg.wasm
CHANGED
|
Binary file
|