brouter-web/js/format
Henrik Fehlauer 96016b7fd0
Document new export formats added in BRouter 1.7.0 and fix export error
BRouter 1.7.0 implemented support for three new export formats:
"Cruiser", "BRouter internal" and "Locus(-new)".

"Cruiser" (`turnInstructionMode=8`) and "BRouter internal"
(`turnInstructionMode=9`) are not yet exposed in BRouter-Web's UI
through profiles, so we do not need to implement them at the moment.
Here we only document them by making them explicit unimplemented `cases`
in the code.

In addition, BRouter changed "locus-style" with `turnInstructionMode=2`
to emit a different format for newer releases of Locus, while the old
format is now referred to as "locus-old-style" from profiles with
`turnInstructionMode=7`. Since BRouter-Web does not know yet about the
the new id, exports will fail with "unhandled turnInstructionMode"
errors.

To fix the latter issue, we now map `turnInstructionMode=7` to the newly
renamed `LocusOldVoiceHints()`. Note that `turnInstructionMode=2` is
also currently using `LocusOldVoiceHints()`, i.e. the new format still
needs an implementation.

Test Plan:
  - `yarn test`
  - Check choosing "locus-old-style" now exports without an error.
2023-07-07 16:44:21 +00:00
..
Csv.js Format CSV 2021-04-01 12:17:18 +02:00
Fit.js Added new export as FIT file format fixes #322 2022-09-14 21:02:50 +02:00
Gpx.js Add GPX link (brouter#152) 2022-08-02 20:02:23 +02:00
Kml.js Format KML 2021-04-01 11:53:17 +02:00
VoiceHints.js Document new export formats added in BRouter 1.7.0 and fix export error 2023-07-07 16:44:21 +00:00
Xml.js Break after self-closing trkpt without ele (beeline) 2021-06-12 11:11:08 +02:00