@stadiamaps/ferrostar 0.45.0 → 0.46.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 +374 -374
- package/ferrostar_bg.js +25 -25
- package/ferrostar_bg.wasm +0 -0
- package/package.json +1 -1
package/ferrostar.d.ts
CHANGED
|
@@ -1,44 +1,71 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* JavaScript wrapper for `location_simulation_from_polyline`.
|
|
5
|
+
*/
|
|
6
|
+
export function locationSimulationFromPolyline(polyline: string, precision: number, resample_distance: number | null | undefined, bias: LocationBias): any;
|
|
3
7
|
/**
|
|
4
8
|
* JavaScript wrapper for `advance_location_simulation`.
|
|
5
9
|
*/
|
|
6
10
|
export function advanceLocationSimulation(state: any): any;
|
|
7
11
|
/**
|
|
8
|
-
* JavaScript wrapper for `
|
|
12
|
+
* JavaScript wrapper for `location_simulation_from_route`.
|
|
9
13
|
*/
|
|
10
|
-
export function
|
|
14
|
+
export function locationSimulationFromRoute(route: any, resample_distance: number | null | undefined, bias: LocationBias): any;
|
|
11
15
|
/**
|
|
12
|
-
* JavaScript wrapper for `
|
|
16
|
+
* JavaScript wrapper for `location_simulation_from_coordinates`.
|
|
13
17
|
*/
|
|
14
|
-
export function
|
|
18
|
+
export function locationSimulationFromCoordinates(coordinates: any, resample_distance: number | null | undefined, bias: LocationBias): any;
|
|
15
19
|
/**
|
|
16
|
-
*
|
|
20
|
+
* The broad class of maneuver to perform.
|
|
21
|
+
*
|
|
22
|
+
* This is usually combined with [`ManeuverModifier`] in [`VisualInstructionContent`].
|
|
17
23
|
*/
|
|
18
|
-
export
|
|
24
|
+
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";
|
|
25
|
+
|
|
19
26
|
/**
|
|
20
27
|
* The lane type blocked by the incident.
|
|
21
28
|
*/
|
|
22
29
|
export type BlockedLane = "left" | "left center" | "left turn lane" | "center" | "right" | "right center" | "right turn lane" | "hov";
|
|
23
30
|
|
|
24
31
|
/**
|
|
25
|
-
*
|
|
32
|
+
* A waypoint along a route.
|
|
26
33
|
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
34
|
+
* Within the context of Ferrostar, a route request consists of exactly one [`UserLocation`]
|
|
35
|
+
* and at least one [`Waypoint`]. The route starts from the user\'s location (which may
|
|
36
|
+
* contain other useful information like their current course for the [`crate::routing_adapters::RouteRequestGenerator`]
|
|
37
|
+
* to use) and proceeds through one or more waypoints.
|
|
29
38
|
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
39
|
+
* Waypoints are used during route calculation, are tracked throughout the lifecycle of a trip,
|
|
40
|
+
* and are used for recalculating when the user deviates from the expected route.
|
|
41
|
+
*
|
|
42
|
+
* Note that support for properties beyond basic geographic coordinates varies by routing engine.
|
|
32
43
|
*/
|
|
33
|
-
export interface
|
|
34
|
-
|
|
44
|
+
export interface Waypoint {
|
|
45
|
+
coordinate: GeographicCoordinate;
|
|
46
|
+
kind: WaypointKind;
|
|
35
47
|
/**
|
|
36
|
-
*
|
|
48
|
+
* Optional additional properties that will be passed on to the [`crate::routing_adapters::RouteRequestGenerator`].
|
|
49
|
+
*
|
|
50
|
+
* Most users should prefer convenience functions like [`Waypoint::new_with_valhalla_properties`]
|
|
51
|
+
* (or, on platforms like iOS and Android with `UniFFI` bindings, [`crate::routing_adapters::valhalla::create_waypoint_with_valhalla_properties`]).
|
|
52
|
+
*
|
|
53
|
+
* # Format guidelines
|
|
54
|
+
*
|
|
55
|
+
* This MAY be any format agreed upon by both the request generator and response parser.
|
|
56
|
+
* However, to promote interoperability, all implementations in the Ferrostar codebase
|
|
57
|
+
* MUST use JSON.
|
|
58
|
+
*
|
|
59
|
+
* We selected JSON is selected not because it is good,
|
|
60
|
+
* but because generics (i.e., becoming `Waypoint<T>`, where an example `T` is `ValhallaProperties`)
|
|
61
|
+
* would be way too painful, particularly for foreign code.
|
|
62
|
+
* Especially JavaScript.
|
|
63
|
+
*
|
|
64
|
+
* In any case, [`crate::routing_adapters::RouteRequestGenerator`] and [`crate::routing_adapters::RouteResponseParser`]
|
|
65
|
+
* implementations SHOULD document their level support for this,
|
|
66
|
+
* ideally with an exportable record type.
|
|
37
67
|
*/
|
|
38
|
-
|
|
39
|
-
courseOverGround: CourseOverGround | undefined;
|
|
40
|
-
timestamp: { secs_since_epoch: number; nanos_since_epoch: number };
|
|
41
|
-
speed: Speed | undefined;
|
|
68
|
+
properties: number[] | undefined;
|
|
42
69
|
}
|
|
43
70
|
|
|
44
71
|
/**
|
|
@@ -93,181 +120,145 @@ export interface RouteStep {
|
|
|
93
120
|
}
|
|
94
121
|
|
|
95
122
|
/**
|
|
96
|
-
*
|
|
123
|
+
* A geographic coordinate in WGS84.
|
|
97
124
|
*/
|
|
98
|
-
export interface
|
|
125
|
+
export interface GeographicCoordinate {
|
|
99
126
|
/**
|
|
100
|
-
* The
|
|
101
|
-
* true north (N = 0, E = 90, S = 180, W = 270).
|
|
127
|
+
* The latitude (in degrees).
|
|
102
128
|
*/
|
|
103
|
-
|
|
129
|
+
lat: number;
|
|
104
130
|
/**
|
|
105
|
-
* The
|
|
131
|
+
* The Longitude (in degrees).
|
|
106
132
|
*/
|
|
107
|
-
|
|
133
|
+
lng: number;
|
|
108
134
|
}
|
|
109
135
|
|
|
110
136
|
/**
|
|
111
|
-
* An
|
|
112
|
-
*
|
|
137
|
+
* An instruction that can be synthesized using a TTS engine to announce an upcoming maneuver.
|
|
138
|
+
*
|
|
139
|
+
* Note that these do not have any locale information attached.
|
|
113
140
|
*/
|
|
114
|
-
export interface
|
|
115
|
-
/**
|
|
116
|
-
* A unique identifier for the incident.
|
|
117
|
-
*/
|
|
118
|
-
id: string;
|
|
141
|
+
export interface SpokenInstruction {
|
|
119
142
|
/**
|
|
120
|
-
*
|
|
143
|
+
* Plain-text instruction which can be synthesized with a TTS engine.
|
|
121
144
|
*/
|
|
122
|
-
|
|
145
|
+
text: string;
|
|
123
146
|
/**
|
|
124
|
-
*
|
|
147
|
+
* Speech Synthesis Markup Language, which should be preferred by clients capable of understanding it.
|
|
125
148
|
*/
|
|
126
|
-
|
|
149
|
+
ssml: string | undefined;
|
|
127
150
|
/**
|
|
128
|
-
*
|
|
151
|
+
* How far (in meters) from the upcoming maneuver the instruction should start being spoken.
|
|
129
152
|
*/
|
|
130
|
-
|
|
153
|
+
triggerDistanceBeforeManeuver: number;
|
|
131
154
|
/**
|
|
132
|
-
*
|
|
155
|
+
* A unique identifier for this instruction.
|
|
133
156
|
*
|
|
134
|
-
*
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
*
|
|
139
|
-
|
|
140
|
-
startTime: Date | null;
|
|
141
|
-
/**
|
|
142
|
-
* The time at which the incident ended or is expected to end.
|
|
143
|
-
*/
|
|
144
|
-
endTime: Date | null;
|
|
145
|
-
/**
|
|
146
|
-
* The level of impact to traffic.
|
|
147
|
-
*/
|
|
148
|
-
impact: Impact | undefined;
|
|
149
|
-
/**
|
|
150
|
-
* Lanes which are blocked by the incident.
|
|
151
|
-
*/
|
|
152
|
-
lanesBlocked: BlockedLane[];
|
|
153
|
-
/**
|
|
154
|
-
* Info about the amount of congestion on the road around the incident.
|
|
155
|
-
*/
|
|
156
|
-
congestion: Congestion | undefined;
|
|
157
|
-
/**
|
|
158
|
-
* Is the road completely closed?
|
|
159
|
-
*/
|
|
160
|
-
closed: boolean | undefined;
|
|
161
|
-
/**
|
|
162
|
-
* The index into the [`RouteStep`] geometry where the incident starts.
|
|
163
|
-
*/
|
|
164
|
-
geometryIndexStart: number;
|
|
165
|
-
/**
|
|
166
|
-
* The index into the [`RouteStep`] geometry where the incident ends.
|
|
167
|
-
*/
|
|
168
|
-
geometryIndexEnd: number | undefined;
|
|
169
|
-
/**
|
|
170
|
-
* Optional additional information about the type of incident (free-form text).
|
|
171
|
-
*/
|
|
172
|
-
subType: string | undefined;
|
|
173
|
-
/**
|
|
174
|
-
* Optional descriptions about the type of incident (free-form text).
|
|
175
|
-
*/
|
|
176
|
-
subTypeDescription: string | undefined;
|
|
177
|
-
/**
|
|
178
|
-
* The ISO 3166-1 alpha-2 code of the country in which the incident occurs.
|
|
179
|
-
*/
|
|
180
|
-
iso31661Alpha2: string | undefined;
|
|
181
|
-
/**
|
|
182
|
-
* The ISO 3166-1 alpha-3 code of the country in which the incident occurs.
|
|
183
|
-
*/
|
|
184
|
-
iso31661Alpha3: string | undefined;
|
|
185
|
-
/**
|
|
186
|
-
* A list of road names affected by the incident.
|
|
187
|
-
*/
|
|
188
|
-
affectedRoadNames: string[];
|
|
189
|
-
/**
|
|
190
|
-
* The bounding box over which the incident occurs.
|
|
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.
|
|
191
163
|
*/
|
|
192
|
-
|
|
164
|
+
utteranceId: string;
|
|
193
165
|
}
|
|
194
166
|
|
|
195
167
|
/**
|
|
196
|
-
* The
|
|
168
|
+
* The direction in which the user/device is observed to be traveling.
|
|
197
169
|
*/
|
|
198
|
-
export interface
|
|
170
|
+
export interface CourseOverGround {
|
|
199
171
|
/**
|
|
200
|
-
* The user\'s
|
|
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).
|
|
201
174
|
*/
|
|
202
|
-
|
|
175
|
+
degrees: number;
|
|
203
176
|
/**
|
|
204
|
-
* The accuracy of the
|
|
177
|
+
* The accuracy of the course value, measured in degrees.
|
|
205
178
|
*/
|
|
206
179
|
accuracy: number | undefined;
|
|
207
180
|
}
|
|
208
181
|
|
|
209
182
|
/**
|
|
210
|
-
*
|
|
211
|
-
*
|
|
212
|
-
* This is usually combined with [`ManeuverModifier`] in [`VisualInstructionContent`].
|
|
213
|
-
*/
|
|
214
|
-
export type ManeuverType = "turn" | "new name" | "depart" | "arrive" | "merge" | "on ramp" | "off ramp" | "fork" | "end of road" | "continue" | "roundabout" | "rotary" | "roundabout turn" | "notification" | "exit roundabout" | "exit rotary";
|
|
215
|
-
|
|
216
|
-
/**
|
|
217
|
-
* A geographic coordinate in WGS84.
|
|
183
|
+
* A geographic bounding box defined by its corners.
|
|
218
184
|
*/
|
|
219
|
-
export interface
|
|
185
|
+
export interface BoundingBox {
|
|
220
186
|
/**
|
|
221
|
-
* The
|
|
187
|
+
* The southwest corner of the bounding box.
|
|
222
188
|
*/
|
|
223
|
-
|
|
189
|
+
sw: GeographicCoordinate;
|
|
224
190
|
/**
|
|
225
|
-
* The
|
|
191
|
+
* The northeast corner of the bounding box.
|
|
226
192
|
*/
|
|
227
|
-
|
|
193
|
+
ne: GeographicCoordinate;
|
|
228
194
|
}
|
|
229
195
|
|
|
230
196
|
/**
|
|
231
|
-
* The
|
|
197
|
+
* The location of the user that is navigating.
|
|
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.
|
|
232
204
|
*/
|
|
233
|
-
export
|
|
205
|
+
export interface UserLocation {
|
|
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
|
+
}
|
|
234
215
|
|
|
235
216
|
/**
|
|
236
|
-
*
|
|
217
|
+
* The content of a visual instruction.
|
|
237
218
|
*/
|
|
238
|
-
export interface
|
|
219
|
+
export interface VisualInstructionContent {
|
|
239
220
|
/**
|
|
240
|
-
* The
|
|
221
|
+
* The text to display.
|
|
241
222
|
*/
|
|
242
|
-
|
|
223
|
+
text: string;
|
|
243
224
|
/**
|
|
244
|
-
*
|
|
225
|
+
* A standardized maneuver type (if any).
|
|
245
226
|
*/
|
|
246
|
-
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
/**
|
|
250
|
-
* An instruction for visual display (usually as banners) at a specific point along a [`RouteStep`].
|
|
251
|
-
*/
|
|
252
|
-
export interface VisualInstruction {
|
|
227
|
+
maneuverType: ManeuverType | undefined;
|
|
253
228
|
/**
|
|
254
|
-
*
|
|
255
|
-
*
|
|
256
|
-
* This is usually given more visual weight.
|
|
229
|
+
* A standardized maneuver modifier (if any).
|
|
257
230
|
*/
|
|
258
|
-
|
|
231
|
+
maneuverModifier: ManeuverModifier | undefined;
|
|
259
232
|
/**
|
|
260
|
-
*
|
|
233
|
+
* If applicable, the number of degrees you need to go around the roundabout before exiting.
|
|
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.
|
|
261
238
|
*/
|
|
262
|
-
|
|
239
|
+
roundaboutExitDegrees: number | undefined;
|
|
263
240
|
/**
|
|
264
|
-
*
|
|
241
|
+
* Detailed information about the lanes. This is typically only present in sub-maneuver instructions.
|
|
265
242
|
*/
|
|
266
|
-
|
|
243
|
+
laneInfo: LaneInfo[] | undefined;
|
|
267
244
|
/**
|
|
268
|
-
*
|
|
245
|
+
* The exit number (or similar identifier like \"8B\").
|
|
269
246
|
*/
|
|
270
|
-
|
|
247
|
+
exitNumbers: string[];
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
/**
|
|
251
|
+
* Describes characteristics of the waypoint for routing purposes.
|
|
252
|
+
*/
|
|
253
|
+
export type WaypointKind = "Break" | "Via";
|
|
254
|
+
|
|
255
|
+
/**
|
|
256
|
+
* The content of a visual instruction.
|
|
257
|
+
*/
|
|
258
|
+
export interface LaneInfo {
|
|
259
|
+
active: boolean;
|
|
260
|
+
directions: string[];
|
|
261
|
+
activeDirection: string | undefined;
|
|
271
262
|
}
|
|
272
263
|
|
|
273
264
|
/**
|
|
@@ -297,46 +288,6 @@ export interface Route {
|
|
|
297
288
|
*/
|
|
298
289
|
export type ManeuverModifier = "uturn" | "sharp right" | "right" | "slight right" | "straight" | "slight left" | "left" | "sharp left";
|
|
299
290
|
|
|
300
|
-
/**
|
|
301
|
-
* The content of a visual instruction.
|
|
302
|
-
*/
|
|
303
|
-
export interface LaneInfo {
|
|
304
|
-
active: boolean;
|
|
305
|
-
directions: string[];
|
|
306
|
-
activeDirection: string | undefined;
|
|
307
|
-
}
|
|
308
|
-
|
|
309
|
-
/**
|
|
310
|
-
* An instruction that can be synthesized using a TTS engine to announce an upcoming maneuver.
|
|
311
|
-
*
|
|
312
|
-
* Note that these do not have any locale information attached.
|
|
313
|
-
*/
|
|
314
|
-
export interface SpokenInstruction {
|
|
315
|
-
/**
|
|
316
|
-
* Plain-text instruction which can be synthesized with a TTS engine.
|
|
317
|
-
*/
|
|
318
|
-
text: string;
|
|
319
|
-
/**
|
|
320
|
-
* Speech Synthesis Markup Language, which should be preferred by clients capable of understanding it.
|
|
321
|
-
*/
|
|
322
|
-
ssml: string | undefined;
|
|
323
|
-
/**
|
|
324
|
-
* How far (in meters) from the upcoming maneuver the instruction should start being spoken.
|
|
325
|
-
*/
|
|
326
|
-
triggerDistanceBeforeManeuver: number;
|
|
327
|
-
/**
|
|
328
|
-
* A unique identifier for this instruction.
|
|
329
|
-
*
|
|
330
|
-
* This is provided so that platform-layer integrations can easily disambiguate between distinct utterances,
|
|
331
|
-
* which may have the same textual content.
|
|
332
|
-
* UUIDs conveniently fill this purpose.
|
|
333
|
-
*
|
|
334
|
-
* NOTE: While it is possible to deterministically create UUIDs, we do not do so at this time.
|
|
335
|
-
* This should be theoretically possible though if someone cares to write up a proposal and a PR.
|
|
336
|
-
*/
|
|
337
|
-
utteranceId: string;
|
|
338
|
-
}
|
|
339
|
-
|
|
340
291
|
/**
|
|
341
292
|
* Details about congestion for an incident.
|
|
342
293
|
*/
|
|
@@ -354,9 +305,23 @@ export interface Congestion {
|
|
|
354
305
|
}
|
|
355
306
|
|
|
356
307
|
/**
|
|
357
|
-
*
|
|
308
|
+
* The speed of the user from the location provider.
|
|
358
309
|
*/
|
|
359
|
-
export
|
|
310
|
+
export interface Speed {
|
|
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
|
+
}
|
|
320
|
+
|
|
321
|
+
/**
|
|
322
|
+
* The type of incident that has occurred.
|
|
323
|
+
*/
|
|
324
|
+
export type IncidentType = "accident" | "congestion" | "construction" | "disabled_vehicle" | "lane_restriction" | "mass_transit" | "miscellaneous" | "other_news" | "planned_event" | "road_closure" | "road_hazard" | "weather";
|
|
360
325
|
|
|
361
326
|
/**
|
|
362
327
|
* The impact of the incident that has occurred.
|
|
@@ -364,77 +329,112 @@ export type WaypointKind = "Break" | "Via";
|
|
|
364
329
|
export type Impact = "unknown" | "critical" | "major" | "minor" | "low";
|
|
365
330
|
|
|
366
331
|
/**
|
|
367
|
-
*
|
|
368
|
-
*
|
|
369
|
-
* Within the context of Ferrostar, a route request consists of exactly one [`UserLocation`]
|
|
370
|
-
* and at least one [`Waypoint`]. The route starts from the user\'s location (which may
|
|
371
|
-
* contain other useful information like their current course for the [`crate::routing_adapters::RouteRequestGenerator`]
|
|
372
|
-
* to use) and proceeds through one or more waypoints.
|
|
373
|
-
*
|
|
374
|
-
* Waypoints are used during route calculation, are tracked throughout the lifecycle of a trip,
|
|
375
|
-
* and are used for recalculating when the user deviates from the expected route.
|
|
376
|
-
*
|
|
377
|
-
* Note that support for properties beyond basic geographic coordinates varies by routing engine.
|
|
332
|
+
* An instruction for visual display (usually as banners) at a specific point along a [`RouteStep`].
|
|
378
333
|
*/
|
|
379
|
-
export interface
|
|
380
|
-
coordinate: GeographicCoordinate;
|
|
381
|
-
kind: WaypointKind;
|
|
334
|
+
export interface VisualInstruction {
|
|
382
335
|
/**
|
|
383
|
-
*
|
|
384
|
-
*
|
|
385
|
-
* Most users should prefer convenience functions like [`Waypoint::new_with_valhalla_properties`]
|
|
386
|
-
* (or, on platforms like iOS and Android with `UniFFI` bindings, [`crate::routing_adapters::valhalla::create_waypoint_with_valhalla_properties`]).
|
|
387
|
-
*
|
|
388
|
-
* # Format guidelines
|
|
389
|
-
*
|
|
390
|
-
* This MAY be any format agreed upon by both the request generator and response parser.
|
|
391
|
-
* However, to promote interoperability, all implementations in the Ferrostar codebase
|
|
392
|
-
* MUST use JSON.
|
|
393
|
-
*
|
|
394
|
-
* We selected JSON is selected not because it is good,
|
|
395
|
-
* but because generics (i.e., becoming `Waypoint<T>`, where an example `T` is `ValhallaProperties`)
|
|
396
|
-
* would be way too painful, particularly for foreign code.
|
|
397
|
-
* Especially JavaScript.
|
|
336
|
+
* The primary instruction content.
|
|
398
337
|
*
|
|
399
|
-
*
|
|
400
|
-
* implementations SHOULD document their level support for this,
|
|
401
|
-
* ideally with an exportable record type.
|
|
338
|
+
* This is usually given more visual weight.
|
|
402
339
|
*/
|
|
403
|
-
|
|
340
|
+
primaryContent: VisualInstructionContent;
|
|
341
|
+
/**
|
|
342
|
+
* Optional secondary instruction content.
|
|
343
|
+
*/
|
|
344
|
+
secondaryContent: VisualInstructionContent | undefined;
|
|
345
|
+
/**
|
|
346
|
+
* Optional sub-maneuver instruction content.
|
|
347
|
+
*/
|
|
348
|
+
subContent: VisualInstructionContent | undefined;
|
|
349
|
+
/**
|
|
350
|
+
* How far (in meters) from the upcoming maneuver the instruction should start being displayed
|
|
351
|
+
*/
|
|
352
|
+
triggerDistanceBeforeManeuver: number;
|
|
404
353
|
}
|
|
405
354
|
|
|
406
355
|
/**
|
|
407
|
-
*
|
|
356
|
+
* An incident affecting the free flow of traffic,
|
|
357
|
+
* such as constructions, accidents, and congestion.
|
|
408
358
|
*/
|
|
409
|
-
export interface
|
|
359
|
+
export interface Incident {
|
|
410
360
|
/**
|
|
411
|
-
*
|
|
361
|
+
* A unique identifier for the incident.
|
|
412
362
|
*/
|
|
413
|
-
|
|
363
|
+
id: string;
|
|
414
364
|
/**
|
|
415
|
-
*
|
|
365
|
+
* The type of incident.
|
|
416
366
|
*/
|
|
417
|
-
|
|
367
|
+
incidentType: IncidentType;
|
|
418
368
|
/**
|
|
419
|
-
* A
|
|
369
|
+
* A short description of the incident.
|
|
420
370
|
*/
|
|
421
|
-
|
|
371
|
+
description: string | undefined;
|
|
422
372
|
/**
|
|
423
|
-
*
|
|
373
|
+
* A longer description of the incident.
|
|
374
|
+
*/
|
|
375
|
+
longDescription: string | undefined;
|
|
376
|
+
/**
|
|
377
|
+
* The time at which the incident was *last* created.
|
|
424
378
|
*
|
|
425
|
-
*
|
|
426
|
-
* (as if you had gone straight, apart from the detour)
|
|
427
|
-
* would be an exit angle of 180 degrees.
|
|
379
|
+
* NB: This can change throughout the life of the incident.
|
|
428
380
|
*/
|
|
429
|
-
|
|
381
|
+
creationTime: Date | null;
|
|
430
382
|
/**
|
|
431
|
-
*
|
|
383
|
+
* The time at which the incident started or is expected to start (ex: planned closure).
|
|
432
384
|
*/
|
|
433
|
-
|
|
385
|
+
startTime: Date | null;
|
|
434
386
|
/**
|
|
435
|
-
* The
|
|
387
|
+
* The time at which the incident ended or is expected to end.
|
|
436
388
|
*/
|
|
437
|
-
|
|
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.
|
|
428
|
+
*/
|
|
429
|
+
iso31661Alpha3: string | undefined;
|
|
430
|
+
/**
|
|
431
|
+
* A list of road names affected by the incident.
|
|
432
|
+
*/
|
|
433
|
+
affectedRoadNames: string[];
|
|
434
|
+
/**
|
|
435
|
+
* The bounding box over which the incident occurs.
|
|
436
|
+
*/
|
|
437
|
+
bbox: BoundingBox | undefined;
|
|
438
438
|
}
|
|
439
439
|
|
|
440
440
|
/**
|
|
@@ -458,51 +458,66 @@ export interface OsrmWaypointProperties {
|
|
|
458
458
|
}
|
|
459
459
|
|
|
460
460
|
/**
|
|
461
|
-
*
|
|
461
|
+
* A road class in the Valhalla taxonomy.
|
|
462
462
|
*
|
|
463
|
-
*
|
|
463
|
+
* These are ordered from highest (fastest travel speed) to lowest.
|
|
464
464
|
*/
|
|
465
|
-
export type
|
|
465
|
+
export type ValhallaRoadClass = "motorway" | "trunk" | "primary" | "secondary" | "tertiary" | "unclassified" | "residential" | "service_other";
|
|
466
466
|
|
|
467
467
|
/**
|
|
468
|
-
*
|
|
469
|
-
*
|
|
470
|
-
* This is used for the optional session recording / telemetry.
|
|
468
|
+
* A set of optional filters to exclude candidate edges based on their attributes.
|
|
471
469
|
*/
|
|
472
|
-
export interface
|
|
470
|
+
export interface ValhallaLocationSearchFilter {
|
|
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;
|
|
473
491
|
/**
|
|
474
|
-
*
|
|
492
|
+
* Whether to exclude roads marked as closed due to a live traffic closure.
|
|
475
493
|
*/
|
|
476
|
-
|
|
494
|
+
exclude_closures?: boolean;
|
|
477
495
|
/**
|
|
478
|
-
*
|
|
496
|
+
* The lowest road class allowed.
|
|
479
497
|
*/
|
|
480
|
-
|
|
498
|
+
min_road_class?: ValhallaRoadClass;
|
|
499
|
+
/**
|
|
500
|
+
* The highest road class allowed.
|
|
501
|
+
*/
|
|
502
|
+
max_road_class?: ValhallaRoadClass;
|
|
503
|
+
/**
|
|
504
|
+
* If specified, will only consider edges that are on or traverse the passed floor level.
|
|
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.
|
|
507
|
+
*/
|
|
508
|
+
level?: number;
|
|
481
509
|
}
|
|
482
510
|
|
|
483
511
|
/**
|
|
484
|
-
*
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
* Controls how simulated locations deviate from the actual route line.
|
|
492
|
-
* This simulates real-world GPS behavior where readings often have systematic bias.
|
|
493
|
-
*/
|
|
494
|
-
export type LocationBias = { Left: number } | { Right: number } | { Random: number } | "None";
|
|
495
|
-
|
|
496
|
-
/**
|
|
497
|
-
* The current state of the simulation.
|
|
512
|
+
* Specifies a preferred side for departing from / arriving at a location.
|
|
513
|
+
*
|
|
514
|
+
* Examples:
|
|
515
|
+
* - Germany drives on the right side of the road. A value of `same` will only allow leaving
|
|
516
|
+
* or arriving at a location such that it is on your right.
|
|
517
|
+
* - Australia drives on the left side of the road. Passing a value of `same` will only allow
|
|
518
|
+
* leaving or arriving at a location such that it is on your left.
|
|
498
519
|
*/
|
|
499
|
-
export
|
|
500
|
-
current_location: UserLocation;
|
|
501
|
-
remaining_locations: GeographicCoordinate[];
|
|
502
|
-
bias: LocationBias;
|
|
503
|
-
}
|
|
504
|
-
|
|
505
|
-
export type GraphHopperVoiceUnits = "metric" | "imperial";
|
|
520
|
+
export type ValhallaWaypointPreferredSide = "same" | "opposite" | "either";
|
|
506
521
|
|
|
507
522
|
/**
|
|
508
523
|
* Waypoint properties supported by Valhalla servers.
|
|
@@ -602,93 +617,8 @@ export interface ValhallaWaypointProperties {
|
|
|
602
617
|
search_filter: ValhallaLocationSearchFilter | undefined;
|
|
603
618
|
}
|
|
604
619
|
|
|
605
|
-
/**
|
|
606
|
-
* Specifies a preferred side for departing from / arriving at a location.
|
|
607
|
-
*
|
|
608
|
-
* Examples:
|
|
609
|
-
* - Germany drives on the right side of the road. A value of `same` will only allow leaving
|
|
610
|
-
* or arriving at a location such that it is on your right.
|
|
611
|
-
* - Australia drives on the left side of the road. Passing a value of `same` will only allow
|
|
612
|
-
* leaving or arriving at a location such that it is on your left.
|
|
613
|
-
*/
|
|
614
|
-
export type ValhallaWaypointPreferredSide = "same" | "opposite" | "either";
|
|
615
|
-
|
|
616
|
-
/**
|
|
617
|
-
* A road class in the Valhalla taxonomy.
|
|
618
|
-
*
|
|
619
|
-
* These are ordered from highest (fastest travel speed) to lowest.
|
|
620
|
-
*/
|
|
621
|
-
export type ValhallaRoadClass = "motorway" | "trunk" | "primary" | "secondary" | "tertiary" | "unclassified" | "residential" | "service_other";
|
|
622
|
-
|
|
623
|
-
/**
|
|
624
|
-
* A set of optional filters to exclude candidate edges based on their attributes.
|
|
625
|
-
*/
|
|
626
|
-
export interface ValhallaLocationSearchFilter {
|
|
627
|
-
/**
|
|
628
|
-
* Whether to exclude roads marked as tunnels.
|
|
629
|
-
*/
|
|
630
|
-
exclude_tunnel?: boolean;
|
|
631
|
-
/**
|
|
632
|
-
* Whether to exclude roads marked as bridges.
|
|
633
|
-
*/
|
|
634
|
-
exclude_bridge?: boolean;
|
|
635
|
-
/**
|
|
636
|
-
* Whether to exclude roads with tolls.
|
|
637
|
-
*/
|
|
638
|
-
exclude_tolls?: boolean;
|
|
639
|
-
/**
|
|
640
|
-
* Whether to exclude ferries.
|
|
641
|
-
*/
|
|
642
|
-
exclude_ferry?: boolean;
|
|
643
|
-
/**
|
|
644
|
-
* Whether to exclude roads marked as ramps.
|
|
645
|
-
*/
|
|
646
|
-
exclude_ramp?: boolean;
|
|
647
|
-
/**
|
|
648
|
-
* Whether to exclude roads marked as closed due to a live traffic closure.
|
|
649
|
-
*/
|
|
650
|
-
exclude_closures?: boolean;
|
|
651
|
-
/**
|
|
652
|
-
* The lowest road class allowed.
|
|
653
|
-
*/
|
|
654
|
-
min_road_class?: ValhallaRoadClass;
|
|
655
|
-
/**
|
|
656
|
-
* The highest road class allowed.
|
|
657
|
-
*/
|
|
658
|
-
max_road_class?: ValhallaRoadClass;
|
|
659
|
-
/**
|
|
660
|
-
* If specified, will only consider edges that are on or traverse the passed floor level.
|
|
661
|
-
* It will set `search_cutoff` to a default value of 300 meters if no cutoff value is passed.
|
|
662
|
-
* Additionally, if a `search_cutoff` is passed, it will be clamped to 1000 meters.
|
|
663
|
-
*/
|
|
664
|
-
level?: number;
|
|
665
|
-
}
|
|
666
|
-
|
|
667
|
-
/**
|
|
668
|
-
* Status information that describes whether the user is proceeding according to the route or not.
|
|
669
|
-
*
|
|
670
|
-
* Note that the name is intentionally a bit generic to allow for expansion of other states.
|
|
671
|
-
* For example, we could conceivably add a \"wrong way\" status in the future.
|
|
672
|
-
*/
|
|
673
|
-
export type RouteDeviation = "NoDeviation" | { OffRoute: { deviationFromRouteLine: number } };
|
|
674
|
-
|
|
675
|
-
/**
|
|
676
|
-
* Determines if the user has deviated from the expected route.
|
|
677
|
-
*/
|
|
678
|
-
export type RouteDeviationTracking = "None" | { StaticThreshold: { minimumHorizontalAccuracy: number; maxAcceptableDeviation: number } };
|
|
679
|
-
|
|
680
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[] } };
|
|
681
621
|
|
|
682
|
-
export interface SerializableNavState {
|
|
683
|
-
tripState: TripState;
|
|
684
|
-
stepAdvanceCondition: SerializableStepAdvanceCondition;
|
|
685
|
-
}
|
|
686
|
-
|
|
687
|
-
/**
|
|
688
|
-
* Controls filtering/post-processing of user course by the [`NavigationController`].
|
|
689
|
-
*/
|
|
690
|
-
export type CourseFiltering = "SnapToRoute" | "Raw";
|
|
691
|
-
|
|
692
622
|
/**
|
|
693
623
|
* Information pertaining to the user\'s full navigation trip. This includes
|
|
694
624
|
* simple stats like total duration and distance.
|
|
@@ -712,26 +642,6 @@ export interface TripSummary {
|
|
|
712
642
|
endedAt: Date | null;
|
|
713
643
|
}
|
|
714
644
|
|
|
715
|
-
/**
|
|
716
|
-
* High-level state describing progress through a route.
|
|
717
|
-
*/
|
|
718
|
-
export interface TripProgress {
|
|
719
|
-
/**
|
|
720
|
-
* The distance to the next maneuver, in meters.
|
|
721
|
-
*/
|
|
722
|
-
distanceToNextManeuver: number;
|
|
723
|
-
/**
|
|
724
|
-
* The total distance remaining in the trip, in meters.
|
|
725
|
-
*
|
|
726
|
-
* This is the sum of the distance remaining in the current step and the distance remaining in all subsequent steps.
|
|
727
|
-
*/
|
|
728
|
-
distanceRemaining: number;
|
|
729
|
-
/**
|
|
730
|
-
* The total duration remaining in the trip, in seconds.
|
|
731
|
-
*/
|
|
732
|
-
durationRemaining: number;
|
|
733
|
-
}
|
|
734
|
-
|
|
735
645
|
/**
|
|
736
646
|
* Controls when a waypoint should be marked as complete.
|
|
737
647
|
*
|
|
@@ -754,13 +664,34 @@ export interface TripProgress {
|
|
|
754
664
|
export type WaypointAdvanceMode = { WaypointWithinRange: number } | { WaypointAlongAdvancingStep: number };
|
|
755
665
|
|
|
756
666
|
/**
|
|
757
|
-
*
|
|
758
|
-
*
|
|
759
|
-
* This is produced by [`NavigationController`](super::NavigationController) methods
|
|
760
|
-
* including [`get_initial_state`](super::NavigationController::get_initial_state)
|
|
761
|
-
* and [`update_user_location`](super::NavigationController::update_user_location).
|
|
667
|
+
* Controls filtering/post-processing of user course by the [`NavigationController`].
|
|
762
668
|
*/
|
|
763
|
-
export type
|
|
669
|
+
export type CourseFiltering = "SnapToRoute" | "Raw";
|
|
670
|
+
|
|
671
|
+
export interface SerializableNavState {
|
|
672
|
+
tripState: TripState;
|
|
673
|
+
stepAdvanceCondition: SerializableStepAdvanceCondition;
|
|
674
|
+
}
|
|
675
|
+
|
|
676
|
+
/**
|
|
677
|
+
* High-level state describing progress through a route.
|
|
678
|
+
*/
|
|
679
|
+
export interface TripProgress {
|
|
680
|
+
/**
|
|
681
|
+
* The distance to the next maneuver, in meters.
|
|
682
|
+
*/
|
|
683
|
+
distanceToNextManeuver: number;
|
|
684
|
+
/**
|
|
685
|
+
* The total distance remaining in the trip, in meters.
|
|
686
|
+
*
|
|
687
|
+
* This is the sum of the distance remaining in the current step and the distance remaining in all subsequent steps.
|
|
688
|
+
*/
|
|
689
|
+
distanceRemaining: number;
|
|
690
|
+
/**
|
|
691
|
+
* The total duration remaining in the trip, in seconds.
|
|
692
|
+
*/
|
|
693
|
+
durationRemaining: number;
|
|
694
|
+
}
|
|
764
695
|
|
|
765
696
|
export interface SerializableNavigationControllerConfig {
|
|
766
697
|
/**
|
|
@@ -792,6 +723,75 @@ export interface SerializableNavigationControllerConfig {
|
|
|
792
723
|
snappedLocationCourseFiltering: CourseFiltering;
|
|
793
724
|
}
|
|
794
725
|
|
|
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
|
+
/**
|
|
736
|
+
* The event type.
|
|
737
|
+
*
|
|
738
|
+
* For full replayability, we record things like rerouting, and not just location updates.
|
|
739
|
+
*/
|
|
740
|
+
export type NavigationRecordingEventData = { StateUpdate: { trip_state: TripState; step_advance_condition: SerializableStepAdvanceCondition } } | { RouteUpdate: { route: Route } };
|
|
741
|
+
|
|
742
|
+
/**
|
|
743
|
+
* An event that occurs during navigation.
|
|
744
|
+
*
|
|
745
|
+
* This is used for the optional session recording / telemetry.
|
|
746
|
+
*/
|
|
747
|
+
export interface NavigationRecordingEvent {
|
|
748
|
+
/**
|
|
749
|
+
* The timestamp of the event in milliseconds since Jan 1, 1970 UTC.
|
|
750
|
+
*/
|
|
751
|
+
timestamp: number;
|
|
752
|
+
/**
|
|
753
|
+
* Data associated with the event.
|
|
754
|
+
*/
|
|
755
|
+
event_data: NavigationRecordingEventData;
|
|
756
|
+
}
|
|
757
|
+
|
|
758
|
+
/**
|
|
759
|
+
* Configurations for built-in route providers.
|
|
760
|
+
*/
|
|
761
|
+
export type WellKnownRouteProvider = { Valhalla: { endpointUrl: string; profile: string; optionsJson?: string | undefined } } | { GraphHopper: { endpointUrl: string; profile: string; locale: string; voiceUnits: GraphHopperVoiceUnits; optionsJson?: string | undefined } };
|
|
762
|
+
|
|
763
|
+
export type SimulationError = { PolylineError: { error: string } } | "NotEnoughPoints";
|
|
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.
|
|
773
|
+
*/
|
|
774
|
+
export interface LocationSimulationState {
|
|
775
|
+
current_location: UserLocation;
|
|
776
|
+
remaining_locations: GeographicCoordinate[];
|
|
777
|
+
bias: LocationBias;
|
|
778
|
+
}
|
|
779
|
+
|
|
780
|
+
/**
|
|
781
|
+
* Status information that describes whether the user is proceeding according to the route or not.
|
|
782
|
+
*
|
|
783
|
+
* Note that the name is intentionally a bit generic to allow for expansion of other states.
|
|
784
|
+
* For example, we could conceivably add a \"wrong way\" status in the future.
|
|
785
|
+
*/
|
|
786
|
+
export type RouteDeviation = "NoDeviation" | { OffRoute: { deviationFromRouteLine: number } };
|
|
787
|
+
|
|
788
|
+
/**
|
|
789
|
+
* Determines if the user has deviated from the expected route.
|
|
790
|
+
*/
|
|
791
|
+
export type RouteDeviationTracking = "None" | { StaticThreshold: { minimumHorizontalAccuracy: number; maxAcceptableDeviation: number } };
|
|
792
|
+
|
|
793
|
+
export type GraphHopperVoiceUnits = "metric" | "imperial";
|
|
794
|
+
|
|
795
795
|
/**
|
|
796
796
|
* JavaScript wrapper for `NavigationController`.
|
|
797
797
|
* This wrapper is required because `NavigationController` cannot be directly converted to a JavaScript object
|
package/ferrostar_bg.js
CHANGED
|
@@ -198,31 +198,6 @@ function takeFromExternrefTable0(idx) {
|
|
|
198
198
|
wasm.__externref_table_dealloc(idx);
|
|
199
199
|
return value;
|
|
200
200
|
}
|
|
201
|
-
/**
|
|
202
|
-
* JavaScript wrapper for `advance_location_simulation`.
|
|
203
|
-
* @param {any} state
|
|
204
|
-
* @returns {any}
|
|
205
|
-
*/
|
|
206
|
-
export function advanceLocationSimulation(state) {
|
|
207
|
-
const ret = wasm.advanceLocationSimulation(state);
|
|
208
|
-
return ret;
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
/**
|
|
212
|
-
* JavaScript wrapper for `location_simulation_from_coordinates`.
|
|
213
|
-
* @param {any} coordinates
|
|
214
|
-
* @param {number | null | undefined} resample_distance
|
|
215
|
-
* @param {LocationBias} bias
|
|
216
|
-
* @returns {any}
|
|
217
|
-
*/
|
|
218
|
-
export function locationSimulationFromCoordinates(coordinates, resample_distance, bias) {
|
|
219
|
-
const ret = wasm.locationSimulationFromCoordinates(coordinates, !isLikeNone(resample_distance), isLikeNone(resample_distance) ? 0 : resample_distance, bias);
|
|
220
|
-
if (ret[2]) {
|
|
221
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
222
|
-
}
|
|
223
|
-
return takeFromExternrefTable0(ret[0]);
|
|
224
|
-
}
|
|
225
|
-
|
|
226
201
|
/**
|
|
227
202
|
* JavaScript wrapper for `location_simulation_from_polyline`.
|
|
228
203
|
* @param {string} polyline
|
|
@@ -241,6 +216,16 @@ export function locationSimulationFromPolyline(polyline, precision, resample_dis
|
|
|
241
216
|
return takeFromExternrefTable0(ret[0]);
|
|
242
217
|
}
|
|
243
218
|
|
|
219
|
+
/**
|
|
220
|
+
* JavaScript wrapper for `advance_location_simulation`.
|
|
221
|
+
* @param {any} state
|
|
222
|
+
* @returns {any}
|
|
223
|
+
*/
|
|
224
|
+
export function advanceLocationSimulation(state) {
|
|
225
|
+
const ret = wasm.advanceLocationSimulation(state);
|
|
226
|
+
return ret;
|
|
227
|
+
}
|
|
228
|
+
|
|
244
229
|
/**
|
|
245
230
|
* JavaScript wrapper for `location_simulation_from_route`.
|
|
246
231
|
* @param {any} route
|
|
@@ -256,6 +241,21 @@ export function locationSimulationFromRoute(route, resample_distance, bias) {
|
|
|
256
241
|
return takeFromExternrefTable0(ret[0]);
|
|
257
242
|
}
|
|
258
243
|
|
|
244
|
+
/**
|
|
245
|
+
* JavaScript wrapper for `location_simulation_from_coordinates`.
|
|
246
|
+
* @param {any} coordinates
|
|
247
|
+
* @param {number | null | undefined} resample_distance
|
|
248
|
+
* @param {LocationBias} bias
|
|
249
|
+
* @returns {any}
|
|
250
|
+
*/
|
|
251
|
+
export function locationSimulationFromCoordinates(coordinates, resample_distance, bias) {
|
|
252
|
+
const ret = wasm.locationSimulationFromCoordinates(coordinates, !isLikeNone(resample_distance), isLikeNone(resample_distance) ? 0 : resample_distance, bias);
|
|
253
|
+
if (ret[2]) {
|
|
254
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
255
|
+
}
|
|
256
|
+
return takeFromExternrefTable0(ret[0]);
|
|
257
|
+
}
|
|
258
|
+
|
|
259
259
|
const NavigationControllerFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
260
260
|
? { register: () => {}, unregister: () => {} }
|
|
261
261
|
: new FinalizationRegistry(ptr => wasm.__wbg_navigationcontroller_free(ptr >>> 0, 1));
|
package/ferrostar_bg.wasm
CHANGED
|
Binary file
|