Builds camera position.
Public Constructor Summary
Public Method Summary
public CameraPosition.Builder ()
Creates an empty builder.
public CameraPosition.Builder (CameraPosition previous)
public CameraPosition.Builder bearing (float bearing)
Sets the direction that the camera is pointing in, in degrees clockwise from north.
public CameraPosition.Builder target (LatLng location)
Sets the location that the camera is pointing at.
public CameraPosition.Builder tilt (float tilt)
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:
- For zoom levels less than 10 the maximum is 30.
- For zoom levels from 10 to 14 the maximum increases linearly from 30 to 45 (e.g. at zoom level 12, the maximum is 37.5).
- For zoom levels from 14 to 15.5 the maximum increases linearly from 45 to 67.5.
- For zoom levels greater than 15.5 the maximum is 67.5.
public CameraPosition.Builder zoom (float zoom)
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
to find the restrictions. Note that the camera zoom need not be an integer value.