我正在使用谷歌地图 SDK。我想每 5 秒更新一次 pin 的 gps 坐标。目前我只是在更新 GMSMarker 的位置属性。但它给出了跳跃效果。我想在地图上顺利移动标记。
这是我更新标记位置的代码
-(void)updateLocationoordinates(CLLocationCoordinate2D) coordinates
{ 
  if (marker == nil) {
      marker = [GMSMarker markerWithPosition:coordinates];
      marker.icon = [UIImage imageNamed:CAR_FOUND_IMAGE];
      marker.map = mapView_;
  } else
  marker.position = coordinates; 
}