CSV download

This commit is contained in:
Norbert Renner 2014-05-27 16:08:23 +02:00
parent 7e153b3a33
commit 9f2e15bff0
2 changed files with 3 additions and 1 deletions

View file

@ -12,7 +12,8 @@ BR.Download = BR.Control.extend({
var html = '<div class="label">&nbsp;</div><div class="value">';
if (urls.gpx) {
html += '<a href="' + urls.gpx + '" download="brouter.gpx" target="_blank">GPX</a> &middot; ';
html += '<a href="' + urls.kml + '" download="brouter.kml" target="_blank">KML</a>';
html += '<a href="' + urls.kml + '" download="brouter.kml" target="_blank">KML</a> &middot; ';
html += '<a href="' + urls.csv + '" download="brouter.tsv" target="_blank">CSV</a>';
}
html += '</div>'
this._content.innerHTML = html;

View file

@ -139,6 +139,7 @@
if (latLngs.length > 1) {
urls.gpx = router.getUrl(latLngs, 'gpx');
urls.kml = router.getUrl(latLngs, 'kml');
urls.csv = router.getUrl(latLngs, 'csv');
}
download.update(urls);