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

bbox does not respect tile size #39

Open
samdelacruz opened this issue Jul 30, 2020 · 1 comment
Open

bbox does not respect tile size #39

samdelacruz opened this issue Jul 30, 2020 · 1 comment

Comments

@samdelacruz
Copy link

Despite initialising SphericalMercator with a different tile size, .bbox returns identical latitude and longitude coordinates for the same inputs, which suggests that tile size is not being taken into account.

Example:

const SM = require("@mapbox/sphericalmercator")
const sm1 = new SM({ size: 256 });
sm1.bbox(8298, 5450, 14);
// [ 2.3291015625, 51.467696956223364, 2.35107421875, 51.481382896100975 ]
const sm2 = new SM({ size: 512 });
sm2.bbox(8298, 5450, 14);
// [ 2.3291015625, 51.467696956223364, 2.35107421875, 51.481382896100975 ]
@samdelacruz
Copy link
Author

Unless I'm mistaken, what I think this means is that for sizes other than 256, the returned bounding box will be incorrect.

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