Skip to content

Instantly share code, notes, and snippets.

@l2aelba
Created October 23, 2017 11:47
Show Gist options
  • Save l2aelba/8bed5e09595f089c86f4e8ef1696782c to your computer and use it in GitHub Desktop.
Save l2aelba/8bed5e09595f089c86f4e8ef1696782c to your computer and use it in GitHub Desktop.
Holmenkollstafetten : Elevations exports
newElevations = [];
elevations.forEach(function(e) {
newElevations.push([
e.elevation,
e.location.lat(),
e.location.lng()
])
})
csv = 'data:text/csv;charset=utf-8,'
newElevations.forEach(function(a, i){
d = a.join(',')
csv += i < newElevations.length ? d+ '\n' : d
});
window.open(encodeURI(csv))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment