function displayJourney(journey) { document.getElementById('journey-title').textContent = journey.name; const container = document.getElementById('timeline-container'); container.innerHTML = ''; journey.markers.forEach(marker => { const markerEl = document.createElement('div'); markerEl.className = 'timeline-event'; markerEl.innerHTML = `

${marker.content.title || 'Untitled Event'}

${marker.content.date}

${marker.lngLat.lng.toFixed(4)}, ${marker.lngLat.lat.toFixed(4)}

${marker.content.text}

${marker.content.videoUrl ? `` : ''}
${marker.content.images.map(img => `Event image`).join('')}
`; container.appendChild(markerEl); }); } // Get journey ID from URL const urlParams = new URLSearchParams(window.location.search); const journeyId = urlParams.get('id'); // Load journey data from localStorage if (journeyId) { loadJourneysFromLocalStorage(); const journey = journeys.find(j => j.id === parseInt(journeyId)); if (journey) { displayJourney(journey); } else { document.getElementById('journey-title').textContent = 'Journey not found'; } }