September 2015
Beginner to intermediate
356 pages
7h 27m
English
Until now, we have manually changed the camera view by panning and zooming. Let's see how we can do it programmatically.
To do this, we need to use the StreetViewPanoramaCamera object. Create a StreetViewPanoramaCamera object by using the nested StreetViewPanoramaCamera.Builder class. We can set the tilt, zoom, and bearing of the street view. The methods are as follows:
|
Method |
Parameter |
Function |
|---|---|---|
|
|
Zoom level in float |
By default, the zoom level is 0. The maximum zoom level depends on the panorama. If the zoom level is specified in a negative value, it is set to 0. |
|
|
Tilt angle in float |
Sets the tilt angle of the camera from the horizon of the panorama. The angle ranges between -90 and 90. |
|
|
Read now
Unlock full access