According to the docs, this payload looks something like
{
latitude: 37.88481197416011,
longitude: -122.6450788677475,
zoomLevel: 12,
direction: 0,
pitch: 0,
animated: false
}
is there an easy way to calculate a bounding box (minLat, minLng) and (maxLat, maxLng) of the newly visible region using the latitude, longitude, and zoomLevel values?
Ah, should've googled this earlier. Looks like mapbox published another package that helps with this exact thing https://github.com/mapbox/geo-viewport#boundsviewport-zoom-dimensions-tilesize
Most helpful comment
Ah, should've googled this earlier. Looks like mapbox published another package that helps with this exact thing https://github.com/mapbox/geo-viewport#boundsviewport-zoom-dimensions-tilesize