From bd04ccc7b2af5bc2bbab5e4300b8351ed665ee20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Mummert?= Date: Sat, 22 Aug 2026 21:20:00 +0200 Subject: [PATCH] Stop registering the MapLibre 5 UMD build on event detail pages The event detail page was the last place still loading MapLibre 5. Its theme template now imports maplibre-gl.mjs as an ES module, so the listener no longer needs to register the UMD bundle. pmtiles stays a classic script: it only has to provide an IIFE global for addProtocol. The stylesheet registration is unchanged. Co-Authored-By: Claude Opus 5 --- src/EventListener/EventFullTemplateDataListener.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/EventListener/EventFullTemplateDataListener.php b/src/EventListener/EventFullTemplateDataListener.php index 6abe254..c44fcd6 100644 --- a/src/EventListener/EventFullTemplateDataListener.php +++ b/src/EventListener/EventFullTemplateDataListener.php @@ -228,8 +228,10 @@ class EventFullTemplateDataListener $GLOBALS['TL_JAVASCRIPT'] ??= []; $GLOBALS['TL_CSS'] ??= []; + // MapLibre wird vom Theme-Template als ESM importiert (maplibre-gl.mjs zieht + // -shared.mjs und -worker.mjs selbst nach). pmtiles bleibt klassisch, weil es + // nur ein IIFE-Global fuer addProtocol bereitstellen muss. $jsAssets = [ - 'https://maps.mummert.media/libraries/maplibre-gl.js', 'https://maps.mummert.media/libraries/pmtiles.js', ];