implements Serializable
An immutable trapezoid describing the area on the map that is visible from a specific camera position. When the camera is looking straight down, the visible region is rectangular (but not necessarily axis-aligned since the bearing may not be north). When the camera is tilted, the visible region is a trapezoid with the smaller of the two parallel sides closest to the camera.
Field Summary
public final LatLng | farLeft | Projection of the top left corner of the screen onto the ground plane. |
public final LatLng | farRight | Projection of the top right corner of the screen onto the ground plane. |
public final LatLngBounds | latLngBounds | The smallest bounding box that includes this visible region. |
public final LatLng | nearLeft | Projection of the bottom left corner of the screen onto the ground plane. |
public final LatLng | nearRight | Projection of the bottom right corner of the screen onto the ground plane. |
Public Constructor Summary
VisibleRegion(LatLng nearLeft, LatLng nearRight, LatLng farLeft, LatLng farRight, LatLngBounds latLngBounds)
Creates a new VisibleRegion given the four corners of the camera.
|
Public Method Summary
boolean |
equals(Object o)
Compares this
VisibleRegion to another object. |
int |
hashCode()
|
String |
toString()
|
Inherited Method Summary
Fields
public final LatLng farRight
Projection of the top right corner of the screen onto the ground plane.
public final LatLngBounds latLngBounds
public final LatLng nearLeft
Projection of the bottom left corner of the screen onto the ground plane.
public final LatLng nearRight
Projection of the bottom right corner of the screen onto the ground plane.
Public Constructors
public VisibleRegion (LatLng nearLeft, LatLng nearRight, LatLng farLeft, LatLng farRight, LatLngBounds latLngBounds)
Creates a new VisibleRegion given the four corners of the camera. The LatLng parameters must define a convex shape (the edges of the resulting shape mustn't cross). No bounds checking is performed at runtime.
Parameters
nearLeft | a LatLng object containing the latitude and longitude of the near left
corner of the region |
---|---|
nearRight | a LatLng object containing the latitude and longitude of the near
right corner of the region |
farLeft | a LatLng object containing the latitude and longitude of the far left
corner of the region |
farRight | a LatLng object containing the latitude and longitude of the far right
corner of the region |
latLngBounds | the smallest bounding box that includes the visible region defined in this
class. If this box crosses the 180° meridian (the vertical line from north to south),
the longitude in farRight will be negative and the longitude in farLeft
will be positive. Same applies to nearRight and nearLeft .
|
Public Methods
public boolean equals (Object o)
Compares this VisibleRegion
to another object. If the other object is actually a
pointer to this object, or if all four corners and the bounds of the two objects are the same,
this method returns true. Otherwise, this method returns false.
Parameters
o | an Object . Return true if both objects are the same object, or if
all four corners and the bounds of the two objects are the same. Return false otherwise.
|
---|