-
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.fitBounds with maxZoom=undefined throws Invalid LngLat object: (NaN, NaN)
#10013
Comments
Possibly the same bug on V2.0, but different trigger situation. To the best of my knowledge, I didn't set
Here's the state of the map object at the moment of the exception:
|
…-gl-js#10013 for requesting map bounds
Similar experience. I don't think the issue is on the initial map load. but when an additional As a workaround, you can conditionally pass the property with a valid value and the error is avoided. |
We don't currently have any type-checking errors and if we decide to implement this it should be part of a larger push to change that, so I'm closing this ticket and we can move conversation to #9485 More context (referring to similar issue #4385) in #12098 (comment):
|
mapbox-gl-js version: 1.12.0
browser: All of them
Steps to Trigger Behavior
maxZoom
without realisingLink to Demonstration
https://jsfiddle.net/jxoya0cn/
Expected Behavior
Warn that an invalid value has been passed. Disregard / allow for an invalid zoom constraint.
Actual Behavior
💣
Invalid LngLat object: (NaN, NaN)
The text was updated successfully, but these errors were encountered: