The map style names each source by its date-stripped region (both "washington.pmtiles" and "washington_2025-12.pmtiles" -> "washington"). When an old and new copy of the same region are both on disk, the style emitted two sources with the same key and duplicate layer ids, which MapLibre rejects outright -- blanking the ENTIRE map, not just that region. Old copies linger when a newer curated version installs (#634), so a user who updates maps can silently lose all map rendering until the stale file is removed by hand. generateSourcesArray() now keeps only the newest file per region: a dated build beats an undated legacy file, and between two dated builds the later YYYY-MM wins. The skipped duplicate is logged. The style stays valid even when stale files are present. Complements #981, which removes superseded curated files on install. This is the runtime safety net that also recovers installs already in the broken state (which a cleanup-on-install alone can't reach). Refs #634 |
||
|---|---|---|
| .. | ||
| controllers | ||
| exceptions | ||
| jobs | ||
| middleware | ||
| models | ||
| services | ||
| utils | ||
| validators | ||