Repository navigation
Switch CARTO basemaps from raster to vector - #284
Merged
Merged
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
t-kramer
force-pushed
the
carto-raster-to-vector
branch
from
October 26, 2026 19:20
774a838 to
682484b
Compare
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.
We're on pace for ~6.4M CARTO tile requests a month, above the 5M free allowance. CARTO has given us 10M temporarily, until 18 Nov 2026, and offered 20M a month if we move to vector basemaps and show the CARTO logo linked to carto.com. Vector maps also need well under half the requests of raster for the same map.
What changed
/basemap/positron.jsonserves CARTO's Positron vector style with our API key added to every tile, sprite and glyph URL. CARTO requires the key on all of these, but the published style doesn't include it. The key is still read only fromAppConfig.CARTO_API_KEY(Secret Manager → Cloud Run), and the style is cached for 1 day.TileLayeris replaced by a MapLibre vector layer inside Leaflet (assets/carto_basemap.js, which loads MapLibre only on this page). The map now hasminZoom=2andmaxBounds, so we stop loading tiles for repeated world copies.scatter_mapbox→scatter_map(MapLibre), pointing at the same style. This needs plotly 5.18.0 → 5.24.1; the lockfile change touches only that package.carto_logo_badge()inpages/lib/utils.py). The OSM/CARTO attribution is unchanged.tests/test_basemap.py), andpytest.inisopagescan be imported when running fromtests/.