Package | com.google.maps |
Class | public class LatLngBounds |
Method | Defined by | ||
---|---|---|---|
Constructs a LatLngBounds from two LatLng instances, holding the
SW extent and NE extent, respectively.
| LatLngBounds | ||
Creates a clone of this instance.
| LatLngBounds | ||
containsBounds(other:LatLngBounds):Boolean
Returns true if this bounds completely contains the given bounds.
| LatLngBounds | ||
containsLatLng(point:LatLng):Boolean
Returns true if the given lat/lng is in this bounds.
| LatLngBounds | ||
equals(other:LatLngBounds):Boolean
Returns true if this bounds equals the given bound,
allowing for numerical rounding errors.
| LatLngBounds | ||
Extends this bounds to contain the given point.
| LatLngBounds | ||
Computes the center of this LatLngBounds
| LatLngBounds | ||
getEast():Number
Returns the east longitude of this bounds.
| LatLngBounds | ||
getNorth():Number
Returns the north latitude of this bounds.
| LatLngBounds | ||
Returns the north-east corner of this bounds.
| LatLngBounds | ||
Returns the north-west corner of this bounds.
| LatLngBounds | ||
getSouth():Number
Returns the south latitude of this bounds.
| LatLngBounds | ||
Returns the south-east corner of this bounds.
| LatLngBounds | ||
Returns the south-west corner of this bounds.
| LatLngBounds | ||
getWest():Number
Returns the west longitude of this bounds.
| LatLngBounds | ||
intersects(other:LatLngBounds):Boolean
Returns true if this bounds shares any points with this bounds.
| LatLngBounds | ||
isEmpty():Boolean
Returns true if the bounds are empty.
| LatLngBounds | ||
isFullLat():Boolean
Returns true if the bounds cover all latitudes.
| LatLngBounds | ||
isFullLng():Boolean
Returns true if the bounds cover all longitudes.
| LatLngBounds | ||
isLargerThan(other:LatLngBounds):Boolean
Returns true if this bounds is larger than (could contain) the other.
| LatLngBounds | ||
Converts the given map bounds to a lat/lng span.
| LatLngBounds | ||
toString():String
Converts this LatLngBounds to a string.
| LatLngBounds | ||
union(other:LatLngBounds):void
Extends this bounds to contain the union of this and the given bounds.
| LatLngBounds |
LatLngBounds | () | constructor |
public function LatLngBounds(opt_sw:LatLng = null, opt_ne:LatLng = null)
Constructs a LatLngBounds from two LatLng instances, holding the SW extent and NE extent, respectively. A LatLngBounds instance represents a rectangle in geographical coordinates, including one that crosses the 180 degrees meridian.
Parametersopt_sw:LatLng (default = null ) — South-west corner (optional).
|
|
opt_ne:LatLng (default = null ) — North-east corner (optional).
|
var bounds:LatLngBounds = new LatLngBounds( new LatLng(10, 50), // spans 1 degree latitude new LatLng(11, 52)); // and 2 degrees longitude
clone | () | method |
public function clone():LatLngBounds
Creates a clone of this instance.
ReturnsLatLngBounds —
Clone of this instance.
|
containsBounds | () | method |
public function containsBounds(other:LatLngBounds):Boolean
Returns true if this bounds completely contains the given bounds.
Parametersother:LatLngBounds — Contained LatLngBounds.
|
Boolean — true if this contains other.
|
var bounds:LatLngBounds = new LatLngBounds( new LatLng(10, 50), new LatLng(20, 70)); trace(bounds.containsBounds( new LatLngBounds( new LatLng(11, 12), new LatLng(52, 68))); // outputs true
containsLatLng | () | method |
public function containsLatLng(point:LatLng):Boolean
Returns true if the given lat/lng is in this bounds.
Parameterspoint:LatLng — Test point.
|
Boolean — true if this contains point.
|
var bounds:LatLngBounds = new LatLngBounds( new LatLng(10, 50), new LatLng(20, 70)); trace(bounds.containsLatLng(new LatLng(15, 51))); // outputs true trace(bounds.containsLatLng(new LatLng(29, 51))); // outputs false
equals | () | method |
public function equals(other:LatLngBounds):Boolean
Returns true if this bounds equals the given bound, allowing for numerical rounding errors.
Parametersother:LatLngBounds — LatLngBounds against which to compare.
|
Boolean — true if this is equal to other.
|
extend | () | method |
public function extend(point:LatLng):void
Extends this bounds to contain the given point.
Parameterspoint:LatLng — Point to add.
|
var bounds:LatLngBounds = new LatLngBounds( new LatLng(1, 5), new LatLng(2, 7)); bounds.extend(new LatLng(0, 9)); trace(bounds.toString()); // outputs "((0, 5), (2, 9))"
getCenter | () | method |
public function getCenter():LatLng
Computes the center of this LatLngBounds
ReturnsLatLng —
Center of bounds.
|
var bounds:LatLngBounds = new LatLngBounds( new LatLng(10, 50), new LatLng(20, 70)); trace(bounds.getCenter()); // outputs "(15, 60)"
getEast | () | method |
public function getEast():Number
Returns the east longitude of this bounds.
ReturnsNumber — East longitude.
|
getNorth | () | method |
public function getNorth():Number
Returns the north latitude of this bounds.
ReturnsNumber — North latitude.
|
getNorthEast | () | method |
public function getNorthEast():LatLng
Returns the north-east corner of this bounds.
ReturnsLatLng —
North-east corner.
|
getNorthWest | () | method |
public function getNorthWest():LatLng
Returns the north-west corner of this bounds.
ReturnsLatLng —
North-west corner.
|
getSouth | () | method |
public function getSouth():Number
Returns the south latitude of this bounds.
ReturnsNumber — South latitude.
|
getSouthEast | () | method |
public function getSouthEast():LatLng
Returns the south-east corner of this bounds.
ReturnsLatLng —
South-east corner.
|
getSouthWest | () | method |
public function getSouthWest():LatLng
Returns the south-west corner of this bounds.
ReturnsLatLng —
South-west corner.
|
getWest | () | method |
public function getWest():Number
Returns the west longitude of this bounds.
ReturnsNumber — West longitude.
|
intersects | () | method |
public function intersects(other:LatLngBounds):Boolean
Returns true if this bounds shares any points with this bounds.
Parametersother:LatLngBounds — Test LatLngBounds.
|
Boolean — true if this intersects other.
|
isEmpty | () | method |
public function isEmpty():Boolean
Returns true if the bounds are empty.
ReturnsBoolean — true if this bounds is empty.
|
isFullLat | () | method |
public function isFullLat():Boolean
Returns true if the bounds cover all latitudes.
ReturnsBoolean — true if this bounds covers all latitudes.
|
isFullLng | () | method |
public function isFullLng():Boolean
Returns true if the bounds cover all longitudes.
ReturnsBoolean — true if this bounds covers all longitudes.
|
isLargerThan | () | method |
public function isLargerThan(other:LatLngBounds):Boolean
Returns true if this bounds is larger than (could contain) the other.
Parametersother:LatLngBounds |
Boolean — true if this is larger than other.
|
toSpan | () | method |
public function toSpan():LatLng
Converts the given map bounds to a lat/lng span.
ReturnsLatLng —
Span of this bound.
|
var bounds:LatLngBounds = new LatLngBounds( new LatLng(10, 50), new LatLng(20, 70)); trace(bounds.toSpan()); // outputs "(10, 20)"
toString | () | method |
public function toString():String
Converts this LatLngBounds to a string.
ReturnsString — This LatLngBounds as a string.
|
var bounds:LatLngBounds = new LatLngBounds( new LatLng(1, 5), new LatLng(2, 7)); trace(bounds.toString()); // outputs "((1, 5), (2, 7))"
union | () | method |
public function union(other:LatLngBounds):void
Extends this bounds to contain the union of this and the given bounds.
Parametersother:LatLngBounds — LatLngBounds to union with.
|
var bounds:LatLngBounds = new LatLngBounds( new LatLng(0, 0), new LatLng(1, 1)); bounds.union( new LatLngBounds( new LatLng(10, 20), new LatLng(15, 22))); trace(bounds.toString()); // outputs "((0, 0), (15, 22))"