Skip to content

Commit a991e03

Browse files
author
Alfiya Tarasenko
committed
Add a link for gpx traces examples
1 parent 1141ce8 commit a991e03

3 files changed

Lines changed: 31 additions & 15 deletions

File tree

javascript/map-matching-to-snap-gpx-to-roads-maplibre/combine.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ const fs = require('fs').promises;
33
const path = require('path');
44

55
async function inlineResources() {
6-
const htmlPath = path.resolve('map-matching/src/demo.html');
7-
const outputPath = path.resolve('map-matching/demo_combined.html');
6+
const htmlPath = path.resolve('map-matching-to-snap-gpx-to-roads-maplibre/src/demo.html');
7+
const outputPath = path.resolve('map-matching-to-snap-gpx-to-roads-maplibre/demo_combined.html');
88

99
try {
1010
const html = await inlineSource(htmlPath, {
1111
compress: false,
12-
rootpath: path.resolve('map-matching/src'),
12+
rootpath: path.resolve('map-matching-to-snap-gpx-to-roads-maplibre/src'),
1313
ignore: []
1414
});
1515

javascript/map-matching-to-snap-gpx-to-roads-maplibre/demo_combined.html

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -417,13 +417,21 @@
417417
<div class="sidebar">
418418
<h2>GPX Map Matching</h2>
419419
<p>Upload a GPX file to see the original GPS trace and its matched route</p>
420-
420+
421421
<div class="upload-section">
422422
<input type="file" id="gpx-file-input" accept=".gpx,.xml" style="display: none;">
423423
<button class="button upload-button" id="upload-button">Upload GPX File</button>
424+
425+
<span style="font-size: 0.65em; color: #777;">You can download public GPX tracks for testing from
426+
<a href="https://www.openstreetmap.org/traces" target="_blank"
427+
rel="noopener noreferrer nofollow">OpenStreetMap
428+
Traces</a>.
429+
</span>
430+
424431
<div id="file-info" class="file-info hidden"></div>
432+
425433
</div>
426-
434+
427435
<div class="mode-section">
428436
<h3>Travel Mode</h3>
429437
<div class="travel-modes">
@@ -441,15 +449,15 @@ <h3>Travel Mode</h3>
441449
</label>
442450
</div>
443451
</div>
444-
452+
445453
<button class="button match-button" id="match-button" disabled>Match to Roads</button>
446454
<button class="button clear-button" id="clear-all-button">Clear All</button>
447-
455+
448456
<div id="summary-info" class="summary-info hidden">
449457
<h3>Summary</h3>
450458
<div id="summary-content"></div>
451459
</div>
452-
460+
453461
<div id="download-section" class="download-section hidden">
454462
<h3>Download Matched Route</h3>
455463
<button class="button download-button" id="download-geojson">Download GeoJSON</button>
@@ -1321,4 +1329,4 @@ <h3>Error</h3>
13211329
} </script>
13221330
</body>
13231331

1324-
</html>
1332+
</html>

javascript/map-matching-to-snap-gpx-to-roads-maplibre/src/demo.html

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,21 @@
1616
<div class="sidebar">
1717
<h2>GPX Map Matching</h2>
1818
<p>Upload a GPX file to see the original GPS trace and its matched route</p>
19-
19+
2020
<div class="upload-section">
2121
<input type="file" id="gpx-file-input" accept=".gpx,.xml" style="display: none;">
2222
<button class="button upload-button" id="upload-button">Upload GPX File</button>
23+
24+
<span style="font-size: 0.65em; color: #777;">You can download public GPX tracks for testing from
25+
<a href="https://www.openstreetmap.org/traces" target="_blank"
26+
rel="noopener noreferrer nofollow">OpenStreetMap
27+
Traces</a>.
28+
</span>
29+
2330
<div id="file-info" class="file-info hidden"></div>
31+
2432
</div>
25-
33+
2634
<div class="mode-section">
2735
<h3>Travel Mode</h3>
2836
<div class="travel-modes">
@@ -40,15 +48,15 @@ <h3>Travel Mode</h3>
4048
</label>
4149
</div>
4250
</div>
43-
51+
4452
<button class="button match-button" id="match-button" disabled>Match to Roads</button>
4553
<button class="button clear-button" id="clear-all-button">Clear All</button>
46-
54+
4755
<div id="summary-info" class="summary-info hidden">
4856
<h3>Summary</h3>
4957
<div id="summary-content"></div>
5058
</div>
51-
59+
5260
<div id="download-section" class="download-section hidden">
5361
<h3>Download Matched Route</h3>
5462
<button class="button download-button" id="download-geojson">Download GeoJSON</button>
@@ -86,4 +94,4 @@ <h3>Error</h3>
8694
<script type="module" src="demo.js" inline></script>
8795
</body>
8896

89-
</html>
97+
</html>

0 commit comments

Comments
 (0)