Repository navigation
POC nav mode - #220
Closed
tobrun wants to merge 1 commit into
Closed
POC nav mode#220tobrun wants to merge 1 commit into
tobrun wants to merge 1 commit into
Conversation
Contributor
|
Awesome! 😍 |
|
awesome ! looking forward to the snapshot version |
|
Woohoo, let’s go with the merge 😋 |
Member
Author
|
fwiw this was a proof of concept, we are looking implementing this functionality in a different manner. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 PR contains a small POC of a third person navigation mode, in this mode we have a fixed ImageView over the map and animate the map underneath.
This PR tries to showcase:
using a focal point with
MapboxMap#getUiSettings()#setFocalPoint(PointF). As a result all gesture interactions will occur around this point instead of the focal point of the gesture itself (eg. center point between two fingers while pinch zooming). The calculation isn't completely correct as it wobbles a bit, and we would need to add scaling to it, but you get the picture.you can listen to camera changes and validate if the tilt of the camera has changed. This allows to provide a hook to transform the location puck. Atm the transformation is incorrect but good enough to showcase it's feasibility.
all animations in above gifs were done with Android SDK animators, it contains an example how to orchestrate multiple of them together to create an animation set. Atm animation duration is calculated based on the time it took for the previous location update to be triggerred. There will be better ways of getting a more smooth animation.
cc @mapbox/navigation-android