new Cartographic(longitude, latitude, height)
The spatial position defined by longitude, latitude, and altitude.
| Name | Type | Default | Description |
|---|---|---|---|
longitude |
Number | 0.0 |
optional
Longitude measured in radians. |
latitude |
Number | 0.0 |
optional
Latitude measured in radians. |
height |
Number | 0.0 |
optional
The height measured in meters. |
- See:
Members
-
(static, constant) ZEROCartographic
-
The map instance is initialized to (0.0, 0.0, 0.0).
-
heightNumber
-
The height of an ellipsoid measured in meters.
- Default Value: 0.0
latitudeNumber
Latitude measured in radians.
- Default Value: 0.0
longitudeNumber
Longitude measured in radians.
- Default Value: 0.0
Methods
-
static clone(cartographic, result){Cartographic}
-
Copy the Cartographic instance.
Name Type Description cartographicCartographic The object to be copied.
resultCartographic optional The object that stores the results.
Returns:
Type Description Cartographic If the modified result parameters are not provided, return a new Cartographic instance; If the provided cartographical coordinates are undefined, return undefined. -
static equals(left, right){Boolean}
-
Compare two maps and return true if their values are equal, otherwise return false.
Name Type Description leftCartographic optional The first map.
rightCartographic optional The second map.
Returns:
Type Description Boolean Return true if the values of two maps are equal, otherwise return false. -
static equalsEpsilon(left, right, epsilon){Boolean}
-
Compare two maps and return true if their values are less than the specified value, otherwise return false.
Name Type Description leftCartographic optional The first map.
rightCartographic optional The second map.
epsilonNumber The value epsilon used for equivalence testing.
Returns:
Type Description Boolean If the values of two maps are less than the specified value, return true; otherwise, return false. -
static fromCartesian(cartesian, ellipsoid, result){Cartographic}
-
Create a Cartographic instance based on the Cartesian coordinates (Cartesian 3) position. The result data is measured in radians.
Name Type Default Description cartesianCartesian3 The Cartesian coordinates (Cartesian 3) position to be converted into a Cartesian representation.
ellipsoidEllipsoid Ellipsoid.WGS84 optional Ellipsoid body.
resultCartographic optional The object that stores the results.
Returns:
Type Description Cartographic If the modified result parameters are not provided, return a new Cartographic instance. -
static fromDegrees(longitude, latitude, height, result){Cartographic}
-
Create a Cartographic instance based on longitude and latitude values measured in degrees. The result data is measured in radians.
Name Type Default Description longitudeNumber Longitude measured in degrees.
latitudeNumber Latitude measured in degrees.
heightNumber 0.0 optional The height of an ellipsoid measured in meters.
resultCartographic optional The object that stores the results.
Returns:
Type Description Cartographic If the modified result parameters are not provided, return a new Cartographic instance. -
static fromRadians(longitude, latitude, height, result){Cartographic}
-
Create a Cartographic instance based on longitude and latitude values measured in radians.
Name Type Default Description longitudeNumber Longitude measured in radians.
latitudeNumber Latitude measured in radians.
heightNumber 0.0 optional The height of an ellipsoid measured in meters.
resultCartographic optional The object that stores the results.
Returns:
Type Description Cartographic If the modified result parameters are not provided, return a new Cartographic instance. -
static sphericalDistance(longitudeA, latitudeA, longitudeB, latitudeB){Number}
-
Calculate the spherical distance between two points.
Name Type Description longitudeANumber Specify the longitude of the first point in degrees.
latitudeANumber Specify the latitude of the first point in degrees.
longitudeBNumber Specify the longitude of the second point in degrees.
latitudeBNumber Specify the latitude of the second point in degrees.
Returns:
Type Description Number The distance value between two points. -
static toCartesian(cartographic, ellipsoid, result){Cartesian3}
-
Create a Cartesian (Cartesian3) instance based on the Cartographic coordinate position. The input value is in radians.
Name Type Default Description cartographicCartographic To be converted into Cartesian coordinates (Cartesian3) representing the Cartographic position.
ellipsoidEllipsoid Ellipsoid.WGS84 optional Ellipsoid body.
resultCartesian3 optional Object for storing results
Returns:
Type Description Cartesian3 If the modified result parameters are not provided, return a new Cartesian3 instance. -
toString(){String}
-
Create a string representing the map in the format of '(longitude, latitude, altitude)'.
Returns:
Type Description String A string representing a map in the format of '(longitude, latitude, altitude)'.