NJ Bus/Rail Map
Northern NJ | Central NJ
Southern NJ | Park & Rides
How to use | About

About this map

This site is not affiliated with NJ Transit or any other transportation provider. Be sure to read the disclaimer. It's really long and it makes the lawyers happy. And it just might prevent you from ending up on Staten Island accidentally.

What if I find something wrong?

If you see something incorrect/outdated on the site, by all means let me know via email (douglaspkelly@gmail.com) and I'll get it fixed. I haven't been on many of the routes and I know for a fact that the maps on the schedules (my main source of information) aren't always up-to-date.

Which bus routes are not on this map?

Generally, any route (or segment of a route) that has less than three round trips per day, private bus company routes, and routes (or portions thereof) that are seasonal. NJT routes known to not be on the map are: NJT63, NJT153, NJT304, NJT318, NJT378, NJT417, NJT418, NJT460, and all Ocean County routes. Ocean is currently excluded because there is (or, was) a map for the county available elsewhere.

Which rail services routes are not on this map?

Currently not on the map (as of April 2012): PATH, Newark Light Rail, RiverLINE, SEPTA.

Why did you create this?

Why not?

How?

Like any map, you need information to display on the map. For bus routes, that's the actual routing of the route. Since buses go on roads, the obvious choice is to get the road data and display that. I'm not rich, so I can't get the raw data from the data sources that are out there. Besides, info that complete is not really needed. Ideally NJ Transit could give me that info in an electronic form.

Update (Dec '13): NJ Transit now supplies GTFS data which includes the routes. However, because it has so much detail, it would, in my opinion, clutter the map. So, this data is used as guidance only.

The route data is contained in its own KML file, but most editing takes place in a homemade map-based editor that uses a database to be the main source of data, which the KML files generated from that.

Now that I had all of these KML files for each route I needed to combine them into one map. I didn't want to overlay one route over another just because they went on the same road (the Lincoln Tunnel for example), so I created a method for offsetting each route relative to every other route on the same road. Remember trigonmetry? Neither did I. But, I bit the bullet and relearned it and implemented that using Perl. After a few tries it "worked" and was "good enough". Then, markers were needed to show which route is which color, so that Perl program generated the markers (using GD) and placed them on the map at the needed latitude/longitude. In the end the script outputted modified KML files and one big master KML file with everything.

I'll skip over the steps where I tried displaying these individual KML files or the master KML file as an overlay in Google Maps. It barely worked, but no one would use the site if I stuck with it. "Tile overlays" were needed instead.

So another Perl program was written to plot out the KML files into one big graphic and cut it up into individual tiles. I found out very quickly that NJ is very big and my brand new computer didn't have the memory to make a graphic large enough to cover it, even at relatively modest zoom levels. The program was rewritten to split the difference between what my computer could do while still only plot the master KML a limited amount of times. It takes quite a while to run...then I still have to FTP all of those little files out to Arizona where this server lives.

Now (May '08) I'm going back and adjusting the points so they line up more neatly, as well as expanding it to cover more regions of the Garden State. Be sure to check out the other stuff on this site!

What transit providers are shown on the map?

I'm concentrating on services run by NJ Transit and municipalities or counties at this time (Jul '08). The following are currently on the map, and more are being added as I find them:
Northern NJ map:
New Jersey Transit
City of Hoboken
Central NJ map:
New Jersey Transit
Greater Mercer Transportation Management Association (select routes)
Somerset County
Middlesex County
Southern NJ map:
New Jersey Transit
Rail services (all maps):
New Jersey Transit
Port Authority Transit Corporation (PATCO, not PATH)