feat: Add interactive map functionality with Leaflet.js
- Implemented interactive map card with expand functionality - Added Leaflet.js integration with OpenStreetMap tiles - Created expandable map modal (80% screen coverage) - Fixed cover image display on community page - Enhanced post detail page with interactive route visualization - Added proper error handling and fallback content - Cleaned up JavaScript structure and removed duplicate code - Updated community index template to use cover images - Added GPX file processing utilities - Fixed indentation error in run.py Map features: - Country-level positioning (Romania default) - Zoom controls and interactive navigation - Test marker with popup functionality - Expandable full-screen view with X button - Clean console logging for debugging - Responsive design with Tailwind CSS styling
This commit is contained in:
@@ -296,6 +296,15 @@ def new_post():
|
||||
post_id=post.id
|
||||
)
|
||||
db.session.add(gpx_file_record)
|
||||
db.session.flush() # Get the GPX file ID
|
||||
|
||||
# Extract GPX statistics
|
||||
from app.utils.gpx_processor import process_gpx_file
|
||||
if process_gpx_file(gpx_file_record):
|
||||
current_app.logger.info(f'GPX statistics extracted for: {result["filename"]}')
|
||||
else:
|
||||
current_app.logger.warning(f'Failed to extract GPX statistics for: {result["filename"]}')
|
||||
|
||||
current_app.logger.info(f'GPX file saved: {result["filename"]}')
|
||||
except Exception as e:
|
||||
current_app.logger.warning(f'Error processing GPX file: {str(e)}')
|
||||
|
||||
Reference in New Issue
Block a user