Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Permit padding in transitions #1085

Closed
harto opened this issue Apr 23, 2020 · 2 comments
Closed

Permit padding in transitions #1085

harto opened this issue Apr 23, 2020 · 2 comments

Comments

@harto
Copy link

harto commented Apr 23, 2020

Mapbox GL JS 1.9 added support for padding in camera functions flyTo, jumpTo, etc.: mapbox/mapbox-gl-js#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.

@Pessimistress
Copy link
Collaborator

This is already supported in WebMercatorViewport.fitBounds

@mayteio
Copy link

mayteio commented May 18, 2020

See #1099 (comment) for a function that returns a new viewport with padding, accounting for edge cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants