Hola,
No sé si soy yo quien me pierdo con una nueva configuración que definir, pero los mapas ya no se muestran:
¿Me he perdido alguna información de configuración que modificar?
Gracias
¡Yo también me hice la misma reflexión!
¡Tengo el mismo problema!
mutmut
27 Agosto, 2026 21:20
4
Lo vi en el sitio de demostración, pero no me fijé en mi instancia de producción.
Hola @Sescandell , gracias por la respuesta, no tiene mucha relación con el lanzamiento de la v5, solo coincidió en el tiempo, CartoDB ya no permite usar sus mapas sin una clave de API
Solo vamos a cambiar de mapas entonces:
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.
El resultado sigue siendo muy similar:
Ya está fusionado y se desplegará hoy en producción