public class LatLngBounds extends JavaScriptObject
Modifier | Constructor and Description |
---|---|
protected |
LatLngBounds()
A LatLngBounds instance represents a rectangle in geographical coordinates, including one that crosses the 180 degrees longitudinal meridian.
|
Modifier and Type | Method and Description |
---|---|
boolean |
contains(LatLng latlng)
Returns true if the given lat/lng is in this bounds.
|
boolean |
equals(LatLngBounds other)
Returns true if this bounds approximately equals the given bounds.
|
LatLngBounds |
extend(LatLng point)
Extends this bounds to contain the given point.
|
LatLng |
getCenter()
Computes the center of this LatLngBounds
|
LatLng |
getNorthEast()
Returns the north-east corner of this bounds.
|
LatLng |
getSouthWest()
Returns the south-west corner of this bounds.
|
String |
getToString()
Converts to string.
|
boolean |
intersects(LatLngBounds other)
Returns true if this bounds shares any points with this bounds.
|
boolean |
isEmpty()
Returns if the bounds are empty.
|
static LatLngBounds |
newInstance(LatLng sw,
LatLng ne)
creates A LatLngBounds instance represents a rectangle in geographical coordinates, including one that crosses the 180 degrees longitudinal meridian.
|
LatLng |
toSpan()
Converts the given map bounds to a lat/lng span.
|
String |
toUrlValue(int precision)
Returns a string of the form "lat_lo,lng_lo,lat_hi,lng_hi" for this bounds, where "lo" corresponds to the southwest corner of the bounding box, while "hi" corresponds to the northeast corner of that box.
|
LatLngBounds |
union(LatLngBounds other)
Extends this bounds to contain the union of this and the given bounds.
|
cast, createArray, createFunction, createObject, equals, hashCode, toSource, toString
protected LatLngBounds()
public static final LatLngBounds newInstance(LatLng sw, LatLng ne)
public final boolean contains(LatLng latlng)
latlng
- LatLng
public final boolean equals(LatLngBounds other)
other
- LatLngBounds
public final LatLngBounds extend(LatLng point)
point
- LatLng
LatLngBounds
public final LatLng getNorthEast()
LatLng
public final LatLng getSouthWest()
LatLng
public final boolean intersects(LatLngBounds other)
other
- LatLngBounds
public final boolean isEmpty()
public final String getToString()
public final String toUrlValue(int precision)
precision
- public final LatLngBounds union(LatLngBounds other)
other
- LatLngBounds
LatLngBounds
Copyright © 2011-2013 Gone Vertical LLC. All Rights Reserved.