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

[LngLat] calling toBounds without radius param throws an error #7722

Closed
cherniavskii opened this issue Dec 20, 2018 · 0 comments
Closed

[LngLat] calling toBounds without radius param throws an error #7722

cherniavskii opened this issue Dec 20, 2018 · 0 comments

Comments

@cherniavskii
Copy link
Contributor

mapbox-gl-js version: 0.52.0

browser: Any

Steps to Trigger Behavior

  1. Create a LngLat instance
  2. Call it's toBounds method without params

Link to Demonstration

https://jsfiddle.net/Lzuj0t8f/

Expected Behavior

No errors, bounds object containing the point.

Actual Behavior

Uncaught Error: Invalid LngLat object: (NaN, NaN)

Suggested solution

My suggestion is to set radius default value to 0.
I'll submit a PR :)

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

No branches or pull requests

1 participant