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:
parent
2c1ba684c0
commit
64e8728ea4
13
js/main.js
13
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 = {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user