-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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.getBounds does not account for horizon visibility and low zoom #10261
Comments
This is not the same issue, but is maybe closely related enough that it would make sense to investigate at the same time: #10447 |
The above jsdfiddle is pinned to 2.0.1, but I'm not able to reproduce the specified behavior. I see:
which, though not clipped to [-90, 90] x [-180, 180], is not invalid. If I zoom out all the way, I get:
I expected "invalid" to mean NaN values, but I just see numbers which reflect the wrapping going on. IMO this might be the preferred behavior since it's easy enough to mod 360 (or more precisely, |
@arindam1993, do you by chance recall any additional context regarding this behavior? Was it returning NaN? Perhaps the window aspect ratio affects the result? |
I think we really have two separate issues here. One is the unbounded longitude values, which as you mention might not be a serious problem. What's unexpected about those values in this particular case (with high pitch) is that the values don't seem intuitively in line with he horizon. Longitude values from -140 to 1053 (wrapping the Earth ~3 times) are strange when the map appears to display just North America and a few pixels of Africa. I'd expect 180 degrees of longitude spread and we're seeing almost 7 times that. Another related issue is #10610, though this one seems to be about actual failing values like |
mapbox-gl-js version: 2.0.1, 2.0.0
browser: All
Steps to Trigger Behavior
Link to Demonstration
https://jsfiddle.net/c3hyfme0/2/
The text was updated successfully, but these errors were encountered: