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 StreetViewPanorama
object.
Disabling/enabling user navigation
By default, user navigation is enabled and directional arrows are visible for navigation. Take a look at the following image:
In the earlier image, you can see the two directional arrows...