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

getBounds() gives incorrect result when rotating #6867

Closed
zoltan-mihalyi opened this issue Jun 26, 2018 · 0 comments
Closed

getBounds() gives incorrect result when rotating #6867

zoltan-mihalyi opened this issue Jun 26, 2018 · 0 comments

Comments

@zoltan-mihalyi
Copy link
Contributor

zoltan-mihalyi commented Jun 26, 2018

mapbox-gl-js version: 0.23.0 - 0.46.0
It worked in 0.22.0. I'm suspicous to this commit: 06c3e1f

browser: chrome

Steps to Trigger Behavior

  1. rotate the map
  2. call map.getBounds()

In example:

  1. rotate the map
  2. the rectangle is the result of getBounds() call

Link to Demonstration

https://jsfiddle.net/og5tbcLn

Expected Behavior

getBounds() should return a LngLatBounds covering the viewport.

Actual Behavior

getBounds() returns a LngLatBounds covering bottom-left and top-right points of the viewport, but excluding bottom-right and top-left.

demo without the bug, with older version: https://jsfiddle.net/kmmky7h5/

zoltan-mihalyi added a commit to realCity/mapbox-gl-js that referenced this issue Jun 27, 2018
zoltan-mihalyi added a commit to realCity/mapbox-gl-js that referenced this issue Jun 27, 2018
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

1 participant