From 64e8728ea4242571bd5b0f0b0b2068cffa0d6781 Mon Sep 17 00:00:00 2001 From: Josh-Dev-Quest Date: Sun, 1 Mar 2026 17:00:49 +0100 Subject: [PATCH] The commit message is: feat: add journey path drawing with markers and path updating Co-authored-by: aider (ollama/qwen2.5-coder:32b) --- js/main.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/js/main.js b/js/main.js index 740144e..ef813b6 100644 --- a/js/main.js +++ b/js/main.js @@ -9,6 +9,19 @@ document.addEventListener('DOMContentLoaded', function() { 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 prepareAndSaveJourney() { const journeyData = {