React-map-gl: Permit `padding` in transitions

Created on 24 Apr 2020  路  2Comments  路  Source: visgl/react-map-gl

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.

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.

All 2 comments

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Majaspic picture Majaspic  路  4Comments

ckalas picture ckalas  路  5Comments

huaying picture huaying  路  5Comments

joseomar10 picture joseomar10  路  5Comments

nip10 picture nip10  路  4Comments