Profile: 1/5/10 km splits or laps (FIT/TCX) shaded in the charts, in the table and as numbered posts on the map; tooltip follows the pointer over the plots only
This commit is contained in:
1 parent
3e487539bc
commit
38368fc801
9 files changed
+292
-101
No files matched your search
@@ -37,7 +37,7 @@ module Maptool
|
||||
EXTENSIONS = %w[.gpx .fit .tcx .geojson].freeze
|
||||
# Bumped when a parser starts reading more (power, temperature, ...):
|
||||
# tracks imported before get their profile re-read once (reparse).
|
||||
PARSER_VERSION = 1
|
||||
PARSER_VERSION = 2
|
||||
|
||||
def initialize(db_path, gpx_store:, sources_dir:)
|
||||
@path = db_path
|
||||
@@ -92,7 +92,7 @@ module Maptool
|
||||
|
||||
write do |db, rev, now|
|
||||
db.execute("UPDATE items SET properties = ?, updated_at = ?, rev = ? WHERE id = ?",
|
||||
[JSON.generate(JSON.parse(props).merge("profile" => feature["properties"]["profile"])), now, rev, id])
|
||||
[JSON.generate(JSON.parse(props).merge(feature["properties"].slice("profile", "laps"))), now, rev, id])
|
||||
end
|
||||
updated += 1
|
||||
rescue Gpx::ParseError, Fit::ParseError, Errno::ENOENT, JSON::ParserError, GpxStore::InvalidPath
|
||||
|
||||
Reference in new issue
Block a user