How to smoothly move GMSMarker along coordinates in Objective c

后端 未结 3 1782
盖世英雄少女心
盖世英雄少女心 2020-12-01 10:03

I\'m using google map sdk. I want to update gps coordinates of pin after each 5 seconds. Currently I\'m just updating position attribute of GMSMarker. But it gives jump effe

3条回答
  •  一向
    一向 (楼主)
    2020-12-01 10:23

    Brett's Answer in swift -3 and 4

    CATransaction.begin()
    CATransaction.setAnimationDuration(2.0)
    marker.position = coordindates
    CATransaction.commit()
    

提交回复
热议问题