Skip to content

Support CARTO basemaps API key to remove tile watermark - #23

Closed
jackowayed wants to merge 1 commit into
phulin:mainfrom
jackowayed:carto-maps-api-key
Closed

jackowayed wants to merge 1 commit into
phulin:mainfrom
jackowayed:carto-maps-api-key

Conversation

@jackowayed

Copy link
Copy Markdown
Contributor

CARTO now requires an API key on basemap tile requests and watermarks unauthenticated tiles with "API key required".

Read VITE_CARTO_API_KEY at build time and append it as ?key= to the light/dark raster tile URLs in src/map.ts. When unset, URLs are unchanged so maps keep working (albeit watermarked).

Get a free key at https://carto.com/basemaps/apikey/ and build with VITE_CARTO_API_KEY=xxx yarn build.

CARTO now requires an API key on basemap tile requests and watermarks unauthenticated tiles with "API key required".

Read VITE_CARTO_API_KEY at build time and append it as ?key= to the light/dark raster tile URLs in src/map.ts. When unset, URLs are unchanged so maps keep working (albeit watermarked). Document the new var in .env.example.

Get a free key at https://carto.com/basemaps/apikey/ and build with VITE_CARTO_API_KEY=xxx yarn build.
@jackowayed

Copy link
Copy Markdown
Contributor Author

@phulin This key will ultimately be sent to the client anyway, so we could check it in. They allow limiting domains on which it works--not sure how to manage local dev.

I have not minted a key since I figure you might want to own it.

@jackowayed

Copy link
Copy Markdown
Contributor Author

(personally I've never run oy. I just yolo it)

@phulin

phulin commented Oct 10, 2026

Copy link
Copy Markdown
Owner

resolved in 6a7db98 - thank you!

@phulin phulin closed this Oct 10, 2026
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.

2 participants