Concatenate total track
+ handle server voicehint time removed, times with 3 digits
This commit is contained in:
parent
954812cf52
commit
25f8828ae7
10 changed files with 412 additions and 47 deletions
|
|
@ -47,6 +47,11 @@ describe('voice hints', () => {
|
|||
let brouterGpx = read('2-locus.gpx');
|
||||
brouterGpx = brouterGpx.replace(/.0<\/locus:rteDistance/g, '</locus:rteDistance'); // ignore .0 decimal
|
||||
brouterGpx = brouterGpx.replace(/\n\s*<\/extensions>\n\s*<extensions>/, ''); // ignore (invalid) double tag
|
||||
// ignore float rounding differences
|
||||
brouterGpx = brouterGpx.replace(
|
||||
/:(rteTime|rteSpeed)>([\d.]*)<\//g,
|
||||
(match, p1, p2) => `:${p1}>${(+p2).toFixed(3)}</`
|
||||
);
|
||||
|
||||
const gpx = BR.Gpx.format(geoJson, 2);
|
||||
expect(gpx).toEqual(brouterGpx);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue