Fix GPX export

This commit is contained in:
Eugene Burmakin 2024-09-28 12:45:22 +02:00
parent d517b72f69
commit f50b11166b
5 changed files with 15 additions and 4 deletions

View file

@ -1 +1 @@
0.14.4
0.14.5

View file

@ -5,6 +5,16 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).
# [0.14.5] - 2024-09-28
### Fixed
- GPX export now finishes correctly and does not throw an error in the end
### Changed
- Map layers from Stadia were disabled for now due to necessary API key
# [0.14.4] - 2024-09-24
### Fixed

File diff suppressed because one or more lines are too long

View file

@ -12,7 +12,7 @@ class Points::GpxSerializer
gpx.waypoints << GPX::Waypoint.new(
lat: point.latitude.to_f,
lon: point.longitude.to_f,
time: point.recorded_at.strftime('%FT%R:%SZ'),
time: point.recorded_at,
ele: point.altitude.to_f
)
end

View file

@ -75,6 +75,7 @@ class Exports::Create
dir_path = Rails.root.join('public', 'exports')
Dir.mkdir(dir_path) unless Dir.exist?(dir_path)
file_path = dir_path.join("#{export.name}.#{file_format}")
File.open(file_path, 'w') { |file| file.write(data) }
end
end