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)
相关推荐
天问一2 天前
前端引用printJS打印
前端·arcgis
破z晓4 天前
若依(vue版)集成ArcGIS
前端·vue.js·arcgis
杨超越luckly6 天前
HTML应用指南:利用GET请求获取全国瑞思教育门店位置信息
前端·python·arcgis·html·门店数据
网上邻居YY6 天前
城市不透水面边界提取(arcgis渔网方法)
arcgis
树谷-胡老师6 天前
全球-地上与地下生物量碳密度-栅格数据(300m/tif/2010年)
arcgis
杨超越luckly6 天前
HTML应用指南:利用GET请求获取全国新东方门店位置信息
前端·数据库·arcgis·html·门店数据
浩瀚地学7 天前
【Arcpy】入门学习笔记(五)-矢量数据
经验分享·笔记·python·arcgis·arcpy
枝上棉蛮8 天前
2025年GIS软件深度解析:商业旗舰、开源先锋与国产新锐的选型指南
arcgis·gis·qgis·gisbox·gis服务器·global mapper·grass gis
智航GIS8 天前
使用ArcGIS中ArcScan工具矢量化
arcgis
智航GIS8 天前
ArcGIS大师之路500技---015提取分析
arcgis