Dev.to
7/14/2026

The original title is: "How I built an interactive atlas of 767 train routes (React + MapLibre + open data)"
Original: How I built an interactive atlas of 767 train routes (React + MapLibre + open data)
Short summary
A developer built TrainRouter, a free interactive map of 767 train routes across 118 countries using React, MapLibre GL JS, and OpenFreeMap tiles. The writeup covers data modeling, spline smoothing for route geometry, line-offset rendering for shared corridors, and a prerendering build step that generates ~1,500 static HTML pages for SEO and AI crawler discoverability. The full dataset is released as open data (CC BY 4.0).
- •Interactive atlas of 767 global train routes built with React + MapLibre + OpenFreeMap
- •Key engineering: prerendering 1,500 static pages for SEO/AI crawler visibility
- •Full dataset open-sourced as CSV, JSON, and GeoJSON under CC BY 4.0
Generated with AI, which can make mistakes.
Is this a good recommendation for you?



