public final class

CameraPosition

extends Object
java.lang.Object
   ↳ com.amazon.geo.mapsv2.model.CameraPosition

Class Overview

Immutable class representing the position of the camera. Pass this object to CameraUpdateFactory.newCameraPosition(CameraPosition) to create a CameraUpdate you can use to move the map camera to a new position.

To get the current camera position, call AmazonMap.getCameraPosition.

Summary

Nested Classes
class CameraPosition.Builder Class for building CameraPosition objects. 
Fields
public final float bearing The bearing (rotation) of the camera, in degrees clockwise from north.
public final LatLng target The LatLng representing the geographic point on the earth over which the camera is centered.
public final float tilt The delta of the angle of the camera directly from directly facing the Earth.
public final float zoom The distance of the camera from the earth, in zoom level units.
Public Constructors
CameraPosition(LatLng target, float zoom, float tilt, float bearing)
Creates a new CameraPosition object using the specified values.
Public Methods
static CameraPosition.Builder builder()
Creates a new CameraPosition.Builder object.
static CameraPosition.Builder builder(CameraPosition camera)
Creates a new CameraPosition.Builder object populated with the values from the provided CameraPosition.
static CameraPosition createFromAttributes(Context context, AttributeSet attrs)
Creates a camera position from an AttributeSet.
int describeContents()
boolean equals(Object obj)
final static CameraPosition fromLatLngZoom(LatLng target, float zoom)
Creates a new CameraPosition with the target set to the provided LatLng and the zoom set to the provided zoom level.
int hashCode()
String toString()
void writeToParcel(Parcel out, int flags)
[Expand]
Inherited Methods
From class java.lang.Object

Fields

public final float bearing

The bearing (rotation) of the camera, in degrees clockwise from north.

public final LatLng target

The LatLng representing the geographic point on the earth over which the camera is centered.

public final float tilt

The delta of the angle of the camera directly from directly facing the Earth.

public final float zoom

The distance of the camera from the earth, in zoom level units.

Public Constructors

public CameraPosition (LatLng target, float zoom, float tilt, float bearing)

Creates a new CameraPosition object using the specified values.

Parameters
target The LatLng representing the geographic position of the camera.
zoom The zoom level of the camera in zoom level units.
tilt The tilt of the camera (delta from directly facing the Earth)
bearing The direction of the camera, in degrees clockwise from north.

Public Methods

public static CameraPosition.Builder builder ()

Creates a new CameraPosition.Builder object. Use this to create a new CameraPosition.

Returns
  • The new CameraPosition.Builder.

public static CameraPosition.Builder builder (CameraPosition camera)

Creates a new CameraPosition.Builder object populated with the values from the provided CameraPosition.

Parameters
camera A CameraPosition with the initial values for this builder.
Returns
  • The new CameraPosition.Builder.

public static CameraPosition createFromAttributes (Context context, AttributeSet attrs)

Creates a camera position from an AttributeSet.

Parameters
context Context for the AttributeSet.
attrs The AttributeSet to use to construct the CameraPosition.
Returns
  • The new CameraPosition, or null.

public int describeContents ()

public boolean equals (Object obj)

public static final CameraPosition fromLatLngZoom (LatLng target, float zoom)

Creates a new CameraPosition with the target set to the provided LatLng and the zoom set to the provided zoom level. The tilt and bearing are left at their default values (0).

Parameters
target The LatLng representing the latitude / longitude of the desired camera target.
zoom The desired zoom level of the camera.
Returns
  • The new CameraPosition

public int hashCode ()

public String toString ()

public void writeToParcel (Parcel out, int flags)