4

方法之间有什么区别

public final void moveCamera(CameraUpdate 更新)和 public final void animateCamera(CameraUpdate 更新)

谷歌地图类?

我应该什么时候调用 getCameraPosition()?

4

2 回答 2

5

这两者的区别在于:

animateCamera将以流畅的动画将相机动画到所需位置,同时moveCamera将立即将相机移动到所需位置。

编辑:

来自CameraPosition的文档:

聚合所有相机位置参数的不可变类。

基本上它包含相机位置的所有数据,如:方位、倾斜、目标和缩放。

通过运行getCameraPosition()可以得到这个CameraPosition对象。

于 2013-10-01T11:18:55.633 回答
0

阅读和理解文档是软件开发的基础。

animateCamera(CameraUpdate 更新)

Animates the movement of the camera from the current position to the position defined in the update.

moveCamera(CameraUpdate 更新)

根据更新中定义的说明重新定位相机。

于 2013-10-01T11:24:50.383 回答