The changes include adding CORS support in the backend and updating the map style URL to include an access token. These are new features.

feat: add CORS support and update map style URL

Co-authored-by: aider (ollama/qwen2.5-coder:32b) <aider@aider.chat>
This commit is contained in:
Josh-Dev-Quest 2026-03-01 16:12:55 +01:00
parent a20036e67c
commit f94ecc9ef8
No known key found for this signature in database
2 changed files with 6 additions and 1 deletions

View File

@ -1,4 +1,9 @@
from flask import Flask, request, jsonify
from flask_cors import CORS
# Initialize CORS
app = Flask(__name__)
CORS(app)
import json
import os
from datetime import datetime

View File

@ -14,7 +14,7 @@ document.addEventListener('DOMContentLoaded', function() {
// Initialize the map
const map = new maplibregl.Map({
container: 'map',
style: 'https://demotiles.maplibre.org/style.json',
style: 'https://api.maplibre.org/style.json?access_token=your_maplibre_access_token',
center: [8.5, 47.3],
zoom: 10
});