mapbox-maps-ios
mapbox-maps-ios copied to clipboard
Move point annotation with animation
New Feature
I would like to request a functionality to move point annotation with animation. I am not sure whether its already available on V10 but I couldnt find it in the docs.
It could just be a simple animation at start, using UIView
's animate API with duration and at later stage perhaps add some more functionalities.
Why
One of the use case is to provide a smooth user experience to the end users when they are tracking some deliveries or their drivers coming to pick them up on a ride-hailing app.
Thanks
We're still examining whether and how to connect geometry with platform animations. In the meantime we suggest using a style transition. Many layer properties of the Mapbox Style Specification are subject to style transitions, including the fill translate
property, which provides an offset that will produce the same effect for a layer as moving the source geometry. You can use this in a iOS context via fillTranslateTransition.
Thanks @sbma44 for the explanation. Could you care to provide an example for the same?
@sbma44 hi Tom! Unfortunately there is no fillTranslateTransition for the PointAnnotationManager
Also, the style property of the PointAnnotationManager is private, so you're not able to do any transition properties
I wish I could make a PR with an iconTranslateTransition property, but I'm still waiting for the documentation on how to contribute to annotation managers here: https://github.com/mapbox/mapbox-maps-ios/issues/550