Extent

Represents geographical coordinates extent.

Constructor

new Extent(swopt, neopt)

Parameters:
NameTypeAttributesDescription
swLonLat<optional>

South West extent corner coordinates.

neLonLat<optional>

North East extent corner coordinates.

Methods

clone() → {Extent}

Creates clone instance of the current extent.

Returns:

Extent clone.

Type: 
Extent

equals(extent) → {boolean}

Returns extents are equals.

Parameters:
NameTypeDescription
extentExtent

Extent.

Returns:
Type: 
boolean

forwardMercator() → {Extent}

Converts extent coordinates to mercator projection coordinates.

Returns:

New instance of the current extent.

Type: 
Extent

getCartesianBounds(ellipsoid) → {Array.<number>}

Gets cartesian bounding bounds of the current ellipsoid.

Parameters:
NameTypeDescription
ellipsoidEllipsoid

Ellipsoid.

Returns:

Cartesian 3d coordinate array. (exactly 6 entries)

Type: 
Array.<number>

getCenter() → {number}

Gets the center coordinate of the extent.

Returns:

Center coordinate.

Type: 
number

getHeight() → {number}

Gets extent height.

Returns:

Extent height.

Type: 
number

getNorth()

getNorthEast()

getNorthWest()

getSouth()

getSouthEast()

getSouthWest()

getWest()

getWidth() → {number}

Gets extent width.

Returns:

Extent width.

Type: 
number

inverseMercator() → {Extent}

Converts extent coordinates from mercator projection to degrees.

Returns:

New instance of the current extent.

Type: 
Extent

isInside(lonlat) → {boolean}

Determines if point inside extent.

Parameters:
NameTypeDescription
lonlatLonLat

Coordinate point.

Returns:

Returns true if point inside extent.

Type: 
boolean

overlaps(e) → {boolean}

Returns true if two extent overlap each other.

Parameters:
NameTypeDescription
eExtent

Another extent.

Returns:
Type: 
boolean

setByCoordinates(arr) → {Extent}

Sets current bounding extent object by coordinate array.

Parameters:
NameTypeDescription
arrArray.<LonLat>

Coordinate array.

Returns:

Current extent.

Type: 
Extent

(static) createByCoordinates(arr) → {Extent}

Creates bound extent instance by coordinate array.

Parameters:
NameTypeDescription
arrArray.<LonLat>

Coordinate array.

Returns:

Extent object.

Type: 
Extent

(static) createByCoordinatesArr(arr) → {Extent}

Creates bound extent instance by coordinates array.

Parameters:
NameTypeDescription
arrArray.<Array.<number>>

Coordinate array. (exactly 2 entries)

Returns:

Extent object.

Type: 
Extent

(static) createFromArray(arr) → {Extent}

Creates extent instance from values in array.

Parameters:
NameTypeDescription
arrArray.<number>

South west and north-east longitude and latitudes packed in array. (exactly 4 entries)

Returns:

Extent object.

Type: 
Extent

(static) fromTile(x, y, z, width, height) → {Extent}

Creates extent by merŅator grid tile coordinates.

Parameters:
NameTypeDescription
xnumber
ynumber
znumber
widthnumber
heightnumber
Returns:
Type: 
Extent