Files
Jürgen MummertandClaude Opus 5 3ee0afa60e Load MapLibre 6 as ESM in the map module
MapLibre GL JS 6 ships ESM only; the UMD bundle and the global
maplibregl no longer exist. Load maplibre-gl.mjs via dynamic import
into a module-scoped binding instead, keeping the UMD build as a
fallback so a server-side rollback needs no code change.

styleimagemissing is notify-only in v6, so the transparent 1x1
placeholder is now supplied through setMissingStyleImageResolver,
falling back to the event on v5.

Also drop the setFog block: MapLibre has never implemented setFog,
so the typeof guard never passed.

Verified against MapLibre 6.5.0 and pmtiles 4.5.0 in the browser:
map init, protomaps vector tiles, globe projection, organisation
markers, event clustering, spiderfy including leaf popups, and the
satellite style switch all work without console errors.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-22 20:18:25 +02:00
..
2026-02-17 18:53:39 +01:00