Use togpx fork for now
- with PR 11 merged - referencing jxon fork with namespace prefixes fixed
This commit is contained in:
parent
4c27f5894c
commit
954812cf52
4 changed files with 10 additions and 18 deletions
|
|
@ -226,7 +226,7 @@
|
||||||
|
|
||||||
_getWpt: function (hint, cmd, coord) {
|
_getWpt: function (hint, cmd, coord) {
|
||||||
const extensions = {};
|
const extensions = {};
|
||||||
// TODO 'locus:' namespace gets removed
|
|
||||||
extensions['locus:rteDistance'] = hint.distance;
|
extensions['locus:rteDistance'] = hint.distance;
|
||||||
if (hint.time > 0) {
|
if (hint.time > 0) {
|
||||||
extensions['locus:rteTime'] = hint.time;
|
extensions['locus:rteTime'] = hint.time;
|
||||||
|
|
@ -311,11 +311,6 @@
|
||||||
rtept: this._createRoutePoints(gpx),
|
rtept: this._createRoutePoints(gpx),
|
||||||
});
|
});
|
||||||
|
|
||||||
// reorder trk after rte
|
|
||||||
const trk = gpx.trk;
|
|
||||||
delete gpx.trk;
|
|
||||||
gpx.trk = trk;
|
|
||||||
|
|
||||||
return gpx;
|
return gpx;
|
||||||
}.bind(this);
|
}.bind(this);
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -75,7 +75,7 @@
|
||||||
"mapbbcode": "MapBBCode/mapbbcode#v1.2.0",
|
"mapbbcode": "MapBBCode/mapbbcode#v1.2.0",
|
||||||
"osmtogeojson": "^3.0.0-beta.4",
|
"osmtogeojson": "^3.0.0-beta.4",
|
||||||
"regenerator-runtime": "^0.13.7",
|
"regenerator-runtime": "^0.13.7",
|
||||||
"togpx": "JarnoLeConte/togpx#13c65a8",
|
"togpx": "nrenner/togpx#722d291",
|
||||||
"topojson-client": "^3.1.0",
|
"topojson-client": "^3.1.0",
|
||||||
"url-search-params": "~0.5.0"
|
"url-search-params": "~0.5.0"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -45,8 +45,7 @@ test('simple track', () => {
|
||||||
describe('voice hints', () => {
|
describe('voice hints', () => {
|
||||||
test('2-locus', () => {
|
test('2-locus', () => {
|
||||||
let brouterGpx = read('2-locus.gpx');
|
let brouterGpx = read('2-locus.gpx');
|
||||||
brouterGpx = brouterGpx.replace(/<(\/?)locus:/g, '<$1'); // TODO 'locus:' namespace
|
brouterGpx = brouterGpx.replace(/.0<\/locus:rteDistance/g, '</locus:rteDistance'); // ignore .0 decimal
|
||||||
brouterGpx = brouterGpx.replace(/.0<\/rteDistance/g, '</rteDistance'); // ignore .0 decimal
|
|
||||||
brouterGpx = brouterGpx.replace(/\n\s*<\/extensions>\n\s*<extensions>/, ''); // ignore (invalid) double tag
|
brouterGpx = brouterGpx.replace(/\n\s*<\/extensions>\n\s*<extensions>/, ''); // ignore (invalid) double tag
|
||||||
|
|
||||||
const gpx = BR.Gpx.format(geoJson, 2);
|
const gpx = BR.Gpx.format(geoJson, 2);
|
||||||
|
|
@ -75,7 +74,6 @@ describe('voice hints', () => {
|
||||||
|
|
||||||
test('6-orux', () => {
|
test('6-orux', () => {
|
||||||
let brouterGpx = read('6-orux.gpx');
|
let brouterGpx = read('6-orux.gpx');
|
||||||
brouterGpx = brouterGpx.replace(/<(\/?)om:/g, '<$1'); // TODO namespace
|
|
||||||
const gpx = BR.Gpx.format(geoJson, 6);
|
const gpx = BR.Gpx.format(geoJson, 6);
|
||||||
expect(gpx).toEqual(brouterGpx);
|
expect(gpx).toEqual(brouterGpx);
|
||||||
});
|
});
|
||||||
|
|
|
||||||
15
yarn.lock
15
yarn.lock
|
|
@ -7189,10 +7189,9 @@ just-debounce@^1.0.0:
|
||||||
resolved "https://registry.yarnpkg.com/just-debounce/-/just-debounce-1.0.0.tgz#87fccfaeffc0b68cd19d55f6722943f929ea35ea"
|
resolved "https://registry.yarnpkg.com/just-debounce/-/just-debounce-1.0.0.tgz#87fccfaeffc0b68cd19d55f6722943f929ea35ea"
|
||||||
integrity sha1-h/zPrv/AtozRnVX2cilD+SnqNeo=
|
integrity sha1-h/zPrv/AtozRnVX2cilD+SnqNeo=
|
||||||
|
|
||||||
jxon@~2.0.0-beta.2:
|
jxon@nrenner/jxon#dd3b9fa:
|
||||||
version "2.0.0-beta.5"
|
version "2.0.0-beta.5.1"
|
||||||
resolved "https://registry.yarnpkg.com/jxon/-/jxon-2.0.0-beta.5.tgz#3b6a94104f9801ee682fd056645ff5473d9b343e"
|
resolved "https://codeload.github.com/nrenner/jxon/tar.gz/dd3b9fa381cecff2e97128be49d2e04bb435d4bb"
|
||||||
integrity sha1-O2qUEE+YAe5oL9BWZF/1Rz2bND4=
|
|
||||||
dependencies:
|
dependencies:
|
||||||
xmldom "^0.1.21"
|
xmldom "^0.1.21"
|
||||||
|
|
||||||
|
|
@ -10565,12 +10564,12 @@ to-utf8@0.0.1:
|
||||||
resolved "https://registry.yarnpkg.com/to-utf8/-/to-utf8-0.0.1.tgz#d17aea72ff2fba39b9e43601be7b3ff72e089852"
|
resolved "https://registry.yarnpkg.com/to-utf8/-/to-utf8-0.0.1.tgz#d17aea72ff2fba39b9e43601be7b3ff72e089852"
|
||||||
integrity sha1-0Xrqcv8vujm55DYBvns/9y4ImFI=
|
integrity sha1-0Xrqcv8vujm55DYBvns/9y4ImFI=
|
||||||
|
|
||||||
togpx@JarnoLeConte/togpx#13c65a8:
|
togpx@nrenner/togpx#722d291:
|
||||||
version "0.5.1"
|
version "0.5.5-0.fork.1"
|
||||||
resolved "https://codeload.github.com/JarnoLeConte/togpx/tar.gz/13c65a82e3fbe8694f189d34fb7a339fa07700ec"
|
resolved "https://codeload.github.com/nrenner/togpx/tar.gz/722d291b8dee3b875babb2d18d70b1e4f60cf876"
|
||||||
dependencies:
|
dependencies:
|
||||||
concat-stream "~1.0.1"
|
concat-stream "~1.0.1"
|
||||||
jxon "~2.0.0-beta.2"
|
jxon nrenner/jxon#dd3b9fa
|
||||||
optimist "~0.3.5"
|
optimist "~0.3.5"
|
||||||
xmldom "~0.1.17"
|
xmldom "~0.1.17"
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue