refactor(map): extract MAP_STYLE into a shared map-style.js module

Single source of truth for the MapLibre style URL, shared between
maplibre-utils.js (multi-marker/GPX maps) and the new location-map.js
preview module — no behavior change.
This commit is contained in:
2026-07-24 19:38:10 +02:00
parent a00690fbde
commit 52e9fbadf2
3 changed files with 13 additions and 8 deletions
File diff suppressed because one or more lines are too long
+2 -1
View File
@@ -1,8 +1,9 @@
/* Shared MapLibre GL utilities — loaded by map.html.twig, dailies.html.twig, home.html.twig */
import { MAP_STYLE } from './src/map-style.js';
(function (global) {
var ACCENT = '#2A8C73';
var ACCENT_DIM = '#155244';
var MAP_STYLE = 'https://basemaps.cartocdn.com/gl/dark-matter-gl-style/style.json';
/* Build a GeoJSON LineString feature */
function lineFeature(coords) {
+4
View File
@@ -0,0 +1,4 @@
// Shared MapLibre style URL — single source of truth for maplibre-utils.js
// (multi-marker/GPX maps) and location-map.js (post-form pin preview), so the
// two never drift apart (KTD1).
export const MAP_STYLE = 'https://basemaps.cartocdn.com/gl/dark-matter-gl-style/style.json';