public class LatLngBounds
extends java.lang.Object
implements java.lang.Cloneable
Modifier and Type | Class and Description |
---|---|
static class |
LatLngBounds.Property |
Constructor and Description |
---|
LatLngBounds() |
LatLngBounds(LatLng sw,
LatLng ne) |
LatLngBounds(Map map,
LatLng sw,
LatLng ne) |
Modifier and Type | Method and Description |
---|---|
protected LatLngBounds |
clone() |
boolean |
contains(LatLng latLng)
Returns true if the given lat/lng is in this bounds.
|
protected com.teamdev.jxmaps.internal.JSValue |
createJSValue(Map map) |
boolean |
equals(LatLngBounds other)
Comparison function.
|
void |
extend(LatLng point)
Extends this bounds to contain the given point.
|
protected static LatLngBounds |
fromJSValue(com.teamdev.jxmaps.internal.JSValue value) |
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.
|
boolean |
intersects(LatLngBounds other)
Returns true if this bounds shares any points with this bounds.
|
boolean |
isEmpty()
Returns if the bounds are empty.
|
LatLng |
toSpan()
Converts the given map bounds to a lat/lng span.
|
java.lang.String |
toString()
Converts to string.
|
java.lang.String |
toUrlValue(double 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.
|
protected LatLngBounds clone()
clone
in class java.lang.Object
public boolean contains(LatLng latLng)
latLng
- source pointpublic boolean equals(LatLngBounds other)
other
- other objectpublic void extend(LatLng point)
point
- source pointpublic LatLng getCenter()
public LatLng getNorthEast()
public LatLng getSouthWest()
public boolean intersects(LatLngBounds other)
other
- other objectpublic boolean isEmpty()
public LatLng toSpan()
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toUrlValue(double precision)
precision
- precisionprotected com.teamdev.jxmaps.internal.JSValue createJSValue(Map map)
protected static LatLngBounds fromJSValue(com.teamdev.jxmaps.internal.JSValue value)
public LatLngBounds union(LatLngBounds other)
other
- other object