CameraUpdate Stay organized with collections Save and categorize content based on your preferences.
Page Summary
CameraUpdate objects define a map's camera move.
You can modify a map's camera using a CameraUpdate object by calling GoogleMap.animateCamera or GoogleMap.moveCamera.
To get a CameraUpdate object, use the CameraUpdateFactory class.
You can use CameraUpdateFactory methods like
zoomIn()to create specific camera updates.
Defines a camera move. An object of this type can be used to modify a map's camera by calling GoogleMap.animateCamera(CameraUpdate), GoogleMap.animateCamera(CameraUpdate, GoogleMap.CancelableCallback) or GoogleMap.moveCamera(CameraUpdate).
To obtain aCameraUpdate use the factory classCameraUpdateFactory.
For example, to zoom in on a map, you can use the following code:
GoogleMap map = ...; map.animateCamera(CameraUpdateFactory.zoomIn());Developer Guide
For more information, read theCamera and View developer guide.
Inherited Method Summary
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-10-31 UTC.