http://www.google.com/apis/maps/documentation/
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 | Description |
---|---|
GBounds(points) | Constructs a rectangle that contains all the given points. |
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 | 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. |
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 | Description |
---|---|
GBounds(minX, minY, maxX, maxY) | Creates a new bounds with the given coordinates |
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 |