English中文

WebMercatorProjection

new Cesium.WebMercatorProjection(ellipsoid)

Google 地图、Bing 地图和大部分 ArcGIS Online 使用的地图投影,EPSG:3857。该投影使用 WGS84 表示的经度和纬度,并使用球面(而不是椭圆体)方程将它们转换为墨卡托投影。 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.
名称 Name 类型 Type 默认值 Default 说明 Description
ellipsoid Ellipsoid Ellipsoid.WGS84 可选 optional 椭球体。 The ellipsoid.
另见: See:

成员 Members

static Cesium.WebMercatorProjection.MaximumLatitude : number

Web 墨卡托 (EPSG:3857) 投影支持的最大纬度(北纬和南纬)。从技术上讲,墨卡托投影是针对 90 度以内(但不包括)的任何纬度定义的,但尽早切断它是有意义的,因为它随着纬度的增加呈指数增长。 Google 地图、Bing 地图和 Esri 使用的这一特定截止值背后的逻辑是,它使投影成为正方形。即,矩形在X和Y方向上相等。常量值通过调用计算:WebMercatorProjection.mercatorAngleToGeodeticLatitude(Math.PI) The maximum latitude (both North and South) supported by a Web Mercator (EPSG:3857) projection. Technically, the Mercator projection is defined for any latitude up to (but not including) 90 degrees, but it makes sense to cut it off sooner because it grows exponentially with increasing latitude. The logic behind this particular cutoff value, which is the one used by Google Maps, Bing Maps, and Esri, is that it makes the projection square. That is, the rectangle is equal in the X and Y directions. The constant value is computed by calling: WebMercatorProjection.mercatorAngleToGeodeticLatitude(Math.PI)
得到 Gets the Ellipsoid.

方法 Methods

static Cesium.WebMercatorProjection.geodeticLatitudeToMercatorAngle(latitude)number

将 -PI/2 到 PI/2 范围内的以弧度表示的大地纬度转换为 -PI 到 PI 范围内的墨卡托角。 Converts a geodetic latitude in radians, in the range -PI/2 to PI/2, to a Mercator angle in the range -PI to PI.
名称 Name 类型 Type 说明 Description
latitude number 以弧度为单位的大地纬度。 The geodetic latitude in radians.
返回: Returns:
墨卡托角。 The Mercator angle.

static Cesium.WebMercatorProjection.mercatorAngleToGeodeticLatitude(mercatorAngle)number

将 -PI 到 PI 范围内的墨卡托角转换为 -PI/2 到 PI/2 范围内的大地纬度。 Converts a Mercator angle, in the range -PI to PI, to a geodetic latitude in the range -PI/2 to PI/2.
名称 Name 类型 Type 说明 Description
mercatorAngle number 要转换的角度。 The angle to convert.
返回: Returns:
以弧度为单位的大地纬度。 The geodetic latitude in radians.
将大地椭球坐标(以弧度为单位)转换为以米为单位的等效 Web 墨卡托 X、Y、Z 坐标并以 a 形式返回 Converts geodetic ellipsoid coordinates, in radians, to the equivalent Web Mercator X, Y, Z coordinates expressed in meters and returned in a Cartesian3。高度将不加修改地复制到 Z 坐标。 . The height is copied unmodified to the Z coordinate.
名称 Name 类型 Type 说明 Description
cartographic Cartographic 以弧度表示的制图坐标。 The cartographic coordinates in radians.
result Cartesian3 可选 optional 将结果复制到的实例,如果应创建新实例,则为未定义。 The instance to which to copy the result, or undefined if a new instance should be created.
返回: Returns:
等效网络墨卡托 X、Y、Z 坐标(以米为单位)。 The equivalent web mercator X, Y, Z coordinates, in meters.
将 Web 墨卡托 X、Y 坐标(以米为单位)转换为 Converts Web Mercator X, Y coordinates, expressed in meters, to a Cartographic 包含大地椭球坐标。 Z 坐标不加修改地复制到高度。 containing geodetic ellipsoid coordinates. The Z coordinate is copied unmodified to the height.
名称 Name 类型 Type 说明 Description
cartesian Cartesian3 网络墨卡托笛卡尔位置取消投影高度 (z)(以米为单位)。 The web mercator Cartesian position to unrproject with height (z) in meters.
result Cartographic 可选 optional 将结果复制到的实例,如果应创建新实例,则为未定义。 The instance to which to copy the result, or undefined if a new instance should be created.
返回: Returns:
等效地图坐标。 The equivalent cartographic coordinates.
需要帮助吗?获得答案的最快方法是从社区和团队那里获得答案 Need help? The fastest way to get answers is from the community and team on the Cesium Forum.