arcgis之MapView、不同的Layer使用不同的坐标系,如何定位?

问题:
地图的各个图层有没有必要使用统一的坐标系?

服务端定义的Layer必须使用同一种坐标系?

MapView的坐标系是否必须和地图中的图层一致?

我猜测是没有必要的。

关于MapView的官方介绍

spatialReference SpatialReferenceautocast inherited The spatial
reference of the view. This indicates the Projected Coordinate System
or the Geographic Coordinate System used to locate geographic features
in the map. In a SceneView the following supported coordinate systems
are available.

The spatial reference can either be set explicitly or automatically
derived from the following:

In the case of a SceneView, if the map is a WebScene instance, the
WebScene.initialViewProperties.spatialReference is used.

In all other cases, the spatial reference is derived from the first
layer that loads in this order:

  1. map.basemap.baseLayers
  2. map.layers
  3. map.ground.layers
    When using an Esri basemap, the default spatial reference is Web Mercator Auxiliary Sphere.

官方说明MapView的的空间引用可以显式指定,也可以继承baseLayers,地图的layers。

如果MapView的坐标系和地图图层的坐标系不同,进行定位时需要转化坐标(转为MapView使用的坐标系对应的坐标值)才能够正确的定位哦。

假设情形:
地图的一个TileLayer使用了一种自定义的坐标系,

‘PROJCS[“CGCS2000_3_Degree_GK_CM_115.75E”,GEOGCS[“GCS_China_Geodetic_Coordinate_System_2000”,DATUM[“D_China_2000”,SPHEROID[“CGCS2000”,6378137.0,298.257222101]],PRIMEM[“Greenwich”,0.0],UNIT[“Degree”,0.0174532925199433]],PROJECTION[“Transverse_Mercator”],PARAMETER[“false_easting”,500000.0],PARAMETER[“false_northing”,0.0],PARAMETER[“central_meridian”,115.75],PARAMETER[“scale_factor”,1.0],PARAMETER[“latitude_of_origin”,0.0],UNIT[“Meter”,1.0]]’

这种坐标系是没有对应的wkid值的。

现在我要创建一个GraphicLayer(默认坐标系为wgs84)并添加一个点,在地图上这个Point能否在正确的位置显示呢?

答案是可以的。实践证明每一个Layer是独立的。

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值