map 对象 没有 SpatialReference 属性么?

帮助文档 里明示 有spatialReference 属性,
spatialReference
(可读写)用于获取或设置与地图相关联的 SpatialReference。SpatialReference
为什么我这输出找不到呢?是版本问题么?我用的arcgis pro 2.4

mapx = aprx.listMaps("图层")[0] 
print("map名称1",mapx.name) 
print("map坐标系1:", mapx.SpatialReference) 
print("map坐标系2:", mapx.SpatialReference.name)
结果:
map名称1 图层
AttributeError: 'Map' object has no attribute 'SpatialReference'
已邀请:

张佳期

赞同来自:

https://pro.arcgis.com/zh-cn/pro-app/latest/arcpy/mapping/map-class.htm  
有spatialReference属性,你代码中的“S”需要小写。
123.png

 

要回复问题请先登录注册