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:
parent
a20036e67c
commit
f94ecc9ef8
@ -1,4 +1,9 @@
|
|||||||
from flask import Flask, request, jsonify
|
from flask import Flask, request, jsonify
|
||||||
|
from flask_cors import CORS
|
||||||
|
|
||||||
|
# Initialize CORS
|
||||||
|
app = Flask(__name__)
|
||||||
|
CORS(app)
|
||||||
import json
|
import json
|
||||||
import os
|
import os
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
|
|||||||
@ -14,7 +14,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
|||||||
// Initialize the map
|
// Initialize the map
|
||||||
const map = new maplibregl.Map({
|
const map = new maplibregl.Map({
|
||||||
container: '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],
|
center: [8.5, 47.3],
|
||||||
zoom: 10
|
zoom: 10
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user