-
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
getBounds() is returning Invalid LngLat object when terrain is enabled and map is at high zooms or large tilt. #10610
Comments
I'm also experiencing this bug, but also on desktop Chrome. Seems to only happen when all 3 of the following are true simultaneously:
|
@jaybo Can you provide a minimum example that demonstrates the bug? My attempt hasn't been able to reproduce it for me. |
Closing since we still don't have a reproducible example, and this may be fixed by #10909. @KleggerKoder @jaybo feel free to reopen if the issue can be reproduced in v2.5. |
I believe I hit this today. It happens when:
It happens when I am zoomed in on a location, maybe level 16+, then I call
It's not deterministic. Using the same starting point and calling Maybe something to do with caching or slow downloading DEM data as I notice the tiles don't load when this exception is thrown. Potential suspectIf |
@ted-piotrowski Thank you for looking into this! Your potential suspect seems promising to me. Are you able to create a reproduction of this bug? I'm still not seeing it though I've modified my attempted reproduction to match your instructions. Could you also please share what browser and OS you're seeing this on? Many thanks! EDIT: Reproduction is now working, I'm looking into this. |
@ted-piotrowski Your intuition was spot-on! Just opened a PR to fix this, thanks for the help! 🙇 |
@SnailBones thanks for this. I couldn't get a reproducible example going for you, but I will def verify this on my project once the new release is out. |
I just built and updated my mapbox-gl-js dependency to include this commit and no more invalid bounds errors. Fix looks good. Thanks @SnailBones . |
Glad that this is working! Thanks for looking into this and confirming @ted-piotrowski. |
I can only seem to replicate this on Mobile devices.
If I disable terrain mode getBounds() returns correctly.
mapbox-gl-js/src/geo/transform.js
Line 1009 in 798d073
The text was updated successfully, but these errors were encountered: