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
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 StreetViewPanorama
object.