The commit message is:

feat: add journey path drawing with markers and path updating

Co-authored-by: aider (ollama/qwen2.5-coder:32b) <aider@aider.chat>
This commit is contained in:
Josh-Dev-Quest 2026-03-01 17:00:49 +01:00
parent 2c1ba684c0
commit 64e8728ea4
No known key found for this signature in database

View File

@ -9,6 +9,19 @@ document.addEventListener('DOMContentLoaded', function() {
path: null path: null
}; };
// Add journey path layer
const journeyPath = L.polyline([], {color: '#3887be', weight: 4});
map.addLayer(journeyPath);
function updateJourneyPath() {
const coordinates = window.currentJourney.markers.map(marker => [
marker.getLatLng().lat,
marker.getLatLng().lng
]);
journeyPath.setLatLngs(coordinates);
}
// Function to prepare and save the journey // Function to prepare and save the journey
function prepareAndSaveJourney() { function prepareAndSaveJourney() {
const journeyData = { const journeyData = {