Cartographic

Cartographic

new Cartographic

A position defined by longitude, latitude, and height.

Parameters:
Name Type Argument Default Description
longitude Number <optional>
0.0 The longitude, in radians.
latitude Number <optional>
0.0 The latitude, in radians.
height Number <optional>
0.0 The height, in meters, above the ellipsoid.
See:

Members

height :Number

The height, in meters, above the ellipsoid.

latitude :Number

The latitude, in radians.

longitude :Number

The longitude, in radians.

<static> ZERO

An immutable Cartographic instance initialized to (0.0, 0.0, 0.0).

Methods

clone

Duplicates this instance.

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

equals

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

Parameters:
Name Type Argument Description
right Cartographic <optional>
The second cartographic.
Returns:
Boolean true if left and right are equal, false otherwise.

equalsEpsilon

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

Parameters:
Name Type Argument Description
right Cartographic <optional>
The second cartographic.
epsilon Number The epsilon to use for equality testing.
Throws:
DeveloperError : epsilon is required and must be a number.
Returns:
Boolean true if left and right are within the provided epsilon, false otherwise.

toString

Creates a string representing this cartographic in the format '(longitude, latitude, height)'.

Returns:
String A string representing the provided cartographic in the format '(longitude, latitude, height)'.

<static> clone

Duplicates a Cartographic instance.

Parameters:
Name Type Argument Description
cartographic Cartographic The cartographic to duplicate.
result Cartographic <optional>
The object onto which to store the result.
Throws:
DeveloperError : cartographic is required.
Returns:
Cartographic The modified result parameter or a new Cartographic instance if one was not provided.

<static> equals

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

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

<static> equalsEpsilon

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

Parameters:
Name Type Argument Description
left Cartographic <optional>
The first cartographic.
right Cartographic <optional>
The second cartographic.
epsilon Number The epsilon to use for equality testing.
Throws:
DeveloperError : epsilon is required and must be a number.
Returns:
Boolean true if left and right are within the provided epsilon, false otherwise.

<static> fromDegrees

Creates a new Cartographic instance from longitude and latitude specified in degrees. The values in the resulting object will be in radians.

Parameters:
Name Type Argument Default Description
longitude Number <optional>
0.0 The longitude, in degrees.
latitude Number <optional>
0.0 The latitude, in degrees.
height Number <optional>
0.0 The height, in meters, above the ellipsoid.
result Cartographic <optional>
The object onto which to store the result.
Returns:
Cartographic The modified result parameter or a new Cartographic instance if one was not provided.

<static> toString

Creates a string representing the provided cartographic in the format '(longitude, latitude, height)'.

Parameters:
Name Type Description
cartographic Cartographic The cartographic to stringify.
Throws:
DeveloperError : cartographic is required.
Returns:
String A string representing the provided cartographic in the format '(longitude, latitude, height)'.