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(Camera) persist zoom when changing from bounds to centerCoordinate #1614

Merged
merged 12 commits into from
Nov 3, 2021

Conversation

naftalibeder
Copy link
Collaborator

Description

Fixes #1592, which reported an issue caused by #1538. In sum:

  • If the map is configured using bounds, and that is changed to use centerCoordinate without passing in a specific zoomLevel, the map now persists the zoom level extrapolated from the previous bounds.
  • Fixed issue where passing in a new zero padding object ([0, 0, 0, 0]) was not causing the map to update, seemingly due to a bug in the iOS SDK.
  • Created a unified example showcasing bounds/centerCoordinate/zoomLevel/padding, making it easier to see how they all work and transition together.

Checklist

  • I have tested this on a device/simulator for each compatible OS
  • I formatted JS and TS files with yarn lint
  • (n/a) I updated the documentation yarn generate
  • I mentioned this change in CHANGELOG.md
  • (n/a) I updated the typings files (index.d.ts)
  • I added/ updated a sample (/example)

Video

example2.mov

Copy link
Member

@ferdicus ferdicus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me and as @schiller-manuel already verified in #1592, that his issue is resolved I'd merge this 👍🏿

Thanks 🙇🏿

CHANGELOG.md Show resolved Hide resolved
@ferdicus ferdicus merged commit a2d46c4 into rnmapbox:master Nov 3, 2021
@naftalibeder naftalibeder deleted the fix/zoom branch February 21, 2024 15:46
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.

setting center coordinate changes zoom level after PR #1538 was merged
2 participants