CameraUpdate

  • 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 likezoomIn() to create specific camera updates.

public final classCameraUpdate extendsObject

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

From class java.lang.Object
Object
clone()
boolean
equals(Object arg0)
void
finalize()
finalClass<?>
getClass()
int
hashCode()
final void
notify()
final void
notifyAll()
String
toString()
final void
wait(long arg0, int arg1)
final void
wait(long arg0)
final void
wait()

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.