GBounds [class]-GoogleMaps/API/doc/ClassReference/13-GBounds-N☆E 学習帳

[ リロード ]   [ ソース ]  [ トップ | 一覧 | 単語検索 | 最新 | バックアップ | ヘルプ ]

Counter: 2923, today: 2, yesterday: 3

GBounds [class]

http://www.google.com/apis/maps/docu­mentation/

Version 2 (2006.4)

GBounds is a rectangular area of the map in pixel coordinates. Notice that a rectangle in geographical coordinates is represented by a GLatLngBounds object.

Constructor

Constructor Description
GBounds(points) Constructs a rectangle that contains all the given points.

 

Properties

Properties Type Description
minX Number The x coordinate of the left edge of the rectangle.
minY Number The y coordinate of the top edge of the rectangle.
maxX Number The x coordinate of the right edge of the rectangle.
maxY Number The y coordinate of the bottom edge of the rectangle.

 

Methods

Methods Return Value Description
toString() String Returns a string that contains the coordinates of the upper left and the lower right corner points of the box, in this order, separated by comma, surrounded by parentheses.
min() GPoint The point at the upper left corner of the box.
max() GPoint The point at the lower right corner of the box.
containsBounds(other) Boolean Returns true iff the other box is entirely contained in this box.
extend(point) none Enlarges this box so that the point is also contained in this box.
intersection(other) GBounds Returns the box by which this box overlaps the other box. If there is no overlap, returns an empty box.

 
 

Version 1

GBounds represents a 2-dimensional bounding box. If the GBounds is in the lat/lng coordinate system, the X coordinates represent longitude, and the Y coordinates represent latitude. If the lat/lng bounds crosses the international date line, the "minimum" coordinates refer to the top left coordinates rather than the mathematical minmum of the two coordinates.

Constructor

Constructor Description
GBounds(minX, minY, maxX, maxY) Creates a new bounds with the given coordinates

 

Properties

Property Description
minX The X coordinate of the top left corner of the bounds
minY The Y coordinate of the top left corner of the bounds
maxX The X coordinate of the bottom right corner of the bounds
maxY The Y coordinate of the bottom right corner of the bounds