This repository has been archived by the owner on Aug 8, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The Linux build failures are all #3163. |
Awesome @1ec5! To get this into the |
Per chat, I’m going to check this into master and cherry-pick into release-android-v2.4.0 to avoid holding up iOS / OS X development while the Android release bakes. |
Rewrote the flyTo implementation to more closely match GL JS’s implementation and the paper on which it is based. Rewrote CameraOptions documentation. Only document units for generic types like double. The semantics of LatLng and Duration are already baked into the types; one just needs to look up the types’ definitions. Also, the […) is set notation, so the braces are supposed to be mismatched. Fixes #3296.
The speed and curve fields in CameraOptions have been replaced with velocity and minZoom fields, which expressed in screen units. Scaling and easing make it difficult to derive options that are expressed in physical units.
For consistency with -setCamera:…, a duration of 0 jumps instantaneously to the new location, while a negative value uses the distance-dependent default. Due to the produced curve and applied easing, flyTo() doesn’t model a parabola or ballistic trajectory, but it does simulate powered flight to some extent.
1ec5
force-pushed
the
1ec5-optimal-flight-3296
branch
from
December 20, 2015 04:34
dd219ca
to
2cb70ea
Compare
Cherry-picked into release-android-v2.4.0 as 925687a...70ae0cc. |
@1ec5 I just tested this off the release branch and it looks great! Thanks much! |
This was referenced Dec 21, 2015
Merged
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a followup to #3301 that further refines the flight path used by
Transform::flyTo()
to match GL JS exactly, even as the pitch varies between the endpoints. It fixes #3296 and ensures that the ending zoom level is respected regardless of the starting zoom level. Finally, I began documenting and renaming variables to reflect a better understanding of this algorithm, now that this paper has been rediscovered.Other noteworthy changes:
TransformState
, which will allow us to begin factoring redundant code out ofTransform
.speed
andcurve
options with more intuitive options that are expressed in screen units./cc @bleege @zugaldia @mourner @lucaswoj