由经度、纬度和高度定义的位置。 A position defined by longitude, latitude, and height.
| 名称 Name | 类型 Type | 默认值 Default | 说明 Description |
|---|---|---|---|
longitude |
number |
0.0
|
可选 optional 经度,以弧度为单位。 The longitude, in radians. |
latitude |
number |
0.0
|
可选 optional 纬度,以弧度为单位。 The latitude, in radians. |
height |
number |
0.0
|
可选 optional 椭球体上方的高度(以米为单位)。 The height, in meters, above the ellipsoid. |
另见: See:
成员 Members
static constant Cesium.Cartographic.ZERO : Cartographic
初始化为 (0.0, 0.0, 0.0) 的不可变制图实例。 An immutable Cartographic instance initialized to (0.0, 0.0, 0.0).
椭球体上方的高度(以米为单位)。 The height, in meters, above the ellipsoid.
-
默认值: Default Value:
0.0
纬度,以弧度为单位。 The latitude, in radians.
-
默认值: Default Value:
0.0
经度,以弧度为单位。 The longitude, in radians.
-
默认值: Default Value:
0.0
方法 Methods
static Cesium.Cartographic.clone(cartographic, result) → Cartographic
复制制图实例。 Duplicates a Cartographic instance.
| 名称 Name | 类型 Type | 说明 Description |
|---|---|---|
cartographic |
Cartographic | 要复制的地图。 The cartographic to duplicate. |
result |
Cartographic | 可选 optional 用于存储结果的对象。 The object onto which to store the result. |
返回: Returns:
修改后的结果参数或新的制图实例(如果未提供)。 (如果制图未定义,则返回未定义) The modified result parameter or a new Cartographic instance if one was not provided. (Returns undefined if cartographic is undefined)
按组件比较提供的制图并返回 Compares the provided cartographics componentwise and returns
true 如果它们相等, if they are equal, false otherwise.
| 名称 Name | 类型 Type | 说明 Description |
|---|---|---|
left |
Cartographic | 可选 optional 第一张地图。 The first cartographic. |
right |
Cartographic | 可选 optional 第二张地图。 The second cartographic. |
返回: Returns:
true 如果左和右相等, if left and right are equal, false otherwise.
按组件比较提供的制图并返回 Compares the provided cartographics componentwise and returns
true 如果它们在提供的 epsilon 范围内, if they are within the provided epsilon,
false otherwise.
| 名称 Name | 类型 Type | 默认值 Default | 说明 Description |
|---|---|---|---|
left |
Cartographic | 可选 optional 第一张地图。 The first cartographic. | |
right |
Cartographic | 可选 optional 第二张地图。 The second cartographic. | |
epsilon |
number |
0
|
可选 optional 用于相等性测试的 epsilon。 The epsilon to use for equality testing. |
返回: Returns:
true 如果 left 和 right 在提供的 epsilon 范围内, if left and right are within the provided epsilon, false otherwise.
static Cesium.Cartographic.fromCartesian(cartesian, ellipsoid, result) → Cartographic
从笛卡尔位置创建一个新的制图实例。结果对象中的值将以弧度为单位。 Creates a new Cartographic instance from a Cartesian position. The values in the resulting object will be in radians.
| 名称 Name | 类型 Type | 默认值 Default | 说明 Description |
|---|---|---|---|
cartesian |
Cartesian3 | 要转换为制图表示的笛卡尔位置。 The Cartesian position to convert to cartographic representation. | |
ellipsoid |
Ellipsoid |
Ellipsoid.default
|
可选 optional 位置所在的椭球体。 The ellipsoid on which the position lies. |
result |
Cartographic | 可选 optional 用于存储结果的对象。 The object onto which to store the result. |
返回: Returns:
修改后的结果参数,如果未提供则为新的制图实例,如果笛卡尔位于椭球体的中心则为未定义。 The modified result parameter, new Cartographic instance if none was provided, or undefined if the cartesian is at the center of the ellipsoid.
static Cesium.Cartographic.fromDegrees(longitude, latitude, height, result) → Cartographic
根据以度为单位指定的经度和纬度创建新的制图实例。结果对象中的值将以弧度为单位。 Creates a new Cartographic instance from longitude and latitude specified in degrees. The values in the resulting object will be in radians.
| 名称 Name | 类型 Type | 默认值 Default | 说明 Description |
|---|---|---|---|
longitude |
number | 经度,以度为单位。 The longitude, in degrees. | |
latitude |
number | 纬度,以度为单位。 The latitude, in degrees. | |
height |
number |
0.0
|
可选 optional 椭球体上方的高度(以米为单位)。 The height, in meters, above the ellipsoid. |
result |
Cartographic | 可选 optional 用于存储结果的对象。 The object onto which to store the result. |
返回: Returns:
修改后的结果参数或新的制图实例(如果未提供)。 The modified result parameter or a new Cartographic instance if one was not provided.
static Cesium.Cartographic.fromRadians(longitude, latitude, height, result) → Cartographic
根据以弧度指定的经度和纬度创建新的制图实例。 Creates a new Cartographic instance from longitude and latitude specified in radians.
| 名称 Name | 类型 Type | 默认值 Default | 说明 Description |
|---|---|---|---|
longitude |
number | 经度,以弧度为单位。 The longitude, in radians. | |
latitude |
number | 纬度,以弧度为单位。 The latitude, in radians. | |
height |
number |
0.0
|
可选 optional 椭球体上方的高度(以米为单位)。 The height, in meters, above the ellipsoid. |
result |
Cartographic | 可选 optional 用于存储结果的对象。 The object onto which to store the result. |
返回: Returns:
修改后的结果参数或新的制图实例(如果未提供)。 The modified result parameter or a new Cartographic instance if one was not provided.
static Cesium.Cartographic.toCartesian(cartographic, ellipsoid, result) → Cartesian3
从制图输入创建一个新的 Cartesian3 实例。输入对象中的值应以弧度为单位。 Creates a new Cartesian3 instance from a Cartographic input. The values in the inputted object should be in radians.
| 名称 Name | 类型 Type | 默认值 Default | 说明 Description |
|---|---|---|---|
cartographic |
Cartographic | 要转换为 Cartesian3 输出的输入。 Input to be converted into a Cartesian3 output. | |
ellipsoid |
Ellipsoid |
Ellipsoid.default
|
可选 optional 位置所在的椭球体。 The ellipsoid on which the position lies. |
result |
Cartesian3 | 可选 optional 用于存储结果的对象。 The object onto which to store the result. |
返回: Returns:
位置 The position
clone(result) → Cartographic
复制此实例。 Duplicates this instance.
| 名称 Name | 类型 Type | 说明 Description |
|---|---|---|
result |
Cartographic | 可选 optional 用于存储结果的对象。 The object onto which to store the result. |
返回: Returns:
修改后的结果参数或新的制图实例(如果未提供)。 The modified result parameter or a new Cartographic instance if one was not provided.
将提供的内容与此制图组件进行比较并返回 Compares the provided against this cartographic componentwise and returns
true 如果它们相等, if they are equal, false otherwise.
| 名称 Name | 类型 Type | 说明 Description |
|---|---|---|
right |
Cartographic | 可选 optional 第二张地图。 The second cartographic. |
返回: Returns:
true 如果左和右相等, if left and right are equal, false otherwise.
将提供的内容与此制图组件进行比较并返回 Compares the provided against this cartographic componentwise and returns
true 如果它们在提供的 epsilon 范围内, if they are within the provided epsilon,
false otherwise.
| 名称 Name | 类型 Type | 默认值 Default | 说明 Description |
|---|---|---|---|
right |
Cartographic | 可选 optional 第二张地图。 The second cartographic. | |
epsilon |
number |
0
|
可选 optional 用于相等性测试的 epsilon。 The epsilon to use for equality testing. |
返回: Returns:
true 如果 left 和 right 在提供的 epsilon 范围内, if left and right are within the provided epsilon, false otherwise.
创建一个以“(经度、纬度、高度)”格式表示该地图的字符串。 Creates a string representing this cartographic in the format '(longitude, latitude, height)'.
返回: Returns:
表示所提供地图的字符串,格式为“(经度、纬度、高度)”。 A string representing the provided cartographic in the format '(longitude, latitude, height)'.
