Constructor
new Extent(swopt, neopt)
Name | Type | Attributes | Description |
---|---|---|---|
sw | LonLat | <optional> | South West extent corner coordinates. |
ne | LonLat | <optional> | North East extent corner coordinates. |
Methods
clone() → {Extent}
Creates clone instance of the current extent.
Extent clone.
- Type:
- Extent
equals(extent) → {boolean}
Returns extents are equals.
Name | Type | Description |
---|---|---|
extent | Extent | Extent. |
- Type:
- boolean
forwardMercator() → {Extent}
Converts extent coordinates to mercator projection coordinates.
New instance of the current extent.
- Type:
- Extent
getCartesianBounds(ellipsoid) → {Array.<number>}
Gets cartesian bounding bounds of the current ellipsoid.
Name | Type | Description |
---|---|---|
ellipsoid | Ellipsoid | Ellipsoid. |
Cartesian 3d coordinate array. (exactly 6 entries)
- Type:
- Array.<number>
getCenter() → {number}
Gets the center coordinate of the extent.
Center coordinate.
- Type:
- number
getHeight() → {number}
Gets extent height.
Extent height.
- Type:
- number
getNorth()
getNorthEast()
getNorthWest()
getSouth()
getSouthEast()
getSouthWest()
getWest()
getWidth() → {number}
Gets extent width.
Extent width.
- Type:
- number
inverseMercator() → {Extent}
Converts extent coordinates from mercator projection to degrees.
New instance of the current extent.
- Type:
- Extent
isInside(lonlat) → {boolean}
Determines if point inside extent.
Name | Type | Description |
---|---|---|
lonlat | LonLat | Coordinate point. |
Returns true if point inside extent.
- Type:
- boolean
overlaps(e) → {boolean}
Returns true if two extent overlap each other.
Name | Type | Description |
---|---|---|
e | Extent | Another extent. |
- Type:
- boolean
setByCoordinates(arr) → {Extent}
Sets current bounding extent object by coordinate array.
Name | Type | Description |
---|---|---|
arr | Array.<LonLat> | Coordinate array. |
Current extent.
- Type:
- Extent
(static) createByCoordinates(arr) → {Extent}
Creates bound extent instance by coordinate array.
Name | Type | Description |
---|---|---|
arr | Array.<LonLat> | Coordinate array. |
Extent object.
- Type:
- Extent
(static) createByCoordinatesArr(arr) → {Extent}
Creates bound extent instance by coordinates array.
Name | Type | Description |
---|---|---|
arr | Array.<Array.<number>> | Coordinate array. (exactly 2 entries) |
Extent object.
- Type:
- Extent
(static) createFromArray(arr) → {Extent}
Creates extent instance from values in array.
Name | Type | Description |
---|---|---|
arr | Array.<number> | South west and north-east longitude and latitudes packed in array. (exactly 4 entries) |
Extent object.
- Type:
- Extent
(static) fromTile(x, y, z, width, height) → {Extent}
Creates extent by merŅator grid tile coordinates.
Name | Type | Description |
---|---|---|
x | number | |
y | number | |
z | number | |
width | number | |
height | number |
- Type:
- Extent