ios-sdk-examples icon indicating copy to clipboard operation
ios-sdk-examples copied to clipboard

Annotation view movement example

Open friedbunny opened this issue 9 years ago • 6 comments

A view annotation that is animated along a looping path. Punted from the initial v3.3.0 push in https://github.com/mapbox/ios-sdk-examples/pull/23.

/cc @pveugen

friedbunny avatar Jul 15 '16 15:07 friedbunny

https://github.com/mapbox/mapbox-gl-native/issues/5645 discusses how to implement this example, more or less.

friedbunny avatar Jul 15 '16 19:07 friedbunny

A developer is requesting this example in mapbox/mapbox-gl-native#6206.

1ec5 avatar Aug 30 '16 20:08 1ec5

Another request for an annotation animation example in https://github.com/mapbox/mapbox-gl-native/issues/8378

boundsj avatar Mar 20 '17 21:03 boundsj

@jmkiley and I spent a little time investigating this so I thought I'd add some of that context while it is still in my head!

There is currently an issue with animating annotation views offscreen. So, if this example is completed before that is fixed, don't "go long"!

Also, although the approach of using action​For​Layer:​for​Key:​ works well in most cases and nicely co-locates a view's animation description within the view class itself, it does not naturally play well if you need to animate callouts along with the view and you intend to take advantage of the implicit animation that can happen when an annotation view's annotation coordinate property is changed. The issue is that the callout moves directly to the new coordinate but the view will (usually) take its time along the animation path:

callout_001

I think that, in most if not all MapKit examples that I've seen, a UIView animation block approach is suggested. That approach also works well with our objects:

callout_002

So, it may make sense to use a UIView animation block in this example.

boundsj avatar Mar 24 '17 18:03 boundsj

Updated documentation on which annotation class to use for coordinate animate available here: https://docs.mapbox.com/ios/maps/overview/markers-and-annotations/

bikisDesign-zz avatar Aug 27 '19 18:08 bikisDesign-zz

Its been three years, but noting that we still want to have this example :) external contributions are most welcome!

captainbarbosa avatar Sep 18 '19 18:09 captainbarbosa