WebMercatorProjection

Google Maps、Bing Maps和大多数ArcGIS Online使用的地图投影,EPSG:3857。此 投影使用WGS84表示的经度和纬度,并使用 球面(而非椭球面)方程将其转换为墨卡托投影。

new Cesium.WebMercatorProjection(ellipsoid)

Name Type Default Description
ellipsoid Ellipsoid Ellipsoid.WGS84 optional 椭球体。
See:

Members

static Cesium.WebMercatorProjection.MaximumLatitude : number

Web墨卡托(EPSG:3857)投影支持的最大纬度(北纬和南纬)。从技术上讲,墨卡托投影定义为支持任何纬度最高到(但不包括)90度,但由于纬度增加时投影会指数增长,因此提前截止是合理的。这个特定截止值的逻辑(被Google Maps、Bing Maps和Esri采用)是使投影成为正方形,即矩形在X和Y方向上相等。 该常量值通过调用以下方法计算: WebMercatorProjection.mercatorAngleToGeodeticLatitude(Math.PI)
获取Ellipsoid

Methods

static Cesium.WebMercatorProjection.geodeticLatitudeToMercatorAngle(latitude)number

将弧度表示的大地纬度(范围-PI/2到PI/2)转换为 范围在-PI到PI之间的墨卡托角度。
Name Type Description
latitude number 大地纬度(弧度)。
Returns:
墨卡托角度。

static Cesium.WebMercatorProjection.mercatorAngleToGeodeticLatitude(mercatorAngle)number

将范围在-PI到PI之间的墨卡托角度转换为 范围在-PI/2到PI/2之间的大地纬度。
Name Type Description
mercatorAngle number 要转换的角度。
Returns:
大地纬度(弧度)。
将弧度表示的大地椭球坐标转换为等效的Web墨卡托 X、Y、Z坐标(以米为单位),并在Cartesian3中返回。高度 将未经修改地复制到Z坐标。
Name Type Description
cartographic Cartographic 大地坐标(弧度)。
result Cartesian3 optional 要将结果复制到的实例,如果应创建新实例则为undefined。
Returns:
等效的Web墨卡托X、Y、Z坐标(以米为单位)。
将以米为单位表示的Web墨卡托X、Y坐标转换为包含 大地椭球坐标的Cartographic。Z坐标将未经修改地 复制到高度。
Name Type Description
cartesian Cartesian3 要反投影的Web墨卡托笛卡尔位置,高度(z)以米为单位。
result Cartographic optional 要将结果复制到的实例,如果应创建新实例则为undefined。
Returns:
等效的大地坐标。
Need help? The fastest way to get answers is from the community and team on the Cesium Forum.