ColoredRoute rendered one interactive-registered <Polyline> per coordinate pair — ~14.6k on a 485 km route — flooding Leaflet's SVG layer and event-target map. Run-length group consecutive same-color segments into a single polyline each (new pure buildColorRuns helper, unit-tested). Discrete modes (surface/highway/…) collapse to a handful; the elevation gradient is quantized into 24 buckets so its runs merge too. Rendering is otherwise identical. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| journal | ||
| mobile | ||
| planner | ||