Customizing StreetViewPanorama

In this section, we are going to customize user-controlled features such as zoom gestures, pan gestures, navigation icons, and so on. We are going to learn about:

  • Disabling/enabling pan gestures
  • Disabling/enabling user navigation
  • Disabling/enabling zoom gestures
  • Disabling/enabling the street name
  • Working with click events
  • Listening to panorama change events

Disabling/enabling pan gestures

By default, pan gestures are enabled. These help us move around in the street view. To disable this, we can call the setPanningGesturesEnabled() method on the StreetViewPanorama object, which will take Boolean as a parameter. The code would be similar to:

        panorama.setPanningGesturesEnabled(false);

In the earlier code, the panorama is the ...

Get Learning Android Google Maps now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.