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 #6828 break the flyTo end position in some cases #7222

Closed
benoitbzl opened this issue Aug 30, 2018 · 3 comments
Closed

Fix #6828 break the flyTo end position in some cases #7222

benoitbzl opened this issue Aug 30, 2018 · 3 comments
Labels

Comments

@benoitbzl
Copy link
Contributor

benoitbzl commented Aug 30, 2018

mapbox-gl-js version: 0.48

browser: Chrome

Steps to Trigger Behavior

At the end of animation, when final scale does not produce the correct zoom value, the zoom value is forced to the desired one (purpose of the fix #6828). But the scale value is not modified accordingly, so that the center computation goes wrong at

const newCenter = tr.unproject(from.add(delta.mult(u(s))).mult(scale));

The scale value does not match the one of the transform object, so the unproject() function produces wrong values.

@mourner
Copy link
Member

mourner commented Aug 30, 2018

Would you be open to submitting a PR for this?

@benoitbzl
Copy link
Contributor Author

I am not sure yet how to compute the scale value based on the zoom value, but I will give it a try this afternoon.

@benoitbzl
Copy link
Contributor Author

I submitted PR #7223.

mourner pushed a commit that referenced this issue Sep 4, 2018
…7223)

* Fix flyTo when final zoom is not requested one (#7222)

This complete the fix for #6828 when the final zoom value is
different from the zoom requested.

* Fix final center position and add test case.
@mourner mourner closed this as completed Sep 5, 2018
pirxpilot pushed a commit to pirxpilot/mapbox-gl-js that referenced this issue Jun 15, 2019
…7222) (mapbox#7223)

* Fix flyTo when final zoom is not requested one (mapbox#7222)

This complete the fix for mapbox#6828 when the final zoom value is
different from the zoom requested.

* Fix final center position and add test case.
pirxpilot pushed a commit to pirxpilot/mapbox-gl-js that referenced this issue Jun 16, 2019
…7222) (mapbox#7223)

* Fix flyTo when final zoom is not requested one (mapbox#7222)

This complete the fix for mapbox#6828 when the final zoom value is
different from the zoom requested.

* Fix final center position and add test case.
pirxpilot pushed a commit to pirxpilot/mapbox-gl-js that referenced this issue Jun 18, 2019
…7222) (mapbox#7223)

* Fix flyTo when final zoom is not requested one (mapbox#7222)

This complete the fix for mapbox#6828 when the final zoom value is
different from the zoom requested.

* Fix final center position and add test case.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants