Repository navigation
fix(frontend): replace watermarked CARTO basemap with Esri Gray Canvas - #1034
Merged
Merged
Conversation
CARTO now requires an API key for basemaps.cartocdn.com. Keyless requests
still return HTTP 200, so nothing appeared broken, but the tiles come back
with an "API KEY REQUIRED" watermark burned into the PNG — the rain map has
been rendering that across the whole viewport.
A CARTO key is free (5M tiles/month, no account needed), but the request
form wants a domain and halo is LAN-only, and CARTO says the raster PNG
tier is being retired. Moving off it is the better fix.
Esri's Gray Canvas is keyless, has matching dark and light variants, and
needs no new dependencies. Two differences from CARTO worth noting:
- Canvas splits geometry and place labels into separate services, so the
base-layer effect now builds two layers. The labels get a dedicated pane
at z-index 450 — above overlayPane so the 0.6-opacity precipitation wash
doesn't smear them, below markerPane so they don't bury the home marker.
- No {s} subdomains, the tile path is {z}/{y}/{x} with y before x, and
there is no @2x tile, so detectRetina replaces the old {r} suffix.
Attribution updated to Esri, HERE, Garmin, OpenStreetMap. The FMI credit
is unchanged.
Caveat: Esri deprecated this endpoint for open-source clients in 2022 and
its terms now point at a free ArcGIS account plus a key. It serves fine
today and the swap is confined to one URL template, so replacing it later
is a small edit. OpenFreeMap (vector, explicitly no-key) and filtered OSM
standard tiles are the keyless fallbacks if it goes away.
eetu
enabled auto-merge (squash)
September 2, 2026 20:34
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
CARTO now requires an API key for
basemaps.cartocdn.com. Keyless requests still return HTTP 200, so nothing looked broken in logs, but the tiles come back with an "API KEY REQUIRED" watermark burned into the PNG. The rain map has been rendering that across the viewport.Reproduced directly:
A CARTO key is free (5M tiles/month, no CARTO account) but the request form wants a domain and halo is LAN-only. CARTO also states the raster PNG tier is being retired, so getting a key would just defer the work.
Change
Swapped the basemap to Esri Gray Canvas. Keyless, matching dark and light variants, no new dependencies. Everything is in
frontend/src/components/RainMap.tsx; nothing else in the repo referenced CARTO.Two things differ from CARTO and drive the shape of the diff:
overlayPaneso the 0.6-opacity precipitation wash doesn't smear the place names, belowmarkerPaneso it doesn't bury the home marker. The pane is created in the map lifecycle effect so it survives theme swaps.{s}subdomains, path is{z}/{y}/{x}with y before x, and there is no@2xtile.detectRetinareplaces the old{r}suffix, fetching one zoom deeper on hidpi screens so the wall panel stays sharp.Attribution updated to Esri, HERE, Garmin, OpenStreetMap. The FMI credit is unchanged.
Verification
yarn typecheck,yarn lint,yarn formatall pass.image/jpegand reference asimage/png.Not yet checked in a browser. Worth confirming the theme toggle swaps both layers cleanly and that labels stay legible over the precipitation wash.
Known tradeoff
Esri deprecated this endpoint for open-source clients in 2022, and its current terms point at a free ArcGIS account plus an API key. It serves fine today, and the swap is confined to a single URL template so replacing it later is a small edit.
Keyless fallbacks, both investigated:
tiles.openfreemap.org/styles/{positron,dark}) — the only provider with an explicit no-key, no-registration, no-limit policy. Vector, so it would costmaplibre-glplus the Leaflet bridge and needs WebGL2 on the display.