gtfs-to-html 2.9.2 → 2.9.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gtfs-to-html",
3
- "version": "2.9.2",
3
+ "version": "2.9.3",
4
4
  "private": false,
5
5
  "description": "Build human readable transit timetables as HTML, PDF or CSV from GTFS",
6
6
  "keywords": [
@@ -59,6 +59,7 @@ include formatting_functions.pug
59
59
  if config.showCalendarExceptions && timetable.calendarDates.excludedDates.length
60
60
  .excluded-dates= `${config.serviceNotProvidedOnText}: ${timetable.calendarDates.excludedDates.join(', ')}`
61
61
 
62
- script.
63
- const { geojsons, tripIds, routes, stops, gtfsRealtimeUrls } = !{JSON.stringify(prepareMapData(timetablePage, config))};
64
- createMaps();
62
+ if config.showMap
63
+ script.
64
+ const { geojsons, tripIds, routes, stops, gtfsRealtimeUrls } = !{JSON.stringify(prepareMapData(timetablePage, config))};
65
+ createMaps();
@@ -9,6 +9,8 @@ block extraHeader
9
9
  script(src=`${config.assetPath}js/timetable-menu.js`)
10
10
 
11
11
  if config.showMap
12
+ link(href="https://api.mapbox.com/mapbox-gl-js/v3.6.0/mapbox-gl.css" rel="stylesheet")
13
+
12
14
  if config.hasGtfsRealtime
13
15
  script(src=`${config.assetPath}js/pbf.js`)
14
16
  script(src=`${config.assetPath}js/gtfs-realtime.browser.proto.js`)
@@ -17,8 +19,6 @@ block extraHeader
17
19
  mapboxgl.accessToken = '#{config.mapboxAccessToken}';
18
20
  script(src=`${config.assetPath}js/timetable-map.js`)
19
21
 
20
- link(href="https://api.mapbox.com/mapbox-gl-js/v3.6.0/mapbox-gl.css" rel="stylesheet")
21
-
22
22
  link(rel="stylesheet" href=`${config.assetPath}css/timetable_styles.css`)
23
23
  if config.outputFormat === 'pdf'
24
24
  link(rel="stylesheet" href=`${config.assetPath}css/timetable_pdf_styles.css`)