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

Ensure fitBounds doesn't return NaN zoom value #159

Merged
merged 1 commit into from
Dec 9, 2016

Conversation

jwarning
Copy link
Contributor

@jwarning jwarning commented Dec 7, 2016

This should fix the NaN zoom value in issue #130.

@balthazar balthazar added the bug label Dec 7, 2016
@balthazar
Copy link
Contributor

Just out of curiosity, doesn't this result in zoom values being incoherent with the current state of the map?

@jwarning
Copy link
Contributor Author

jwarning commented Dec 8, 2016

In what way would it be incoherent? The issue as far as I understand is that the function at https://github.com/mapbox/mapbox-gl-js/blob/master/js/geo/transform.js#L180 is being passed a negative scale, which when given to Math.log() will return NaN. My guess could be that this happens when dealing with negative latitude values perhaps?

@balthazar
Copy link
Contributor

balthazar commented Dec 9, 2016

Yeah I was wondering if we could track down the exact cause of this behavior.

This looks good to me, but let me add @abmai as reviewer too.

@abmai
Copy link
Contributor

abmai commented Dec 9, 2016

lgtm

@abmai abmai merged commit b4e4605 into visgl:master Dec 9, 2016
cl0ckwork pushed a commit to cl0ckwork/react-map-gl that referenced this pull request Mar 10, 2018
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 this pull request may close these issues.

3 participants