Format comment style voice hints

This commit is contained in:
Norbert Renner 2021-02-25 13:47:26 +01:00
parent e34e6a4cb0
commit ea564006e9
5 changed files with 97 additions and 19 deletions

View file

@ -3,6 +3,7 @@ BR.Gpx = {
if (!geoJson?.features) return '';
const trkNameTransform = {
comment: '',
trk: function (trk, feature, coordsList) {
// name as first tag, by using assign and in this order
return Object.assign(
@ -26,7 +27,7 @@ BR.Gpx = {
transform: gpxTransform,
});
const statsComment = BR.Gpx._statsComment(geoJson);
gpx = '<?xml version="1.0" encoding="UTF-8"?>' + statsComment + gpx;
gpx = '<?xml version="1.0" encoding="UTF-8"?>' + statsComment + gpxTransform.comment + gpx;
gpx = BR.Gpx.pretty(gpx);
return gpx;
},