Open almccon opened 8 years ago
Leaflet maxBounds
is set to 0.1
on either side of [37.757450, -122.406235]
.
However, Leaflet enforces maxBounds
by allowing the user to pan wherever, and then snaps/scrolls back to stay within bounds, so the actual bounds of where we’d need tiles would be some value greater than that.
Zoom bounds:
minZoom: 12,
maxZoom: 16,
Instead of loading dynamically from CARTO, we could use
tl
(tilelive) to generate an MBTiles archive of the tiles and upload them to Mapbox (or stick the tiles on S3). This would make the tiles load much faster.We'd need to figure out the zoom ranges and the bounding box.
We'd also need to refactor a bit of the Leaflet code to load these tiles from somewhere else (maybe switching from CartoDB.js to Mapbox.js to simplify the URLs and handle the API keys, etc)
We also would probably want some way to make this easy to replicate, in case the data on CARTO changes and we need to regenerate the tiles.