Mapbox GL JS 1.9 added support for padding in camera functions flyTo, jumpTo, etc.: https://github.com/mapbox/mapbox-gl-js/pull/8638.
It would be great if a similar option was made available through this library. Our use case is that we need to adjust the target viewport based on the width of a sidebar.
This is already supported in WebMercatorViewport.fitBounds
See https://github.com/visgl/react-map-gl/issues/1099#issuecomment-629953112 for a function that returns a new viewport with padding, accounting for edge cases.
Most helpful comment
See https://github.com/visgl/react-map-gl/issues/1099#issuecomment-629953112 for a function that returns a new viewport with padding, accounting for edge cases.