java.lang.Object |
↳ |
com.google.android.gms.maps.model.CameraPosition |
Summary
Nested Classes |
class |
CameraPosition.Builder |
Builds camera position. |
[Expand]
Inherited Constants |
From interface
android.os.Parcelable
int |
CONTENTS_FILE_DESCRIPTOR |
|
int |
PARCELABLE_WRITE_RETURN_VALUE |
|
|
Fields |
public
final
float |
bearing |
Direction that the camera is pointing in, in degrees clockwise from north. |
public
final
LatLng |
target |
The location that the camera is pointing at. |
public
final
float |
tilt |
The angle, in degrees, of the camera angle from the nadir (directly facing the Earth). |
public
final
float |
zoom |
Zoom level near the center of the screen. |
Public Constructors |
|
CameraPosition(LatLng target, float zoom, float tilt, float bearing)
Constructs a CameraPosition.
|
[Expand]
Inherited Methods |
From class
java.lang.Object
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
final
void
|
wait()
|
|
From interface
android.os.Parcelable
abstract
int
|
describeContents()
|
abstract
void
|
writeToParcel(Parcel arg0, int arg1)
|
|
Fields
public
final
float
bearing
Direction that the camera is pointing in, in degrees clockwise from north.
public
final
LatLng
target
The location that the camera is pointing at.
public
final
float
tilt
The angle, in degrees, of the camera angle from the nadir (directly facing the Earth). See
tilt(float)
for
details of restrictions on the range of values.
public
final
float
zoom
Zoom level near the center of the screen. See
zoom(float)
for the
definition of the camera's zoom level.
Public Constructors
public
CameraPosition
(LatLng target, float zoom, float tilt, float bearing)
Constructs a CameraPosition.
Parameters |
target |
LatLng :
The target location to align with the center of the screen. |
zoom |
float :
Zoom level at target. See
zoom(float) for
details of restrictions. |
tilt |
float :
The camera angle, in degrees, from the nadir (directly down). See
tilt(float) for
details of restrictions. |
bearing |
float :
Direction that the camera is pointing in, in degrees clockwise from north.
This value will be normalized to be within 0 degrees inclusive and 360 degrees
exclusive. |
Throws |
NullPointerException |
if target is null |
IllegalArgumentException |
if tilt is outside the range of
0 to 90 degrees inclusive.
|
Public Methods
Creates a builder for a camera position, initialized to a given position.
Parameters |
camera |
CameraPosition
|
Creates a builder for a camera position.
public
static
CameraPosition
createFromAttributes
(Context context, AttributeSet attrs)
Creates a CameraPostion from the AttributeSet
.
Parameters |
context |
Context
|
attrs |
AttributeSet
|
public
boolean
equals
(Object o)
public
static
final
CameraPosition
fromLatLngZoom
(LatLng target, float zoom)
Constructs a CameraPosition pointed for a particular target and zoom level. The resultant
bearing is North, and the viewing angle is perpendicular to the Earth's surface. i.e.,
directly facing the Earth's surface, with the top of the screen pointing North.
Parameters |
target |
LatLng :
The target location to align with the center of the screen. |
zoom |
float :
Zoom level at target. See
zoom(float) for
details on the range the value will be clamped to. The larger the value the more
zoomed in the camera is.
|
public
String
toString
()
public
void
writeToParcel
(Parcel out, int flags)
Parameters |
out |
Parcel
|
flags |
int
|