public class LatLngBounds extends Object implements Parcelable
Modifier and Type | Class and Description |
---|---|
static class |
LatLngBounds.Builder
Builder for composing LatLngBounds objects.
|
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
Modifier and Type | Field and Description |
---|---|
static Parcelable.Creator<LatLngBounds> |
CREATOR |
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
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(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() |
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(Parcel out,
int arg1) |
public static final 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 LatLng[] toLatLngs()
public boolean equals(Object o)
public 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 describeContents()
describeContents
in interface Parcelable
public void writeToParcel(Parcel out, int arg1)
writeToParcel
in interface Parcelable
© 2015–2017 Mapbox. All rights reserved.