mirror of
https://github.com/gpxstudio/gpx.studio.git
synced 2026-10-07 06:14:07 +00:00
progress
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
/**
|
||||
* The value of a trackpoint for a category of the engine (surface, highway): `codes` has one entry
|
||||
* per trackpoint, 0 when the value is unknown, else 1 + the index of the value in `names`.
|
||||
*/
|
||||
export function categoryAt(
|
||||
codes: ArrayLike<number>,
|
||||
names: readonly string[],
|
||||
index: number
|
||||
): string | undefined {
|
||||
const code = codes[index];
|
||||
return code ? names[code - 1] : undefined;
|
||||
}
|
||||
Reference in New Issue
Block a user