Skip to content

Fix CARTO API-key watermark on date thumbnail maps - #125

Merged
janhelcl merged 8 commits into
mainfrom
fix/carto-thumbnail-api-key
Sep 16, 2026
Merged

janhelcl merged 8 commits into
mainfrom
fix/carto-thumbnail-api-key

Conversation

@janhelcl

Copy link
Copy Markdown
Owner

Summary

  • use CARTO's keyed raster endpoint for lightweight date-thumbnail maps
  • fall back to the existing OpenStreetMap tile layer when no CARTO key is configured
  • show shared OpenStreetMap/CARTO attribution beneath the thumbnail strip
  • expose VITE_CARTO_API_KEY / REACT_APP_CARTO_API_KEY through the Vite build
  • document local and production configuration and add unit coverage

Why

CARTO began requiring API keys for raster basemaps in August 2026. The main map was unaffected because it uses OpenStreetMap/OpenTopoMap, while the date thumbnails still used an unauthenticated CARTO URL.

Verification

  • npm test: 16 files, 42 tests passed
  • npm run build: client and SSR builds passed
  • client build with a fake VITE_CARTO_API_KEY confirmed the value reaches the bundle
  • git diff --check: passed

Deployment

The fallback removes the watermark without configuration. To retain the lighter CARTO thumbnail style, add a domain-restricted VITE_CARTO_API_KEY to the frontend build environment.

@janhelcl
janhelcl merged commit 65e7b7b into main Sep 16, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant