mirror of
https://github.com/Freika/dawarich.git
synced 2026-01-11 01:31:39 -05:00
Fix GPX export
This commit is contained in:
parent
d517b72f69
commit
f50b11166b
5 changed files with 15 additions and 4 deletions
|
|
@ -1 +1 @@
|
||||||
0.14.4
|
0.14.5
|
||||||
|
|
|
||||||
10
CHANGELOG.md
10
CHANGELOG.md
|
|
@ -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/)
|
The format is based on [Keep a Changelog](http://keepachangelog.com/)
|
||||||
and this project adheres to [Semantic Versioning](http://semver.org/).
|
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
|
# [0.14.4] - 2024-09-24
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -12,7 +12,7 @@ class Points::GpxSerializer
|
||||||
gpx.waypoints << GPX::Waypoint.new(
|
gpx.waypoints << GPX::Waypoint.new(
|
||||||
lat: point.latitude.to_f,
|
lat: point.latitude.to_f,
|
||||||
lon: point.longitude.to_f,
|
lon: point.longitude.to_f,
|
||||||
time: point.recorded_at.strftime('%FT%R:%SZ'),
|
time: point.recorded_at,
|
||||||
ele: point.altitude.to_f
|
ele: point.altitude.to_f
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -75,6 +75,7 @@ class Exports::Create
|
||||||
dir_path = Rails.root.join('public', 'exports')
|
dir_path = Rails.root.join('public', 'exports')
|
||||||
Dir.mkdir(dir_path) unless Dir.exist?(dir_path)
|
Dir.mkdir(dir_path) unless Dir.exist?(dir_path)
|
||||||
file_path = dir_path.join("#{export.name}.#{file_format}")
|
file_path = dir_path.join("#{export.name}.#{file_format}")
|
||||||
|
|
||||||
File.open(file_path, 'w') { |file| file.write(data) }
|
File.open(file_path, 'w') { |file| file.write(data) }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue