mapbox-maps-ios icon indicating copy to clipboard operation
mapbox-maps-ios copied to clipboard

Move point annotation with animation

Open prgorasiya opened this issue 3 years ago • 4 comments

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

prgorasiya avatar Apr 23 '21 05:04 prgorasiya

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.

sbma44 avatar May 03 '21 17:05 sbma44

Thanks @sbma44 for the explanation. Could you care to provide an example for the same?

prgorasiya avatar May 04 '21 04:05 prgorasiya

@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

landyrev avatar Aug 20 '21 11:08 landyrev

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

landyrev avatar Aug 20 '21 12:08 landyrev