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;
|
window.isCreatingJourney = true;
|
||||||
|
|
||||||
// Initialize the map
|
// Initialize the map
|
||||||
const map = new maplibregl.Map({
|
const map = L.map('map').setView([8.5, 47.3], 10);
|
||||||
container: 'map',
|
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
|
||||||
style: 'https://api.maplibre.org/style.json?access_token=your_maplibre_access_token',
|
attribution: '© OpenStreetMap contributors'
|
||||||
center: [8.5, 47.3],
|
}).addTo(map);
|
||||||
zoom: 10
|
|
||||||
});
|
|
||||||
|
|
||||||
// Add navigation controls
|
// Add navigation controls
|
||||||
map.addControl(new maplibregl.NavigationControl());
|
L.control.scale().addTo(map);
|
||||||
|
|
||||||
// Add geolocate control
|
// Add geolocate control
|
||||||
map.addControl(new maplibregl.GeolocateControl({
|
map.addControl(new maplibregl.GeolocateControl({
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user