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

Fix map.fitBounds() with non-zero bearing #10140

Closed
wants to merge 1 commit into from

Conversation

aparshin
Copy link

This PR fixes #10064.

In the public API, it fixes behavior of the following methods:

  • map.fitBounds()
  • map.fitScreenCoordinates()
  • map.cameraForBounds()

Changes in tests:

  • Fix tests for camera => #cameraForBounds (they were incorrect)
  • Add new test for camera => #fitBounds with non-zero bearing
  • Changed input coordinates in tests camera => #fitScreenCoordinates to make the input region not square

Launch Checklist

  • briefly describe the changes in this PR
  • write tests for all new functionality
  • manually test the debug page
  • add an entry inside this element for inclusion in the mapbox-gl-js changelog: <changelog>Fix a bug where map.fitBounds() behaves incorrectly with non-zero bearing #10064 </changelog>

Also influences on map.fitScreenCoordinates()  and map.cameraForBounds()
@CLAassistant
Copy link

CLAassistant commented Dec 8, 2020

CLA assistant check
All committers have signed the CLA.

@aparshin aparshin closed this Dec 9, 2020
@stepankuzmin
Copy link
Contributor

Hi @aparshin,

Thank you for your contribution. Would you mind telling me why you closed this PR? ​Your fix would be greatly appreciated.

@stepankuzmin stepankuzmin reopened this Oct 29, 2021
@aparshin
Copy link
Author

@stepankuzmin I don't want to contribute to this project after changing TOS in v2.0: #10162

I'm not sure how to delete a PR on Github, so, I just closed it.

@aparshin aparshin closed this Oct 29, 2021
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

Successfully merging this pull request may close these issues.

map.fitBounds() with bearing does not fit the entire bounds
3 participants