Class: Extent

og.Extent

new og.Extent(sw, ne)

Represents geographical coordinates extent.
Name Type Description
sw og.LonLat optional South West extent corner coordiantes.
ne og.LonLat optional North East extent corner coordiantes.

Members

static,constantog.Extent.FULL_MERC

Whole mercator extent.

static,constantog.Extent.NORTH_POLE_DEG

Degrees extent from north mercator limit to north pole.

static,constantog.Extent.SOUTH_POLE_DEG

Degrees extent from south pole to south mercator limit.

northEast

southWest

Methods

staticog.Extent.createByCoordinates(arr){og.Extent}

Creates bound extent instance by coordinate array.
Name Type Description
arr Array.<og.LonLat> Coordinate array.
Returns:
Type Description
og.Extent Extent object.

staticog.Extent.createFromArray(arr){og.Extent}

Creates extent instance from values in array.
Name Type Description
arr Array.<number, number, number, number> South west and north east longitude and latidudes packed in array.
Returns:
Type Description
og.Extent Extent object.

staticog.Extent.fromTile(x, y, z){og.Extent}

Creates extent by meractor grid tile coordinates.
Name Type Description
x number
y number
z number
Returns:
Type Description
og.Extent
Creates clone instance of the current extent.
Returns:
Type Description
og.Extent Extent clone.

equals(extent){boolean}

Returns extents are equals.
Name Type Description
extent og.Extent Extent.
Returns:
Type Description
boolean

forwardMercator(){og.Extent}

Converts extent coordinates to mercator projection coordinates.
Returns:
Type Description
og.Extent New instance of the current extent.

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

Gets cartesian bounding bounds of the current ellipsoid.
Name Type Description
ellipsoid og.Ellipsoid Ellipsoid.
Returns:
Type Description
Array.<number, number, number, number, number, number> Cartesian 3d coordinate array.

getCenter(){number}

Gets the center coordinate of the extent.
Returns:
Type Description
number Center coordinate.

getHeight(){number}

Gets extent height.
Returns:
Type Description
number Extent height.

getNorthEast()

getNorthWest()

getSouthEast()

getWidth(){number}

Gets extent width.
Returns:
Type Description
number Extent width.

inverseMercator(){og.Extent}

Converts extent coordinates from mercator projection to degrees.
Returns:
Type Description
og.Extent New instance of the current extent.

isInside(lonlat){boolean}

Determines if point inside extent.
Name Type Description
lonlat og.LonLat Coordinate point.
Returns:
Type Description
boolean Returns true if point inside extent.

overlaps(e){boolean}

Returns true if two extent overlap each other.
Name Type Description
e og.Extent Another extent.
Returns:
Type Description
boolean

setByCoordinates(arr){og.Extent}

Sets current bounding extent object by coordinate array.
Name Type Description
arr Array.<og.LonLat> Coordinate array.
Returns:
Type Description
og.Extent Current extent.