ARCGIS PRO SDK MapProjectItem 地图项目类

一、获取工程中的所有地图

复制代码
Dim projectMaps As IEnumerable(Of MapProjectItem) = Project.Current.GetItems(Of MapProjectItem)()

二、从项目中删除地图

复制代码
Dim mapProjItem = Project.Current.GetItems(Of MapProjectItem)().FirstOrDefault(Function(mpi) mpi.Name = "需删除的地图名称")
Await QueuedTask.Run(Sub()
                           Project.Current.RemoveItem(mapProjItem)
                     End Sub)

三、遍历项目的所有 MapProjectItems

复制代码
dim newMapItemsContainer as IEnumerable(of MapProjectItem) = project.Current.GetItems(of MapProjectItem)()

Await QueuedTask.Run(Sub()
                          for each  mp in newMapItemsContainer
                               dim  myMap as Map = mp.GetMap()
                          next
                     End Sub)

四 获取特定的 MapProjectItem

复制代码
Dim mapProjItem = Project.Current.GetItems(Of MapProjectItem)().FirstOrDefault(Function(mpi) mpi.Name = "指定的地图名称")
'或等价于
Dim mapProjItem = Project.Current.GetItems(Of MapProjectItem)().FirstOrDefault(Function(mpi) mpi.Name.Equals("指定的地图名称"))

五、在工程中查找地图并将其打开

复制代码
Dim pmap as map
Dim mpi As MapProjectItem = Project.Current.GetItems(Of MapProjectItem)().FirstOrDefault(Function(m) m.Name.Equals("需删除的地图名称", StringComparison.CurrentCultureIgnoreCase))
If mpi Is Nothing = False Then
    pmap = mpi.GetMap()
End If
Await ProApp.Panes.CreateMapPaneAsync(pmap)
相关推荐
山人在山上5 小时前
arcgis server 暴力迁移
运维·服务器·arcgis
Yolo566Q5 小时前
环境土壤物理模型HYDRUS1D/2D/3D实践技术应用系统性学习
大数据·开发语言·gpt·学习·arcgis·r语言
中科GIS地理信息培训6 小时前
弃用通知:ArcGIS GeoEvent Server 弃用
arcgis
小艳加油7 小时前
从无人机航拍到ArcGIS高级制图:攻克“天空地”一体化监测核心环节,含多光谱植被指数、激光雷达地形测量与河网水系提取全流程实战
arcgis·无人机·生态环境监测
GISer_Jing2 天前
测绘与GIS考试高频考点选择题精选
学习·arcgis
GISer_Jing2 天前
考研|考公GIS:近5年地理信息产业数据全链路核心要点(背诵版)
学习·考研·arcgis
坤盾科技2 天前
Docker 离线地图服务器搭建实战:Node.js + OpenLayers + MBTiles
linux·javascript·arcgis·docker·node.js
非科班Java出身GISer3 天前
ArcGIS Maps SDK for JavaScript 5.0 组件(Component)地图初始化示例
arcgis·arcgis js 组件化·arcgis js5.0初始化·arcgis js组件式·arcgis js组件初始化·component初始化·arcgis js 5.0
啦啦球晃晃3 天前
ArcGIS统计乡镇耕地面积
arcgis
研究点啥好呢4 天前
Ruflo v3.6:多智能体编排平台的全面突破
arcgis