-
Notifications
You must be signed in to change notification settings - Fork 40
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
Zoom is NaN when using rectangular bounds #21
Comments
I'm getting the same error. |
use Math.abs calculate width and height |
Make sure you're following the correct order for " Solved mine simply using: Math.min(start.longitude, end.longitude),
Math.min(start.latitude, end.latitude),
Math.max(start.longitude, end.longitude),
Math.max(start.latitude, end.latitude) |
Had the issue that the bounds crossed the internation date line (Russia, New Zealand, Fiji, Kiribati) Solved by moving maxLong to the right
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When calling
geoViewport.viewport([33.841629, -118.91905, 34.27888, -117.954399], [384, 318]);
, I get the following results:It seems to work fine when using a fixed value (
[34.16811, -118.231895, 34.16811, -118.231895]
), so I'm guessing I must be doing something wrong with the data I'm passing in.Any ideas?
The text was updated successfully, but these errors were encountered: