Skip to content

Commit

Permalink
Merge pull request #1001 from geoadmin/fix-PB-785-gpx-files-shifted
Browse files Browse the repository at this point in the history
PB-785: Fix GPX position offset of nodes with timestamp - #patch
  • Loading branch information
LukasJoss authored Jul 12, 2024
2 parents c08a6bd + 4909ee7 commit dc01417
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/utils/gpxUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ export function parseGpx(gpxData, projection) {
if (!gpxData?.length || !(projection instanceof CoordinateSystem)) {
return null
}
// currently points which contain a timestamp are displayed with an offset due to a bug
// therefore they are removed here as they are not needed for displaying (see PB-785)
gpxData = gpxData.replace(/<time>.*?<\/time>/g, '')
const features = new GPX().readFeatures(gpxData, {
dataProjection: WGS84.epsg, // GPX files should always be in WGS84
featureProjection: projection.epsg,
Expand Down

0 comments on commit dc01417

Please sign in to comment.