b/w animateCamera 和 google V2 地图中的 moveCamera 有什么区别?

What is the difference b/w animateCamera and moveCamera in google V2 maps?

大家好,我正在 android v2 地图上进行示例项目以设置当前位置。我遇到了几行

//what does this line do?
mMap.moveCamera(CameraUpdateFactory.newLatLng(latLng));
//this line will animate to the provided lat and lon values
mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(mLastLocation.getLatitude(), mLastLocation.getLongitude()), 16.0f));

mMap.moveCamera 是做什么的??与另一条线相比,我没有看到任何明显的视觉变化。 两者之间的主要区别是什么? moveCamera 似乎类似于 animateCamera IMO。

  • animateCamera:地图使用动画移动到给定位置(或位置列表),包括缩小然后放大到新位置(如果两个点是彼此远离)。
  • moveCamera:地图将焦点更改到给定的给定位置(或位置列表),没有动画,在单个帧更改中。