Animating scale, rotation, and scroll at the same time #82
Closed
TimPushkin
started this conversation in
Ideas
Replies: 2 comments 2 replies
-
This makes sense, I'll have a look. Thanks for the suggestion. |
Beta Was this translation helpful? Give feedback.
0 replies
-
I've pushed the branch suspend fun MapState.centerOnMarker(
id: String,
destScale: Float,
destAngle: AngleDegree,
animationSpec: AnimationSpec<Float> = SpringSpec(stiffness = Spring.StiffnessLow)
) The "CenteringOnMarker" demo has been updated to test this new api. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I would like to be able to scale, rotate, and scroll the map at the same time. My use case is that I am developing a navigation app where I have a marker which is the current user position with a cone of sight, and when the position changes I want to re-center on this marker and at the same time rotate the map so the cone of sight is directed at the top of the screen again.
Currently the closest easy thing I can do with the
MapState
API is to sequentially callcenterOnMarker()
and thenrotateTo()
, but I cannot call them concurrently as I would like to because they use the sameapiAnimatable
property ofZoomPanRotateState
. It seems like I can also animate rotation myself, but this will involve reimplementing some ofrotateTo()
functionality.Since some APIs already allow scroll and scale animations to be performed at the same time, it would be nice to also have rotation there. For me personally,
centerOnMarker()
is particularly interesting.Beta Was this translation helpful? Give feedback.
All reactions