diff --git a/themes/intotheeast/templates/trip.html.twig b/themes/intotheeast/templates/trip.html.twig index 1c3ccc5..b8013a0 100644 --- a/themes/intotheeast/templates/trip.html.twig +++ b/themes/intotheeast/templates/trip.html.twig @@ -253,6 +253,8 @@ var GPX_URLS = {{ gpx_urls|json_encode|raw }}; var USE_GPX = {{ page.header.use_gpx ?? true ? 'true' : 'false' }}; var AUTOCONNECT = "{{ page.header.autoconnect ?? 'on' }}"; +document.addEventListener('DOMContentLoaded', function() { + var tripMap = new maplibregl.Map({ container: 'trip-map', style: MapUtils.MAP_STYLE, @@ -376,6 +378,7 @@ var HAS_GPX = {{ has_gpx ? 'true' : 'false' }}; })(); +}); // DOMContentLoaded