gtfs-to-html 2.9.14 → 2.10.0

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.
@@ -21,7 +21,6 @@ include formatting_functions.pug
21
21
 
22
22
  //- Use !{variable} format to inject values from pug to client side js
23
23
  script.
24
- (function() {
25
- const geojson = !{JSON.stringify(geojson) || '\'\''};
26
- createSystemMap('system_map', geojson);
27
- })();
24
+ const geojson = !{JSON.stringify(geojson) || '\'\''};
25
+ const mapStyleUrl = '#{config.mapStyleUrl}';
26
+ createSystemMap();
@@ -6,11 +6,11 @@ block extraHeader
6
6
  if config.showMap
7
7
  script(src="https://unpkg.com/jquery@3.7.1/dist/jquery.min.js" crossorigin="anonymous")
8
8
  script(src="https://unpkg.com/lodash@4.17.21/lodash.min.js" crossorigin="anonymous")
9
- script(src="https://api.mapbox.com/mapbox-gl-js/v3.6.0/mapbox-gl.js")
10
- script.
11
- mapboxgl.accessToken = '#{config.mapboxAccessToken}';
9
+ script(src="https://unpkg.com/maplibre-gl@^4.7.1/dist/maplibre-gl.js")
10
+ script(src="https://unpkg.com/@maplibre/maplibre-gl-geocoder@1.5.0/dist/maplibre-gl-geocoder.min.js")
12
11
  script(src=`${config.assetPath}js/system-map.js`)
13
12
 
14
- link(href="https://api.mapbox.com/mapbox-gl-js/v3.6.0/mapbox-gl.css" rel="stylesheet")
13
+ link(href="https://unpkg.com/maplibre-gl@^4.7.1/dist/maplibre-gl.css" rel="stylesheet")
14
+ link(href="https://unpkg.com/@maplibre/maplibre-gl-geocoder@1.5.0/dist/maplibre-gl-geocoder.css" rel="stylesheet")
15
15
 
16
16
  link(rel="stylesheet" href=`${config.assetPath}css/overview_styles.css`)
@@ -68,5 +68,5 @@ include formatting_functions.pug
68
68
 
69
69
  if config.showMap
70
70
  script.
71
- const { routeData, stopData, pageData: { routeIds, tripIds, stopIds, geojsons, gtfsRealtimeUrls } } = !{JSON.stringify(prepareMapData(timetablePage, config))};
71
+ const { gtfsRealtimeUrls, mapStyleUrl, routeData, stopData, pageData: { routeIds, tripIds, stopIds, geojsons } } = !{JSON.stringify(prepareMapData(timetablePage, config))};
72
72
  createMaps();
@@ -13,10 +13,8 @@ block extraHeader
13
13
  script(src=`${config.assetPath}js/gtfs-realtime.browser.proto.js`)
14
14
 
15
15
  if config.showMap
16
- link(href="https://api.mapbox.com/mapbox-gl-js/v3.6.0/mapbox-gl.css" rel="stylesheet")
17
- script(src="https://api.mapbox.com/mapbox-gl-js/v3.6.0/mapbox-gl.js")
18
- script.
19
- mapboxgl.accessToken = '#{config.mapboxAccessToken}';
16
+ link(href="https://unpkg.com/maplibre-gl@^4.7.1/dist/maplibre-gl.css" rel="stylesheet")
17
+ script(src="https://unpkg.com/maplibre-gl@^4.7.1/dist/maplibre-gl.js")
20
18
  script(src=`${config.assetPath}js/timetable-map.js`)
21
19
 
22
20
  if config.hasGtfsRealtimeAlerts