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

Map incorrectly jumps if maxBounds crosses the longitude 180 #10447

Closed
hanneshdc opened this issue Mar 9, 2021 · 0 comments · Fixed by #10903
Closed

Map incorrectly jumps if maxBounds crosses the longitude 180 #10447

hanneshdc opened this issue Mar 9, 2021 · 0 comments · Fixed by #10903
Assignees
Labels

Comments

@hanneshdc
Copy link

mapbox-gl-js version: Latest (v2.1.1)

browser: Safari v14.0.3, also reproducible in other browsers

Steps to Trigger Behavior

  1. Set maxBounds to [[158, -55], [190, -23]], this covers New Zealand and the Chatham Islands
  2. Zoom in to at least zoom level 5
  3. Try to pan right (to the east)

Link to Demonstration

https://jsbin.com/lakamahoni/1/edit?html,output

Expected Behavior

Map should let me pan to the east

Actual Behavior

Once going east a certain point (presumably longitude 180), the map suddenly jumps to the (opposite) western most side of the maxBounds.

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

Successfully merging a pull request may close this issue.

3 participants