WebMercatorProjection

The map projection used by Google Maps, Bing Maps, and most of ArcGIS Online, EPSG:3857. This projection use longitude and latitude expressed with the WGS84 and transforms them to Mercator using the spherical (rather than ellipsoidal) equations.

new Cesium.WebMercatorProjection(ellipsoid)

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

Members

static Cesium.WebMercatorProjection.MaximumLatitude : number

Web Mercator(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 Mercator X、Y、Z 坐标(以米为单位),并在 Cartesian3 中返回。高度将不加修改地复制到 Z 坐标。
Name Type Description
cartographic Cartographic 以弧度表示的地理坐标(cartographic coordinates)。
result Cartesian3 optional 要将结果复制到的实例,如果要创建新实例则为 undefined。
Returns:
等价的 web mercator X、Y、Z 坐标,以米为单位。
将以米表示的 Web Mercator X、Y 坐标转换为包含测地椭球坐标的 Cartographic。Z 坐标不加修改地复制到高度。
Name Type Description
cartesian Cartesian3 要进行反投影的 web mercator 笛卡尔位置,其高度(z)以米为单位。
result Cartographic optional 要将结果复制到的实例,如果要创建新实例则为 undefined。
Returns:
等价的地理坐标(cartographic coordinates)。
需要帮助?获取答案的最快方式是在 Cesium 论坛 上向社区和团队提问。.