You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
CoreThe cross-platform C++ core, aka mbglQtMapbox Maps SDK for Qt, aka Qt Location Mapbox GLfeaturegl-iosiOSMapbox Maps SDK for iOSnavigationFor the Mapbox Navigation SDK for Android or iOS or navigation use cases in general
This is a ticket to track the discussion around implementing a new camera system for the various platforms.
The goal is to provide a camera system that allows independent animations to run on each of the map camera parameters. It should use a familiar API's for each of the platforms. This will give developers and designers the ability to have total control of the experience. It will also allow for the easy use of plug-in camera animation libraries and physics simulations for those who want to use certain styles of animation.
Further down the line, we should be able to introduce design tools for crafting animations and sharing those creations.
Some background and prior thinking:
“Fresh new camera”: mapbox/mapbox-gl-js#3583
“Concurrent Transition Animations”: #3625
“Reimplement camera transitions with Core Animation”: #8176
The new camera system will be able to animate each of the following parameters on independent timelines:
center coordinate
zoom level
bearing
pitch
anchor
roll ?? (yes!!??)
Animations will be handled on the various platforms and committed to the core with the frequency (or frame rate) controlled by the platform.
mbgl currently treats anchor as a frame of reference for zoom and angle, but not as a degree of freedom in its own right. (Similarly, padding affects the frame of reference for center.) Would you suggest turning it into an animatable degree of freedom? What are the tradeoffs?
I'm thinking of anchor as an animatable parameter. Setting this explicitly has been the easiest way to control the effect. I haven't given much thought to the tradeoffs of setting this implicitly.
Currently, to change the camera’s padding (as the user perceives it), you’d need to reapply the current center coordinate with the new padding. The anchor is often provided by gesture recognizers (to be under the mouse cursor) when specifying a camera to animate to, but if you ask the map for its current anchor, you’ll always get an unset value. In this sense, anchor could just as well have been a member of AnimationOptions instead of CameraOptions.
If we were to keep the current anchor implementation but allow for concurrent animations, the developer would for instance ease to a camera with a new anchor value, and any subsequent animation frames would have to account for that anchor when computing the center coordinate. On the other hand, if we turn anchor into its own degree of freedom, then there could be conflicting anchors when (say) the user makes a rotation gesture in the middle of a programmatic rotation.
That's a good point about the anchor moving to the point between touches on rotate. I'm very much thinking about this in the specific context of navigation where any touch/move on the map should cancel all animation. Any call to transition to the following mode (by tapping resume or re-center or using a timeout) should result in the anchor point moving to somewhere in the lower third of the screen. Calls for transition to the overhead view should move the anchor to the center of the defined viewport.
CoreThe cross-platform C++ core, aka mbglQtMapbox Maps SDK for Qt, aka Qt Location Mapbox GLfeaturegl-iosiOSMapbox Maps SDK for iOSnavigationFor the Mapbox Navigation SDK for Android or iOS or navigation use cases in general
Activity
d-prukop commentedon Aug 18, 2017
@jfirebaugh Can we figure out a way to prefetch tiles using the platform based animations?
1ec5 commentedon Aug 18, 2017
mbgl currently treats
anchoras a frame of reference forzoomandangle, but not as a degree of freedom in its own right. (Similarly,paddingaffects the frame of reference forcenter.) Would you suggest turning it into an animatable degree of freedom? What are the tradeoffs?d-prukop commentedon Aug 18, 2017
I'm thinking of anchor as an animatable parameter. Setting this explicitly has been the easiest way to control the effect. I haven't given much thought to the tradeoffs of setting this implicitly.
1ec5 commentedon Aug 18, 2017
Currently, to change the camera’s padding (as the user perceives it), you’d need to reapply the current center coordinate with the new padding. The anchor is often provided by gesture recognizers (to be under the mouse cursor) when specifying a camera to animate to, but if you ask the map for its current anchor, you’ll always get an unset value. In this sense,
anchorcould just as well have been a member ofAnimationOptionsinstead ofCameraOptions.If we were to keep the current
anchorimplementation but allow for concurrent animations, the developer would for instance ease to a camera with a newanchorvalue, and any subsequent animation frames would have to account for that anchor when computing the center coordinate. On the other hand, if we turnanchorinto its own degree of freedom, then there could be conflicting anchors when (say) the user makes a rotation gesture in the middle of a programmatic rotation.d-prukop commentedon Aug 18, 2017
That's a good point about the anchor moving to the point between touches on rotate. I'm very much thinking about this in the specific context of navigation where any touch/move on the map should cancel all animation. Any call to transition to the following mode (by tapping resume or re-center or using a timeout) should result in the anchor point moving to somewhere in the lower third of the screen. Calls for transition to the overhead view should move the anchor to the center of the defined viewport.
kkaefer commentedon Aug 21, 2017
@d-prukop see #2006 for a discussion on tile prefetching.
kkaefer commentedon Aug 21, 2017
See #9813 for cache eviction strategy when prefetching tiles.
zugaldia commentedon Aug 22, 2017
Capturing chat today (cc: @tobrun). Looks like
ObjectAnimatoris a good starting point to achieve this on the Android side.d-prukop commentedon Aug 22, 2017
Had a chat with @1ec5 yesterday. The plan is to experiment with using CoreAnimation to do camera animations without changing anything on core.
5 remaining items
tobrun commentedon Sep 15, 2017
PR unblocking this feature for the Android binding in #10001.
tobrun commentedon Jan 18, 2018
Removing android label, API for that landed.
julianrex commentedon Jul 31, 2018
Tagging myself and @fabian-guerra just for reference.
stale commentedon Jan 28, 2019
This issue has been automatically detected as stale because it has not had recent activity and will be archived. Thank you for your contributions.
stale commentedon Jul 27, 2019
This issue has been automatically detected as stale because it has not had recent activity and will be archived. Thank you for your contributions.