Extent

Extent

new

A two dimensional region specified as longitude and latitude coordinates.

Parameters:
Name Type Argument Default Description
west Number <optional>
0.0 The westernmost longitude, in radians, in the range [-Pi, Pi].
south Number <optional>
0.0 The southernmost latitude, in radians, in the range [-Pi/2, Pi/2].
east Number <optional>
0.0 The easternmost longitude, in radians, in the range [-Pi, Pi].
north Number <optional>
0.0 The northernmost latitude, in radians, in the range [-Pi/2, Pi/2].
Source:

Members

:Number

The easternmost longitude in radians in the range [-Pi, Pi].
Default Value:
  • 0.0

:Number

The northernmost latitude in radians in the range [-Pi/2, Pi/2].
Default Value:
  • 0.0

:Number

The southernmost latitude in radians in the range [-Pi/2, Pi/2].
Default Value:
  • 0.0

:Number

The westernmost longitude in radians in the range [-Pi, Pi].
Default Value:
  • 0.0

<static> :Extent

The largest possible extent.

Methods

Duplicates this Extent.

Parameters:
Name Type Argument Description
result Extent <optional>
The object onto which to store the result.
Returns:
Extent The modified result parameter or a new Extent instance if none was provided.

Compares the provided Extent with this Extent componentwise and returns true if they are equal, false otherwise.

Parameters:
Name Type Argument Description
other Extent <optional>
The Extent to compare.
Returns:
Boolean true if the Extents are equal, false otherwise.

Compares the provided Extent with this Extent componentwise and returns true if they are within the provided epsilon, false otherwise.

Parameters:
Name Type Argument Description
other Extent <optional>
The Extent to compare.
epsilon Number The epsilon to use for equality testing.
Returns:
Boolean true if the Extents are within the provided epsilon, false otherwise.

<static>

Duplicates an Extent.

Parameters:
Name Type Argument Description
extent Extent The extent to clone.
result Extent <optional>
The object onto which to store the result, or undefined if a new instance should be created.
Returns:
Extent The modified result parameter or a new Extent instance if none was provided. (Returns undefined if extent is undefined)

<static>

Returns true if the cartographic is on or inside the extent, false otherwise.

Parameters:
Name Type Description
extent Extent The extent
cartographic Cartographic The cartographic to test.
Returns:
Boolean true if the provided cartographic is inside the extent, false otherwise.

<static>

Compares the provided extents and returns true if they are equal, false otherwise.

Parameters:
Name Type Argument Description
left Extent <optional>
The first Extent.
right Extent <optional>
The second Extent.
Returns:
Boolean true if left and right are equal; otherwise false.

<static>

Creates the smallest possible Extent that encloses all positions in the provided array.

Parameters:
Name Type Argument Description
cartographics Array The list of Cartographic instances.
result Extent <optional>
The object onto which to store the result, or undefined if a new instance should be created.
Returns:
Extent The modified result parameter or a new Extent instance if none was provided.

<static>

Creates an extent given the boundary longitude and latitude in degrees.

Parameters:
Name Type Argument Default Description
west Number <optional>
0.0 The westernmost longitude in degrees in the range [-180.0, 180.0].
south Number <optional>
0.0 The southernmost latitude in degrees in the range [-90.0, 90.0].
east Number <optional>
0.0 The easternmost longitude in degrees in the range [-180.0, 180.0].
north Number <optional>
0.0 The northernmost latitude in degrees in the range [-90.0, 90.0].
result Extent <optional>
The object onto which to store the result, or undefined if a new instance should be created.
Returns:
Extent The modified result parameter or a new Extent instance if none was provided.
Example
var extent = Cesium.Extent.fromDegrees(0.0, 20.0, 10.0, 30.0);

<static>

Computes the center of an extent.

Parameters:
Name Type Argument Description
extent Extent The extent for which to find the center
result Cartographic <optional>
The object onto which to store the result.
Returns:
Cartographic The modified result parameter or a new Cartographic instance if none was provided.

<static>

Computes the northeast corner of an extent.

Parameters:
Name Type Argument Description
extent Extent The extent for which to find the corner
result Cartographic <optional>
The object onto which to store the result.
Returns:
Cartographic The modified result parameter or a new Cartographic instance if none was provided.

<static>

Computes the northwest corner of an extent.

Parameters:
Name Type Argument Description
extent Extent The extent for which to find the corner
result Cartographic <optional>
The object onto which to store the result.
Returns:
Cartographic The modified result parameter or a new Cartographic instance if none was provided.

<static>

Computes the southeast corner of an extent.

Parameters:
Name Type Argument Description
extent Extent The extent for which to find the corner
result Cartographic <optional>
The object onto which to store the result.
Returns:
Cartographic The modified result parameter or a new Cartographic instance if none was provided.

<static>

Computes the southwest corner of an extent.

Parameters:
Name Type Argument Description
extent Extent The extent for which to find the corner
result Cartographic <optional>
The object onto which to store the result.
Returns:
Cartographic The modified result parameter or a new Cartographic instance if none was provided.

<static>

Computes the intersection of two extents

Parameters:
Name Type Argument Description
extent Extent On extent to find an intersection
otherExtent Another extent to find an intersection
result Extent <optional>
The object onto which to store the result.
Returns:
Extent The modified result parameter or a new Extent instance if none was provided.

<static>

Determines if the extent is empty, i.e., if west >= east or south >= north.

Parameters:
Name Type Description
extent Extent The extent
Returns:
Boolean True if the extent is empty; otherwise, false.

<static>

Samples an extent so that it includes a list of Cartesian points suitable for passing to BoundingSphere#fromPoints. Sampling is necessary to account for extents that cover the poles or cross the equator.

Parameters:
Name Type Argument Default Description
extent Extent The extent to subsample.
ellipsoid Ellipsoid <optional>
Ellipsoid.WGS84 The ellipsoid to use.
surfaceHeight Number <optional>
0.0 The height of the extent above the ellipsoid.
result Array <optional>
The array of Cartesians onto which to store the result.
Returns:
Array The modified result parameter or a new Array of Cartesians instances if none was provided.

<static>

Checks an Extent's properties and throws if they are not in valid ranges.

Parameters:
Name Type Description
extent Extent The extent to validate
Throws: