Skip to content

Commit

Permalink
Merge pull request #1040 from geoadmin/pb-492-add-description-to-expo…
Browse files Browse the repository at this point in the history
…rted-gpx

PB-492: Add description to exported GPX file.
  • Loading branch information
ismailsunni authored Aug 27, 2024
2 parents 6e614e4 + 88bc13c commit f69cfc5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/modules/drawing/lib/export-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ export function generateGpxString(projection, features = []) {
const coordinates = geom.getLinearRing().getCoordinates()
clone.setGeometry(new LineString(coordinates))
}
// Set the desc attribute from description property so that it is exported to GPX in desc tag
if (clone.getProperties().description) {
clone.set('desc', clone.getProperties().description)
}
return clone
})
return gpxFormat.writeFeatures(normalizedFeatures, {
Expand Down

0 comments on commit f69cfc5

Please sign in to comment.