java.lang.Object | |
↳ | com.google.android.gms.maps.model.CameraPosition.Builder |
Builds camera position.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Creates an empty builder.
| |||||||||||
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Sets the direction that the camera is pointing in, in degrees clockwise from north.
| |||||||||||
Builds a
CameraPosition . | |||||||||||
Sets the location that the camera is pointing at.
| |||||||||||
Sets the angle, in degrees, of the camera from the nadir (directly facing the Earth).
| |||||||||||
Sets the zoom level of the camera.
|
[Expand]
Inherited Methods | |||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Creates an empty builder.
Sets the direction that the camera is pointing in, in degrees clockwise from north.
Sets the location that the camera is pointing at.
Sets the angle, in degrees, of the camera from the nadir (directly facing the Earth). When changing the camera position for a map, this value is restricted depending on the zoom level of the camera. The restrictions are as follows:
Sets the zoom level of the camera. Zoom level is defined such that at zoom level 0, the whole world is approximately 256dp wide (assuming that the camera is not tilted). Increasing the zoom level by 1 doubles the width of the world on the screen. Hence at zoom level N, the width of the world is approximately 256 * 2 N dp, i.e., at zoom level 2, the whole world is approximately 1024dp wide.
When changing the camera position for a map, the zoom level of the camera is restricted
to a certain range depending on various factors including location, map type and map
size. Use GoogleMap.getMinZoomLevel
and
GoogleMap.getMaxZoomLevel
to find the restrictions. Note that the camera zoom need not be an integer value.