feat: adds better gpx track views

This commit is contained in:
Moritz Enderle
2026-03-31 00:10:33 +02:00
parent ad329eddb9
commit 3aaa6e916b
18 changed files with 146 additions and 17 deletions

View File

@@ -508,6 +508,24 @@ export function MapView({
))}
</>
)}
{/* GPX imported route geometries */}
{places.map((place) => {
if (!place.route_geometry) return null
try {
const coords = JSON.parse(place.route_geometry) as [number, number][]
if (!coords || coords.length < 2) return null
return (
<Polyline
key={`gpx-${place.id}`}
positions={coords}
color={place.category_color || '#3b82f6'}
weight={3.5}
opacity={0.75}
/>
)
} catch { return null }
})}
</MapContainer>
)
}