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

Map.panBy and Point.convert API #8968

Open
blq opened this issue Nov 12, 2019 · 4 comments
Open

Map.panBy and Point.convert API #8968

blq opened this issue Nov 12, 2019 · 4 comments
Labels

Comments

@blq
Copy link

blq commented Nov 12, 2019

map.panBy specifies that its first argument can be a PointLike object. Though if you pass in an {x, y} literal it fails in camera.js due to the Point.convert(offset).mult() call that assumes that the output from Point.convert is a real Point instance, which is not what Point.convert spec actually says, it will only convert Array to Point, other objects (literals) unchanged.

/Fredrik Blomqvist

@ansis ansis added the bug 🐞 label Nov 12, 2019
@mourner
Copy link
Member

mourner commented Nov 13, 2019

Looks like we want to bring this PR in to fix this: mapbox/point-geometry#12

@blq
Copy link
Author

blq commented Mar 26, 2020

Not sure worth opening another issue? But I just noticed a similar API vs implementation discrepancy for LngLatBounds.extend(obj). The API docs claims LngLatLike is handled but doesn't work.

@ryanhamley
Copy link
Contributor

ryanhamley commented Mar 26, 2020

LngLatBounds.extend(obj). The API docs claims LngLatLike is handled but doesn't work.

Hi @blq this discrepancy was fixed in #9293 and released earlier this week as part of 1.9.0

@blq
Copy link
Author

blq commented Mar 27, 2020

@ryanhamley Thanks, should've searched better! But.. I think LngLatBounds still has bugs. I'll post some examples in that thread.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants