Critical Fix for Post Creation:
✅ Added support for GPX route points (rtept) in addition to track points (trkpt)
✅ GPX statistics now automatically calculated during post creation
✅ Supports all GPX file types: tracks, routes, and waypoints
Results:
- Route distance: 347.89 km correctly calculated
- Track points: 16,161 route points processed
- Statistics display properly on post detail pages
- New posts will automatically show route information
Technical Changes:
- Enhanced extract_gpx_statistics() to parse <rte><rtept> elements
- Maintained backward compatibility with track and waypoint files
- Fixed route map card loading during post creation workflow
This resolves the issue where GPX statistics appeared as zeros for route-based GPX files, ensuring all motorcycle adventure routes display proper distance and point statistics immediately upon upload.
- Updated create_map_route_from_gpx function to parse GPX routes
- Added support for <rte> and <rtept> elements in addition to tracks
- This fixes the map not showing routes from GPX files that contain route data instead of track data
- Routes from applications like gpxplanner.app now work correctly