Packagecom.yahoo.maps.api.core.location
Classpublic class BoundingBox

Defines an area over the map by a southwest and northeast corner LatLon objects.

See also

LatLon


Public Properties
 PropertyDefined by
  centerLatLon : LatLon
[read-only] The center LatLon point as defined by the bounds of this object.
BoundingBox
  latSpan : Number
[read-only] Returns the span of the bounding box on the latitude.
BoundingBox
  lonSpan : Number
[read-only] Returns the span of the bounding box on the longitude.
BoundingBox
  maxLat : Number
[read-only] The northwest latitude.
BoundingBox
  maxLon : Number
[read-only] The northwest longitude.
BoundingBox
  minLat : Number
[read-only] The southeast latitude.
BoundingBox
  minLon : Number
[read-only] The southeast longitude
BoundingBox
  northeast : LatLon
[read-only] A LatLon object defining the northeast corner of the rectangle.
BoundingBox
  northwest : LatLon
[read-only] A LatLon object defining the northwest corner of the rectangle.
BoundingBox
  southeast : LatLon
[read-only] A LatLon object defining the southeast corner of the rectangle.
BoundingBox
  southwest : LatLon
[read-only] A LatLon object defining the southwest corner of the rectangle.
BoundingBox
Public Methods
 MethodDefined by
  
BoundingBox(southwest:LatLon, northeast:LatLon)
Creates a new BoundingBox object.
BoundingBox
  
Creates a clone of this BoundingBox instance.
BoundingBox
  
contains(latlon:LatLon):Boolean
Returns true if the provided LatLon object in contained in this bounding box.
BoundingBox
  
getBoundingBox(points:Array):BoundingBox
[static] Returns a BoundingBox object that contains all LatLon points in the provided array.
BoundingBox
  
Returns a DistanceResult object containing the distances from this bounding box center LatLon to the provided bounding box center LatLon.
BoundingBox
  
toString():String
Returns a bbox string for use in location APIs such as Flickr.
BoundingBox
Property detail
centerLatLonproperty
centerLatLon:LatLon  [read-only]

The center LatLon point as defined by the bounds of this object.

Implementation
    public function get centerLatLon():LatLon

See also

latSpanproperty 
latSpan:Number  [read-only]

Returns the span of the bounding box on the latitude.

Implementation
    public function get latSpan():Number
lonSpanproperty 
lonSpan:Number  [read-only]

Returns the span of the bounding box on the longitude.

Implementation
    public function get lonSpan():Number
maxLatproperty 
maxLat:Number  [read-only]

The northwest latitude.

Implementation
    public function get maxLat():Number
maxLonproperty 
maxLon:Number  [read-only]

The northwest longitude.

Implementation
    public function get maxLon():Number
minLatproperty 
minLat:Number  [read-only]

The southeast latitude.

Implementation
    public function get minLat():Number
minLonproperty 
minLon:Number  [read-only]

The southeast longitude

Implementation
    public function get minLon():Number
northeastproperty 
northeast:LatLon  [read-only]

A LatLon object defining the northeast corner of the rectangle.

Implementation
    public function get northeast():LatLon
northwestproperty 
northwest:LatLon  [read-only]

A LatLon object defining the northwest corner of the rectangle.

Implementation
    public function get northwest():LatLon

See also

southeastproperty 
southeast:LatLon  [read-only]

A LatLon object defining the southeast corner of the rectangle.

Implementation
    public function get southeast():LatLon

See also

southwestproperty 
southwest:LatLon  [read-only]

A LatLon object defining the southwest corner of the rectangle.

Implementation
    public function get southwest():LatLon

See also

Constructor detail
BoundingBox()constructor
public function BoundingBox(southwest:LatLon, northeast:LatLon)

Creates a new BoundingBox object.

Parameters
southwest:LatLon — A LatLon object defining the northwest corner of the rectangle.
 
northeast:LatLon — A LatLon object defining the southeast corner of the rectangle.

See also

Method detail
clone()method
public function clone():BoundingBox

Creates a clone of this BoundingBox instance.

Returns
BoundingBox
contains()method 
public function contains(latlon:LatLon):Boolean

Returns true if the provided LatLon object in contained in this bounding box.

Parameters
latlon:LatLon

Returns
Boolean

See also

getBoundingBox()method 
public static function getBoundingBox(points:Array):BoundingBox

Returns a BoundingBox object that contains all LatLon points in the provided array.

Parameters
points:Array

Returns
BoundingBox

See also

getDistanceFrom()method 
public function getDistanceFrom(boundingBox:BoundingBox):DistanceResult

Returns a DistanceResult object containing the distances from this bounding box center LatLon to the provided bounding box center LatLon.

Parameters
boundingBox:BoundingBox

Returns
DistanceResult

See also

LatLon
Distance
DistanceResult
toString()method 
public function toString():String

Returns a bbox string for use in location APIs such as Flickr.

Returns
String