← all branches

feat/atlas-intl

needs attention
c1177db · incrementalpre-PRreviewed 2026-07-27 18:30 UTC0H · 0M · 3L · 2I
The branch
Purpose
Enhance the public Atlas SEN map with satellite imagery toggle for spatial orientation
Goal
Add a Mapa/Satélite basemap switcher using Esri World Imagery + CARTO label hybrid
Sub-goals
  • SG-1: International interconnections layer (MX↔US/Guatemala/Belize) — prior commit
  • SG-2: Satellite basemap toggle (this commit) — setupBasemap/setBasemap, Esri World Imagery raster source + hybrid labels
The changes (whole branch)
What
Incremental: commit c1177db4 adds satellite basemap toggle — Esri World Imagery raster source + sat-scrim background layer (correct order: below CARTO symbol layers, above sat tiles), button wiring via setupBasemap()/setBasemap(), basemap_changed PostHog event, and Esri attribution in legend.
Why
Public-facing product differentiator — satellite hybrid view helps users orient grid infrastructure spatially on the open-source atlas.
Areas
apps/web/public/atlas/index.html+231
Blast
1 file, +23/−1 lines — self-contained static HTML, no build step, no backend impact.
esri-tos-unconfirmed pre-pr-branch static-html-only
CI· No PR open — pre-PR branchCodeRabbit· No .coderabbit.yaml

Findings · 5

correctness1

low

setupBasemap() has no re-entrant guard — double-call throws 'source already exists'

apps/web/public/atlas/index.html:235

Not triggered in practice (map.on('load') fires once), but a guard prevents breakage if style ever reloads. Fix: add 'if (_baseFill.length) return;' at the top of setupBasemap().

security1

low

Esri World Imagery tiles used without API key — potential ToS violation in production

apps/web/public/atlas/index.html:233

server.arcgisonline.com is publicly accessible but Esri ToS require an ArcGIS account for production use. Attribution is correctly included. Needs a product/legal decision before broadly promoting this feature.

conventions1

low

Esri attribution string omits 'and the GIS User Community'

apps/web/public/atlas/index.html:232

Esri's required attribution is 'Esri, Maxar, Earthstar Geographics, and the GIS User Community'. Both the map source attribution and the legend <li> should use the full string.

improvement1

info

Basemap preference not persisted to localStorage — resets on reload

apps/web/public/atlas/index.html:238

One-liner: localStorage.setItem/getItem('atlas_basemap') in setBasemap/setupBasemap.

seo1

info

Attribution not linked — Esri guidelines recommend a hyperlink to esri.com

apps/web/public/atlas/index.html:142

Minor: the map's built-in attribution control renders it as a link; the legend <li> is plain text.

History · 3 commits

  1. c1177dbneeds attentionincremental0H · 0M · 3L2026-07-27 18:30current
  2. 164beb7needs attentionfull2H · 4M · 8L2026-07-22 19:04
  3. 0480e20safefull0H · 1M · 5L2026-07-22 18:49