refactor: switch from maplibregl to Leaflet
Co-authored-by: aider (ollama/qwen2.5-coder:32b) <aider@aider.chat>
This commit is contained in:
parent
f94ecc9ef8
commit
6c4599dffc
12
js/main.js
12
js/main.js
@ -12,15 +12,13 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
window.isCreatingJourney = true;
|
||||
|
||||
// Initialize the map
|
||||
const map = new maplibregl.Map({
|
||||
container: 'map',
|
||||
style: 'https://api.maplibre.org/style.json?access_token=your_maplibre_access_token',
|
||||
center: [8.5, 47.3],
|
||||
zoom: 10
|
||||
});
|
||||
const map = L.map('map').setView([8.5, 47.3], 10);
|
||||
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
|
||||
attribution: '© OpenStreetMap contributors'
|
||||
}).addTo(map);
|
||||
|
||||
// Add navigation controls
|
||||
map.addControl(new maplibregl.NavigationControl());
|
||||
L.control.scale().addTo(map);
|
||||
|
||||
// Add geolocate control
|
||||
map.addControl(new maplibregl.GeolocateControl({
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user