Hallo,
Ich weiß nicht, ob ich bei einer neuen Konfiguration, die ich definieren muss, etwas übersehe, aber die Karten werden nicht mehr angezeigt:
Habe ich eine Info zur Konfiguration übersehen, die ich ändern muss?
Danke
Ich hatte genau denselben Gedanken!
Ich habe das gleiche Problem!
mutmut
27. August 2026 um 21:20
4
Ich habe es auf der Demo-Website gesehen, aber nicht auf meiner Produktionsinstanz beachtet.
Hallo @Sescandell , danke für die Rückmeldung, das hat nicht viel mit dem Release von v5 zu tun, es ist einfach zeitgleich passiert, CartoDB erlaubt es nicht mehr, Karten ohne API-Schlüssel zu nutzen
Wir werden einfach die Karten wechseln:
master ← claude/gladys-cartodb-alternative-2mtbp7
ouvert 08:14AM - 28 Aug 26 UTC
### Description
CARTO now watermarks its free raster basemaps with **"API KEY R… EQUIRED"**, which breaks every map in Gladys (maps view, area creation/edit, house location in settings, and the signup house step).
This PR switches the basemap to **[OpenFreeMap](https://openfreemap.org)**, which hosts the exact same open styles CARTO used to serve (Positron for light mode, Dark Matter for dark mode) with:
- **no API key and no registration** — well suited to a fleet of self-hosted instances,
- **public self-hosting instructions** for the full tile stack, should we ever want to host the tiles ourselves,
- the same clean light/dark design as before.
How it works:
- OpenFreeMap serves **vector tiles**, rendered by MapLibre GL **inside the existing Leaflet maps** via the official `@maplibre/maplibre-gl-leaflet` plugin — all markers, circles, tooltips and click handlers are untouched, and `.leaflet-container` (used by Cypress) is unchanged.
- The tile-layer setup is factored into a shared `front/src/utils/mapTileLayer.js` used by the 4 previous CARTO call sites.
- `maplibre-gl` is **loaded on demand** (dynamic import), so the main bundle keeps its previous size (4,870 kB before/after); MapLibre lives in a separate 252 kB gzip chunk fetched only when a map is displayed.
- MapLibre's **web worker is bundled explicitly** (`?worker&url` + `setWorkerUrl()`): MapLibre resolves the worker relative to `import.meta.url`, which points nowhere after Vite bundling, so without this the worker 404s silently and no tile is ever requested.
- The map's **max zoom is bounded synchronously** before the async layer lands: without a zoom-bounded layer, a `fitBounds` on a single point resolved `getMaxZoom()` to Infinity and permanently corrupted the map state (NaN center/zoom) — this reliably broke the maps view in dev.
- **WebGL2 is required** (MapLibre GL v6 dropped WebGL1). Without it, or if the MapLibre chunk fails to load, no tile layer is added: the map keeps a neutral background and markers/areas/interactions still work. There is deliberately no raster fallback — no key-free provider's usage policy allows being the default endpoint of a distributed app.
- In dark mode, the page-level invert filter is compensated by a targeted double-invert on `.maplibregl-canvas` (like the existing `img`/`video`/`iframe` rule), so the real Dark Matter style shows.
- Maps view UX: every zone now has a **fixed screen-size handle** (small circle in the zone's color, in a pane above the markers) carrying the name tooltip and the click to the edit page — a small zone (e.g. 20m radius) used to be sub-pixel when zoomed out: it could pull the initial framing while being impossible to see, click, or delete.
Rendering verified end-to-end on a production demo build (headless Chromium): Positron in light mode, Dark Matter in dark mode, with zones, user avatars and tooltips working over the GL layer, and zone handles clickable at world zoom.
### Checklist
- [x] Tests pass: no server change; front production build passes (`vite build`) and was verified end-to-end in both themes; Leaflet interactions (markers, circles, click on `.leaflet-container`) unchanged for Cypress
- [x] Linter and prettier pass on both front and server (`npm run eslint`, `npm run prettier`) — only pre-existing inline-style warnings remain
- [x] No undocumented breaking change
## Summary by CodeRabbit
- **New Features**
- Updated maps with OpenFreeMap vector basemaps in light and dark themes.
- Added improved MapLibre GL rendering when WebGL2 is supported.
- Added dark-mode styling for clearer, more consistent map visuals.
- Map areas remain visible and clickable at all zoom levels.
- **Bug Fixes**
- Improved map attribution and tile-loading behavior across map views.
- Maps now display a neutral background when advanced rendering is unavailable.
- Map zoom limits are applied consistently during loading.
Das Ergebnis bleibt sehr ähnlich:
Es ist gemerged und wird heute in Produktion gehen