O'Reilly logo

Learning Android Google Maps by Raj Amal W.

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Moving the camera

The Google Maps API helps us to move from one visible region to another. This can be done by changing the camera view.

The camera view changing from one location to another can be animated. The duration of the animation can also be controlled.

To achieve this, we need to obtain the CameraUpdate object from the CameraUpdateFactory class.

The different ways to animate the camera views are as follows:

  • Changing zoom levels in the current position
  • Changing the camera position
  • Setting boundaries for the view
  • Panning the map

Changing the zoom level in the current position

Let's discuss the different methods used to change the zoom level. These methods should be called on the CameraUpdateFactory class to obtain the CameraUpdate object:

Method ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required