public class LatLngBounds
extends java.lang.Object
implements android.os.Parcelable
| Modifier and Type | Class and Description |
|---|---|
static class |
LatLngBounds.Builder
Builder for composing LatLngBounds objects.
|
| Modifier and Type | Field and Description |
|---|---|
static android.os.Parcelable.Creator<LatLngBounds> |
CREATOR |
| Modifier and Type | Method and Description |
|---|---|
boolean |
contains(ILatLng latLng)
Determines whether this LatLngBounds contains a point and the point
does not touch its boundary.
|
int |
describeContents() |
boolean |
equals(java.lang.Object o)
Determines whether this LatLngBounds matches another one via LatLng.
|
LatLng |
getCenter()
Calculates the centerpoint of this LatLngBounds by simple interpolation and returns
it as a point.
|
double |
getLatitudeSpan()
Get the absolute distance, in degrees, between the north and
south boundaries of this LatLngBounds
|
double |
getLatNorth() |
double |
getLatSouth() |
double |
getLonEast() |
double |
getLongitudeSpan()
Get the absolute distance, in degrees, between the west and
east boundaries of this LatLngBounds
|
double |
getLonWest() |
LatLngSpan |
getSpan()
Get the area spanned by this LatLngBounds
|
int |
hashCode() |
LatLngBounds |
intersect(double northLatitude,
double eastLongitude,
double southLatitude,
double westLongitude)
Returns a new LatLngBounds that is the intersection of this with another LatLngBounds
|
LatLngBounds |
intersect(LatLngBounds box)
Returns a new LatLngBounds that is the intersection of this with another box
|
boolean |
isEmptySpan()
Validate if LatLngBounds is empty, determined if absolute distance is
|
LatLng[] |
toLatLngs() |
java.lang.String |
toString() |
LatLngBounds |
union(double lonNorth,
double latEast,
double lonSouth,
double latWest)
Returns a new LatLngBounds that stretches to include another LatLngBounds,
given by corner points.
|
LatLngBounds |
union(LatLngBounds bounds)
Returns a new LatLngBounds that stretches to contain both this and another LatLngBounds.
|
void |
writeToParcel(android.os.Parcel out,
int arg1) |
public static final android.os.Parcelable.Creator<LatLngBounds> CREATOR
public LatLng getCenter()
public double getLatNorth()
public double getLatSouth()
public double getLonEast()
public double getLonWest()
public LatLngSpan getSpan()
public double getLatitudeSpan()
public double getLongitudeSpan()
public boolean isEmptySpan()
public java.lang.String toString()
toString in class java.lang.Objectpublic LatLng[] toLatLngs()
public boolean equals(java.lang.Object o)
equals in class java.lang.Objecto - another objectpublic boolean contains(ILatLng latLng)
latLng - the point which may be containedpublic LatLngBounds union(LatLngBounds bounds)
bounds - LatLngBounds to addpublic LatLngBounds union(double lonNorth, double latEast, double lonSouth, double latWest)
lonNorth - Northern LongitudelatEast - Eastern LatitudelonSouth - Southern LongitudelatWest - Western Longitudepublic LatLngBounds intersect(LatLngBounds box)
box - LatLngBounds to intersect withpublic LatLngBounds intersect(double northLatitude, double eastLongitude, double southLatitude, double westLongitude)
northLatitude - Northern LongitudeeastLongitude - Eastern LatitudesouthLatitude - Southern LongitudewestLongitude - Western Latitudepublic int hashCode()
hashCode in class java.lang.Objectpublic int describeContents()
describeContents in interface android.os.Parcelablepublic void writeToParcel(android.os.Parcel out,
int arg1)
writeToParcel in interface android.os.Parcelable