【发布时间】:2016-05-25 22:06:00
【问题描述】:
我正在使用 GMSMapView。因此,我添加了自定义 GMSMarker 并设置图像(例如自行车图像)并在用户开始移动并更改 locationManager 中标记的角度时为该标记设置动画。
目前我只是在更新 GMSMarker 的位置属性。 但是它给出了 GMSMarker 跳跃效果。 而不是这个我想移动和旋转 GMSMarker 平滑/正确进入 GMSMapView。
如何在 Swift 中实现这一点?谢谢。
(void)updateLocationoordinates(CLLocationCoordinate2D) coordinates
{
if (marker == nil) {
marker = [GMSMarker markerWithPosition:coordinates];
marker.icon = [UIImage imageNamed:IMAGE];
marker.map = mapView;
} else{
marker.position = coordinates;
}
}
【问题讨论】:
标签: ios swift cllocationmanager catransaction