I'm working on a Python project that builds large hi-res images using tiles retrieved from the Mapbox static images API using customized styles designed in Mapbox studio. https://docs.mapbox.com/api/maps/static-images/ (updated with correct link)
At the moment I have a proof of concept that works well at z15.5 but it won't work at other zoom levels without a good bit of work. I'm thinking there's a better/proper/elegant way to handle tile positioning.
Any suggestions on how to calculate the lat/lon for a second tile that aligns seamlessly with the first one? Longitude is easy enough, since the difference in distance between tiles stays the same every time. It's latitude that has the fun factor, since it changes for each tile.
I've tried using QGIS to export a large image but it didn't perform very well and pummeled the API usage.
bbox
option when retrieving static image, then that shouldn't be a problem.