Cartographic

new Cesium.Cartographic(longitude, latitude, height)

A spatial location defined by longitude, latitude, and altitude.
Name Type Default Description
longitude Number 0.0 optional Longitude in radians.
latitude Number 0.0 optional Latitude in radians.
height Number 0.0 optional The height in meters.
See:

Members

staticconstantCesium.Cartographic.ZERO : Cartographic

The map instance is initialized to (0.0, 0.0, 0.0).

height : Number

The height of the ellipsoid in meters.
Default Value: 0.0

latitude : Number

Latitude in radians.
Default Value: 0.0

longitude : Number

Longitude in radians.
Default Value: 0.0

Methods

staticCesium.Cartographic.clone(cartographic, result)Cartographic

Copy the Cartographic instance.
Name Type Description
cartographic Cartographic The object to be copied.
result Cartographic optional The object used to store the result.
Returns:
The modified result parameter, if not provided, returns a new Cartographic instance; if the provided cartographic coordinates are undefined, return undefined.

staticCesium.Cartographic.equals(left, right)Boolean

Compare two maps and return true if their values are equal, otherwise return false.
Name Type Description
left Cartographic optional The first map.
right Cartographic optional The second map.
Returns:
If the values of the two maps are equal, return true, otherwise return false.

staticCesium.Cartographic.equalsEpsilon(left, right, epsilon)Boolean

Compare two maps and return true if their value is less than the specified value, otherwise return false.
Name Type Description
left Cartographic optional The first map.
right Cartographic optional The second map.
epsilon Number The value epsilon used for equivalence testing.
Returns:
If the values of the two maps are less than the specified value, return true, otherwise return false.

staticCesium.Cartographic.fromCartesian(cartesian, ellipsoid, result)Cartographic

Create a Cartographic instance based on Cartesian coordinates (Cartesian3) position. The result data is in radians.
Name Type Default Description
cartesian Cartesian3 To be converted into Cartographic representation of Cartesian coordinates (Cartesian3) position.
ellipsoid Ellipsoid Ellipsoid.WGS84 optional Ellipsoid.
result Cartographic optional The object that stores the result.
Returns:
The modified result parameter, if not provided, returns a new Cartographic instance.

staticCesium.Cartographic.fromDegrees(longitude, latitude, height, result)Cartographic

Create a Cartographic instance based on the latitude and longitude values in degrees. The result data is in radians.
Name Type Default Description
longitude Number Longitude in degrees.
latitude Number Latitude in degrees.
height Number 0.0 optional The height of the ellipsoid in meters.
result Cartographic optional The object used to store the result.
Returns:
The modified result parameter, if not provided, returns a new Cartographic instance.

staticCesium.Cartographic.fromRadians(longitude, latitude, height, result)Cartographic

Create a Cartographic instance based on the latitude and longitude values in radians.
Name Type Default Description
longitude Number The longitude in radians.
latitude Number Latitude in radians.
height Number 0.0 optional The height of the ellipsoid in meters.
result Cartographic optional The object used to store the result.
Returns:
The modified result parameter, if not provided, returns a new Cartographic instance.

staticCesium.Cartographic.sphericalDistance(longitudeA, latitudeA, longitudeB, latitudeB)Number

Calculate the spherical distance between two points.
Name Type Description
longitudeA Number Specify the longitude of the first point in degrees.
latitudeA Number Specify the latitude of the first point in degrees.
longitudeB Number Specify the longitude of the second point in degrees.
latitudeB Number Specify the latitude of the second point in degrees.
Returns:
The value of the distance between two points.

toString()String

Create a string representing the map in the format of'(longitude, latitude, altitude)'.
Returns:
A string representing the map in the format of'(longitude, latitude, altitude)'.