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

Sanitize flyto's zoom parameter to clamp between map's minzoom and maxzoom #4726

Merged
merged 2 commits into from
May 22, 2017

Conversation

IvanSanchez
Copy link
Contributor

Blind-ish attempt to fix #4724

Copy link
Contributor

@jfirebaugh jfirebaugh left a comment

Choose a reason for hiding this comment

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

Can you add some tests for this please?

@IvanSanchez
Copy link
Contributor Author

Unit tests added. Without the fix, the new tests fail like so:

  Error: should be equal to within 1e-10
  + expected - actual

  -201326412.0000001
  +12

Please note that this depends on #4731 for the tests to actually be useful

@jfirebaugh
Copy link
Contributor

Thank you!

@jfirebaugh jfirebaugh merged commit 92fafd0 into mapbox:master May 22, 2017
@IvanSanchez IvanSanchez deleted the flyto-maxzoom-clamp branch May 22, 2017 16:44
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.flyTo() allows zooming past maxZoom
2 participants