On-demand Rides and Deliveries Solution is currently available only to select partners. Contact sales to learn more.

CameraPosition

Stay organized with collections Save and categorize content based on your preferences.
public class CameraPosition extends Object

Represents a position of the camera in relation to the map.

Public Constructor Summary

Public Method Summary

CameraPosition
bearing(float bearing)
Sets the bearing of this CameraPosition.
CameraPosition
center(LatLng center)
Sets the location that will appear in the center of the screen for this CameraPosition.
Float
getBearing()
Returns the bearing of this CameraPosition.
LatLng
getCenter()
Returns the location that this CameraPosition is centered upon.
Float
getZoom()
Returns the zoom level of this CameraPosition.
CameraPosition
zoom(float zoom)
Sets the zoom level of this CameraPosition.

Inherited Method Summary

Public Constructors

public CameraPosition ()

Public Methods

public CameraPosition bearing (float bearing)

Sets the bearing of this CameraPosition.

Parameters
bearing the new bearing to set
Returns
  • the object for which the method was called, with the new bearing set

public CameraPosition center (LatLng center)

Sets the location that will appear in the center of the screen for this CameraPosition.

Parameters
center the location that the camera will be centered on
Returns
  • the object for which the method was called, with the new center set

public Float getBearing ()

Returns the bearing of this CameraPosition. If no bearing has been set, then this method will return null.

Returns
  • the bearing

public LatLng getCenter ()

Returns the location that this CameraPosition is centered upon. If no center has been set, then this method will return null.

Returns
  • the location that the camera is centered on

public Float getZoom ()

Returns the zoom level of this CameraPosition. If no zoom has been set, then this method will return null.

Returns
  • the zoom level

public CameraPosition zoom (float zoom)

Sets the zoom level of this CameraPosition.

Parameters
zoom the zoom level to set
Returns
  • the object for which the method was called, with the new zoom level set