The Rail Map v2!

The Rail Map v2!

October 21st, 2022 / 570 words / 3 min read

It’s that time again!

While this was originally supposed to be a post about bringing The Rail Map to Vite, I got a little in over by head. I’m happy to announce that the next version of The Rail Map is v2-Next!

Yep, so I decided to port the entirety of The Rail Map over to Next.js, including (but not limited to) /amtrak, /vrf, /data, and more. Along the way, I completely reworked the preview experience, and made it easier to add more cool content in the future. While we’ll get into that later, let’s take a look at what’s new…

Completely New Feature Sidebar

The sidebar has been fully redesigned to display more information, and also look a whole lot nicer! Trains have a two tab system, with the default information on one tab, and the stations on the other (That’s right, there’s now station support). For some values (mainly time related ones), the rings are dynamic, meaning the color changes depending on how early or late they are (and let’s face it, Amtrak isn’t known for being early).

As for the stations, each stop has it’s own box with a color coded ring. You can see the stations coming up, and those behind, all with estimates from Amtrak.

Crossings and bridges are also back with the new design, with lots more information (that’s formatted nicely). The railroad, milepost, crossing type, quiet zone status, and even the emergency telephone number are all easy to access and view. Bridges are also supported nicely, with much of the same information available. This data is available throughout the US and Canada, with more North American countries coming soonish. (Disclaimer: Please don’t try to use The Rail Map for emergency services, instead call the phone number located on the ground near the crossing).

Mobile View

With the new sidebar comes a brand new mobile view, better supported than ever for touch devices. Links become buttons, scrolling is effortless, and everything closes with just a tap on the top bar. This works with all features that work on desktop, so you’ll never be left wondering about a crossing or train.

Live Trains & New /amtrak Page

Although it was never really announced, the has supported live tracking of Amtrak via amtrak.js since v1.4. This release includes the major updates to train tracking mentioned above, along with more information about each station! You can see which trains are on their way, and when. Clicking on a train in the side panel will also bring up the relevant train information, and also move the map to the current train location.

Visit the site!

All these brand new features are now live at

Thank You!

And finally, a thanks to everyone who’s used the map! When I originally started this project 3 years ago (by manually plotting every railroad crossing from Emeryville to Chicago), I never thought anyone else would find it, nevertheless use it. It’s so cool to see people find their own uses for some dumb thing I made when I didn’t know anything about programming. (While I still don’t know anything about programming, at least I can say I know Next.js 😎)

For any issues, bugs, or suggestions, you can find my contact info on my website (which was not built with Next.js, sadly). As always, the project is open source here. Please feel free to give me tips on what I’m doing wrong, because I’m sure there are a lot of things.

Loading comments...