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)
相关推荐
智航GIS21 小时前
ArcGIS大师之路500技---032山体阴影
arcgis
瑞瑞大大1 天前
arcgis矢量化:借助PS快速选择工具提取面块状数据
arcgis·shp·矢量化
智航GIS1 天前
ArcGIS大师之路500技---033水文分析
arcgis
智航GIS2 天前
ArcGIS大师之路500技---031栅格计算器
arcgis
hdsoft_huge2 天前
在天地图中使用不同格式高效加载 PostGIS 的方案
arcgis·postgresql·数据可视化
智航GIS2 天前
ArcGIS大师之路500技---030栅格数据的镶嵌与裁切
arcgis
Q一件事2 天前
ArcGIS中的字段类型
arcgis
天问一3 天前
前端引用printJS打印
前端·arcgis
破z晓6 天前
若依(vue版)集成ArcGIS
前端·vue.js·arcgis
杨超越luckly7 天前
HTML应用指南:利用GET请求获取全国瑞思教育门店位置信息
前端·python·arcgis·html·门店数据