メソッドの違いは何ですか
public final void moveCamera (CameraUpdate 更新) および public final void animateCamera (CameraUpdate 更新)
GoogleMap クラスの?
getCameraPosition() はいつ呼び出す必要がありますか?
メソッドの違いは何ですか
public final void moveCamera (CameraUpdate 更新) および public final void animateCamera (CameraUpdate 更新)
GoogleMap クラスの?
getCameraPosition() はいつ呼び出す必要がありますか?
この 2 つの違いは次のとおりです。
animateCamera
スムーズなアニメーションでカメラを目的の位置にアニメートし、カメラをmoveCamera
目的の位置に即座に移動します。
編集:
CameraPositionのドキュメントから:
すべてのカメラ位置パラメーターを集約する不変クラス。
基本的に、方位、傾き、ターゲット、ズームなどのカメラ位置のすべてのデータが含まれています。
実行getCameraPosition()
すると、この CameraPosition オブジェクトを取得できます。
ドキュメントを読んで理解することは、ソフトウェア開発の基本です。
animateCamera(CameraUpdate更新)
Animates the movement of the camera from the current position to the position defined in the update.
moveCamera(CameraUpdate更新)
アップデートで定義された指示に従って、カメラを再配置します。