BlinkTagInc / gtfs-to-html

Build human readable transit timetables as HTML or PDF from GTFS.

Home Page:https://gtfstohtml.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ability to use mainview of all routes only and then link to route_url when clicking?

wkulesza opened this issue · comments

Is it possible to use index.html page for overall view of all routes on map (route listing, hover effect over routes to see them on the map), but when clicking, point to route_url taken from the GTFS routes.txt file ?

Yes - you can make your own custom template: https://gtfstohtml.com/docs/custom-templates After copying the default template, update overview.pug to use the route_url. You should be able to get the route_url for all routes used by a timetable in a timetablePage

Each timetablePage is an object with a key timetables that is an array of timetables.

Each timetable is an object with a key routes that is an array of routes.

For most timetablepages, only one route is used so:

timetablePage.timetables[0].routes[0].route_url should be the way to get at what you are looking for.