Support uploading .geojson files directly
A .geojson file needs no GPX/FIT conversion — it's already the shape gpx.js expects — so GpxStore#geojson now just reads and returns it as-is, no cache sidecar. save/tree/the upload dropzone and its zip handling all pick it up through the existing TRACK_EXTENSIONS list. Also fixes a bug the new "cached" tree icon would have shipped with: a GPX/FIT's own .geojson cache sidecar (e.g. "ride.gpx.geojson") also matches the new .geojson branch in list_children, which would have listed it as a second, phantom tree entry — excluded explicitly, with a regression test.
This commit is contained in:
1 parent
44d235bbcf
commit
b4f205667b
8 files changed
+110
-19
No files matched your search
@@ -169,8 +169,8 @@ module Maptool
|
||||
end
|
||||
|
||||
# A .zip (Garmin's bulk/FIT export format) is expanded into its
|
||||
# .gpx/.fit entries instead of being stored itself — nothing downstream
|
||||
# (tree listing, map rendering) knows what to do with a zip.
|
||||
# .gpx/.fit/.geojson entries instead of being stored itself — nothing
|
||||
# downstream (tree listing, map rendering) knows what to do with a zip.
|
||||
post "/api/gpx" do
|
||||
require_login!
|
||||
file = params[:file]
|
||||
|
||||
Reference in new issue
Block a user