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

Working with UI controls

The Google map's API provides some inbuilt UI controls to make our task easier. The UI controls that can be enabled or disabled are as follows:

  • Zoom controls
  • Compass
  • My Location button
  • Level picker

Let's learn about these UI controls in more detail.

Zoom controls

Zoom controls are normally used for zoom-in and zoom-out functions. These buttons are disabled by default. The new version of the Google Maps application has removed these controls. It is up to you to display or disable them in your application.

These zoom controls are enabled or disabled using the UiSettings class, which can be obtained by calling the getUiSettings() method on the GoogleMap object. Then, call the setZoomControlsEnabled() method on the obtained UiSettings ...

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