Session row data — only rows with both lat and lon
defined contribute to the route polyline.
SVG width in pixels.
SVG height in pixels.
Optional extra points to project alongside the route.
The path string, contributing point count, projected start / end coordinates, and projected markers.
Project a session's row data into an SVG polyline path string at the requested pixel dimensions. Builds the route's bounding box from the lat / lon pairs and linearly maps each point into the inset viewBox — good enough for trip-scale routes (a few miles to a few hundred miles) where Mercator distortion is negligible.
SVG's y-axis grows downward, so the latitude axis is flipped — higher latitude lands at smaller y.
If fewer than two rows carry both
latandlon, the path is empty,start/endarenull, andmarkersis empty; callers should render an empty-state placeholder in that case.Optional
markersget projected using the same bbox so callers can overlay hotspot circles / labels at known lat/lon positions without re-deriving the projection.