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

flyTo refuses to cross antimeridian #1853

Closed
1ec5 opened this issue Dec 18, 2015 · 1 comment · Fixed by #1857
Closed

flyTo refuses to cross antimeridian #1853

1ec5 opened this issue Dec 18, 2015 · 1 comment · Fixed by #1857
Assignees
Labels

Comments

@1ec5
Copy link
Contributor

1ec5 commented Dec 18, 2015

flyTo() optimizes for frequent flier miles, traversing the entire world instead of simply crossing the antemeridian when the endpoints straddle the antemeridian. For example, alternate between the following lines, which are on either end of Fiji:

map.flyTo({center: [178.4730, -18.1014], zoom: 4, bearing: Math.random() * 60, pitch: Math.random() * 360})
map.flyTo({center: [-178.8177, -18.1979], zoom: 4, bearing: Math.random() * 60, pitch: Math.random() * 360})

/cc @lucaswoj @mourner

@1ec5 1ec5 added the bug 🐞 label Dec 18, 2015
@mourner
Copy link
Member

mourner commented Dec 19, 2015

👍 currently the logic is to stay on the center world copy, but we could modify it so that we fly to the closest longitude considering world wrap.

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

Successfully merging a pull request may close this issue.

2 participants